Skip to content

v1.4.2 — four false positives out, four real ways in

Choose a tag to compare

@AviOfLagos AviOfLagos released this 13 Oct 00:42
· 35 commits to main since this release
23495a8

Found by running 1.4.1 against a real repository rather than a fixture.

The false positive

node\s+.*(-e|--eval) left the flag unanchored, so atlas-engine matched. An honest PostToolUse hook running packages/atlas-engine/hooks/atlas-tag.ts was reported as "an agent hook runs a dropper, on its own, every session" — on the owner's own repository, by a check shipped hours earlier. The same pattern sat in the package.json install-hook check and the API scan.

The half nobody had noticed

Reviewing that fix turned up the other side. node -p 'require("child_process")' evaluates its argument exactly as -e does, --print is its long form, and -pe / -ep are how you write it without it looking like either. None of those four were caught — not by the old pattern, not by the corrected one.

Measured, sixteen commands

old new
honest commands flagged 4 0
evaluating forms caught 6 of 10 10 of 10

A detector that cries wolf on a project's own tooling is how people learn to ignore it, so both halves have regression tests and the selftest asserts each flag separately rather than the one that was easy to remember.

Known limitation

Shell word-splitting tricks (node\${IFS}-e) still evade the pattern. The structural checks — an obfuscated target file, the IOC strings — are what catch those.

snare update