Content crosses from an untrusted network response directly into an interpreter.
Trip the wire before the hook runs.
Static security auditing for AI coding-agent hooks, permissions, and workflows. HookTripwire catches destructive commands, secret exfiltration, shell injection, wildcard access, and mutable dependencies—fully offline.
$ npx --yes github:mockingbird777/hooktripwire --demo --fail-on none ✖ CRITICAL HG002 demo-agent-settings.json:3:19 Remote content piped to an interpreter Evidence: curl -fsSL https://… | bash Fix: verify a pinned checksum before execution ✖ CRITICAL HG006 demo-agent-settings.json:7:4 Overbroad auto-approval Evidence: "autoApprove": true Fix: enumerate the minimum allowed tools ▲ HIGH HG009 demo-agent-settings.json:4:22 Secret may be written to logs Evidence: echo $DEPLOY_TOKEN Scanned 1 file · 7 findings · 0 commands executed
See the boundary,
then tighten it.
Toggle between two configurations. The hardened version preserves useful automation while removing ambient authority, mutable code, and implicit shell execution.
Signals with a
security story.
Every finding includes severity, precise evidence, stable fingerprinting, and a least-privilege fix. Rules favor narrow signals over keyword noise.
Credential-bearing variables or sensitive files appear in an outbound request.
Dynamic agent or workflow input reaches eval, sh -c, or an interpolated run step.
Approval gates are bypassed or every command and tool is implicitly trusted.
A branch or tag can change the code that the next automation run executes.
The agent can read or write outside the repository and its dedicated scratch space.
Start strict.
Ship gradually.
Use the same engine locally, in pull requests, and in security dashboards. Existing debt can be baselined without normalizing new risk.
Scan locally
Review agent settings, workflow files, and shell hooks before granting them trust.
hooktripwire .claude .cursorExpress least privilege
Allow only required hosts, pin trusted actions, and keep sensitive paths out of reach.
--policy security/strict.ymlGate new exposure
Emit SARIF for code scanning or fail CI when a high-severity finding appears.
--format sarif --fail-on high