Kief Studio

Introducing aur-scanner: A Security Scanner for AUR Packages

Protect

  • Published
  • Updated
  • 10 min read
Violet-magenta and soft gold light trails sweep inward from every edge and meet at one bright point on a black background.

TL;DR: aur-scanner is our free, open source tool that reads AUR packages before you build them and flags malicious patterns: download and execute, reverse shells, credential theft, obfuscation and persistence. It is static only, so it never runs the code it checks. Install aur-scanner from the AUR, put it in front of paru or yay, and keep reading PKGBUILDs.

We released aur-scanner in December 2025 because AUR packages kept getting abused and the only defense was a person reading every PKGBUILD. That still is the main defense. The scanner is a second reader that never gets tired, and it covers the parts people skip: install scripts, dependencies a few levels down, and the quiet change in a package you trusted last month.

This note is the original release post, updated. The tool has grown a lot since version 0.1.1, so I have rewritten it around what aur-scanner does today, what it cannot do, and how to run it on machines that matter.

Why do AUR packages need a scanner?

The Arch User Repository is a community collection of build scripts. You download a PKGBUILD, makepkg builds it on your machine, and pacman installs the result. That is a great model for getting software that is not in the official repos. It also means AUR packages run code on your computer before any file lands in /usr.

What the Arch wiki says about AUR packages

Arch is direct about the risk. Its wiki says: "AUR packages are user-produced content. These PKGBUILDs are completely unofficial and have not been thoroughly vetted. Any use of the provided files is at your own risk." (ArchWiki, Arch User Repository (opens in a new tab)) The makepkg page adds that "a PKGBUILD may contain arbitrary commands," which is why "Running makepkg itself as root is disallowed." (ArchWiki, makepkg (opens in a new tab))

So the rule has always been: read the PKGBUILD and the install script before you build. Most people mean to. Few do it every time, especially on an upgrade where twenty AUR packages update at once.

The incidents that keep happening

These are the cases the detection rules were built from:

  • 2018, the xeactor hijack. A user took over the orphaned acroread package and added code that downloaded a script from a paste site and set a systemd timer. BleepingComputer reported the payload collected system details and posted them to Pastebin, and that balz and minergate were changed the same way. (BleepingComputer, July 2018 (opens in a new tab)) Our first post called this a cryptominer campaign; the reporting describes data collection, so we corrected it.
  • July 2025, fake browser patches. Three AUR packages named librewolf-fix-bin, firefox-patch-bin and zen-browser-patched-bin pulled a "patch" from a GitHub repository that turned out to be the CHAOS remote access trojan. (BleepingComputer, July 2025 (opens in a new tab))
  • June 2026, the adoption wave. Arch posted that it was "experiencing a high volume of malicious package adoptions and updates in the Arch User Repository" and asked users "to review all PKGBUILD and install script changes when updating." (Arch Linux news, June 12, 2026 (opens in a new tab)) We covered the business side in what the Atomic Arch attack means for any business running Linux.
  • October 2026, fake helpers. Packages with names like yyay impersonated the yay and paru helpers and ran a remote shell script with root privileges from an install scriptlet. (BleepingComputer, October 2026 (opens in a new tab))

Put those side by side and the pattern is plain. In every case the bad code was sitting in the PKGBUILD or the install hook, readable, before it ran. Nobody was reading at the moment it mattered.

What does aur-scanner check in AUR packages?

It does static analysis on the files that make up AUR packages: the PKGBUILD, every declared .install script, and the local scripts shipped next to them. The project README lists 142 detection codes across pattern rules and dedicated analyzers. (ks-aur-scanner on GitHub (opens in a new tab)) The big groups:

  • Download and execute, like curl or wget piped to a shell, including forms split across lines
  • Reverse shells and backdoors
  • Credential access: SSH keys, browser profiles, tokens
  • Obfuscation: base64, hex, eval, decode then execute
  • Persistence: systemd services and timers, cron, units named to look like system daemons
  • Privilege escalation, including kernel modules loaded from an install scriptlet
  • Source and checksum problems: missing checksums, weak hashes, SKIP on files that should be pinned
  • Indicators from known campaigns against AUR packages

