How it works
- Normalise. The pending tool call (Bash, Write, Edit, Read, MCP) becomes one canonical action with a SHA-256.
- Parse. The command is tokenised like a POSIX shell, split at
; && || | &, here-document bodies are separated from the command, braces are expanded for destructive commands, and wrappers (sudo env nohup timeout xargs) are unwrapped. - Look inside.
$(...), backticks,sh -c,eval, interpreter one-liners (python -c,node -e,perl -e...) and commands embedded in other programs' options are checked as commands themselves, up to 4 levels deep. Deeper nesting is asked about, never allowed silently. - Check. Hundreds of rules: deletes of root, home or system folders, disk writes, secret reads combined with the network, download-and-run, reverse shells, persistence (cron, shell start-up files, systemd, sudoers), cloud and database destruction, git history rewrites, the agent editing its own permission settings, and more.
- Fail closed. A program CODEGUARD does not know, a command it cannot parse, or SQL it does not recognise is asked about, never allowed.
- Decide. Any CRITICAL finding: DENY. Any HIGH: REQUIRE_APPROVAL (a person decides). Otherwise ALLOW.
- Sign. Each answer carries an Ed25519 receipt over the action hash, the findings hash and the decision.
FIRME AI CORPORATION · CAIN-42 is a Byzantine trust fabric. Numbers marked "our own check" were run by us, not by an independent party. Nothing on these pages is a certification.