injection-audit

A static analyser for shell and argument injection whose output is a dated, signed report you can hand to someone - and prove, three months later, that it was not edited.

Python AST + BashCWE-78 / CWE-88HMAC-SHA256 signedstdlib onlyfindings, not certification

Field note: the report that survives being handed over — a real scan, the signing decision, and the limits stated up front.

Why the report is the product

Most scanners print a blob of JSON and leave you to turn it into evidence. This one starts from the opposite end: the report is a fixed, versioned artifact. It carries an ID derived from the tree and the date, per-file SHA-256 hashes of the exact source that was read, and file:line evidence with the offending line quoted. A coverage section says what was analysed, what was skipped, and why. Then the canonical payload is signed with HMAC-SHA256 and the key fingerprint is recorded.

Anyone with the report and the verification tool can check the signature and the payload hash. No account, no service, no phone-home.

What it actually found

On a deliberately broken six-file demo app it produced 8 findings - five in Python, three in Bash - including a shell=True subprocess call tagged as both CWE-78 and CWE-88, and a bash -c expansion flagged in the deploy script. Four files were analysable; a binary and a README were skipped and counted as such rather than silently ignored.

$ injection-audit scan ./app --key-file ./key.txt --label demo-app
SIA-2026-11-22-b22991d5  findings=8 files=4
json      : report-SIA-2026-11-22-b22991d5.json
markdown  : report-SIA-2026-11-22-b22991d5.md
signature : report-SIA-2026-11-22-b22991d5.json.sig

$ injection-audit verify report-SIA-2026-11-22-b22991d5.json
signature valid   payload_sha256=101a3e5b...

Limits, stated up front

Taint tracking is intra-procedural with a conservative branch union; alias tracking through containers and attributes is limited. There is no JavaScript/TypeScript AST, no cross-module dataflow, and no CI gating in this version. The report says this itself - along with a fixed disclaimer that these are findings and dated evidence, not a compliance certificate or a guarantee.

Source and docs: github.com/derbaroser-eng/injection-audit