Static only: it reads, it never runs

This is the design rule the whole tool rests on. aur-scanner never sources a PKGBUILD, never calls makepkg during a scan, and never follows a URL it finds inside a package. It fetches the package with a locked-down git clone (no hooks, no submodules, no odd protocols) and reads the files as text. Pointing it at malicious AUR packages is safe because the scan cannot become the thing that runs the payload.

When a package fetches and runs code from somewhere else, the scanner flags that boundary with the URL and stops there. It tells you code runs from that address. It does not pretend to know what that code does.

It scans the whole dependency tree

The package you type is rarely the tampered one. aur-scanner walks the full tree of AUR dependencies using declared metadata only and scans all the AUR packages in it. Since 2.2.0, a dependency counts as an official repo package only when pacman confirms a sync repository provides it. Anything it cannot resolve fails the run instead of being waved through.

It notices when a trusted package changes

Both big hijacks worked by changing AUR packages people had already decided to trust. Version 2.2.0 added change detection: the scanner keeps a small fingerprint of each package it checks and tells you when a package grows new findings, changes maintainer (High when an orphan was just adopted), points at a new upstream, or adds an install scriptlet. It also added checks for names that render the same as a trusted one, like a Cyrillic letter standing in for a Latin one.

How do you install it and scan AUR packages?

All the channels install the same aur-scan command, and they conflict with each other, so pick one:

AUR package What it tracks
aur-scanner Stable, GPG-signed release (recommended)
ks-aur-scanner Same stable release under a second name
aur-scanner-rc Release candidate for the next version
aur-scanner-git Latest commit (rolling)

As of this update, the AUR lists aur-scanner at 2.2.0 under GPL-3.0-or-later. (AUR, aur-scanner (opens in a new tab)) The stable package builds from a GPG-signed git tag, and you can verify any release yourself with git verify-tag. (ks-aur-scanner releases (opens in a new tab))

# Stable release (recommended)
paru -S aur-scanner
# or
yay -S aur-scanner

# Check a package and its AUR dependencies before installing
aur-scan check <package-name>

# Scan a local PKGBUILD
aur-scan scan ./PKGBUILD

# Audit the AUR packages already installed
aur-scan system

Put the gate in front of your helper

The useful setup is the shell integration. Source it once and paru or yay installs get scanned before anything builds, upgrades included:

# bash
echo 'source /usr/share/aur-scan/integration.bash' >> ~/.bashrc
# zsh
echo 'source /usr/share/aur-scan/integration.zsh' >> ~/.zshrc

It fails closed. A scan error, a timeout or a prompt with no terminal to answer it means no install. If you really mean to skip it, paru-unsafe and yay-unsafe are the deliberate bypass, so skipping is a choice you make on purpose and not an accident.

Our first post said the tool "integrates as a pacman hook for automatic scanning." That hook still exists, but I want to be clear about what it can do. It runs inside the pacman transaction, after makepkg already built the package, so anything that ran during the build has already run. Treat the hook as a backstop for install scriptlets, and use the shell integration as the real gate for AUR packages.

Changelog

aur-scanner v0.1.1

What changed between 0.1.1 and 2.2.0?

Version 0.1.1 shipped on December 3, 2025, the same week as the first release. It fixed a false positive: VCS sources (git, svn, hg, bzr) legitimately use SKIP as their checksum because their content changes with each clone, and the first version warned about them anyway. After the fix, only non-VCS sources such as tarballs and patches using SKIP raise a warning. The same release added the first checksum codes, CHK-001 through CHK-006, covering missing checksums, MD5 and SHA1, partial and total SKIP, and count mismatches. It also added the stable aur-scanner and ks-aur-scanner packages next to aur-scanner-git.

Version 2.2.0 went to stable on October 2, 2026. The biggest changes were about failing closed. A file the scanner could not fully read used to drop out of the scan; now it is a Critical finding and the package counts as unreviewed. Dependencies used to be trusted by default; now pacman has to confirm them. Search-menu installs such as paru <term> are refused by default, because the package gets picked after the scan. My engineering notes on detecting an attack that isn't an exploit (opens in a new tab) go deeper into how the detection works.

What can't a scanner catch in AUR packages?

Honesty matters more in a security tool than anywhere else, so here are the limits.

  • Runtime-only behavior. If one of your AUR packages fetches code at runtime from a URL the scanner deliberately will not follow, you learn that code runs from that address, not what it does.
  • New obfuscation. Pattern and decode checks catch a lot. Static analysis cannot promise to catch every new trick.
  • Look-alike names in general. The scanner catches names that render the same as a trusted one, and one-keystroke look-alikes with no history of their own. A name that is merely similar is not a strong enough signal on its own, and the project measured that before deciding.

It complements reading the PKGBUILD. It does not replace it. On machines that matter, a person should still read changes to AUR packages before upgrading, which is exactly what Arch asked users to do in June 2026.

How should a business treat AUR packages on work machines?

If your company installs AUR packages on Arch or an Arch-based distribution anywhere, the risk is not the hobby desktop. It is the developer laptop with SSH keys, cloud credentials and source code access, and the build runner that holds deploy keys. One poisoned package on either can reach a lot.

A short policy goes a long way:

  1. Keep a list of the AUR packages each work machine is allowed to have. Fewer is better.
  2. Gate installs and upgrades with a scanner in front of the helper, and make the bypass a deliberate act.
  3. Read diffs on upgrade, especially when a package changed maintainer.
  4. Keep secrets off build boxes where you can, and rotate anything suspect AUR packages could have read.
  5. Run the system audit (aur-scan system) after any public incident to check what is already installed.

This is ordinary software supply chain security, applied to one repository. The same thinking applies to npm, PyPI and every other place your team pulls code from. Our free tools on kief.dev cover how to protect yourself from AUR malware (opens in a new tab) from the developer side.

Frequently asked questions

Is aur-scanner free?

Yes. The scanner for AUR packages is open source under GPL-3.0-or-later, published on GitHub and in the AUR as aur-scanner and ks-aur-scanner.

Does aur-scanner run the AUR packages it checks?

No. It reads the PKGBUILD and install scripts as text. It never builds, sources or evaluates them during a scan, and it does not follow URLs found inside a package.

Does it replace reading the PKGBUILD?

No. It is a second reader for the parts people skip. Static analysis cannot see runtime behavior or every new trick, so read changes to AUR packages on machines that matter.

Should I use the pacman hook or the shell integration?

The shell integration. It scans AUR packages before anything builds. The pacman hook runs after the build, so it can only catch install scriptlets. Use it as a backstop.

Which package should I install?

The stable aur-scanner for most people. ks-aur-scanner is the same release, aur-scanner-rc tests the next one, and aur-scanner-git follows the latest commit. Install only one.

Does it send my data anywhere?

Not by default. A default scan is offline and static. Optional threat intelligence lookups exist, are off unless you turn them on with your own key, and only send hashes and URLs already public in the PKGBUILD.

Where we fit

We built aur-scanner because we run Linux ourselves and wanted the check in front of our own installs. The same habits show up in client work: our vulnerability management keeps track of what runs on your machines and what needs attention, and our managed security watches the servers we host for you. If you want a second set of eyes on how your team installs software, from developer laptops to build runners, that is a security architecture review.

Bugs, false positives and new detection ideas are welcome as GitHub issues on the project.

First conversation is free. No commitment.

Tell us how your team installs software today

Related articles

  1. Protect

    The Atomic Arch AUR Attack: What a Supply Chain Attack Means for Any Business Running Linux

    A supply chain attack hit the Arch User Repository in June 2026. What happened, what it costs a business on Linux, and a response plan a small team can run.

    Brian Gagne

  2. Protect

    The Cybersecurity Revolution: Why LTFI AI-Sec-Ops Represents the Future of Digital Defense

    While many cybersecurity professionals view artificial intelligence with skepticism, viewing it as more threat than opportunity, the data reveals a stark reality: AI has.

    Kief Studio

  3. Protect

    Welcome to the World, TRaViS

    The most advanced, comprehensive EASM system available

    Kief Studio