Scan Secrets
Blocks on an agent's file writes and at turn end.
Acts on
File write · Turn end
When
Before the file write · at turn end
Tested
64 of 64 pass
In a git repo
At commit
What it does
Blocks credentials: vendor tokens (AWS, GitHub, GitLab, Slack, OpenAI, HF, ...), JWTs, private-key and PGP blocks, named key/token/secret/password values (JSON, YAML, env, HCL, code), URI creds, Authorization literals, CLI password flags; files by path (.env*, keys). Misses: split or encoded values, quoted values with spaces, unlisted names, reference-, placeholder- or expression-like values (a call, a subscript, a member chain). Runs: commit, agent write, turn end. Pragma same line; agent: only if in HEAD; MCP gateway: never.
Chock adds friction. It is not a security boundary.
Its label on each agent
The catalog grades each policy on each agent. Pick an agent to build with this policy:
- Claude Code TestedBlocks Blocks on an agent's file writes and at turn endBuild →
- Cursor TestedBlocks Blocks on an agent's file writes and at turn endBuild →
- Codex TestedBlocks Blocks on an agent's file writes and at turn end. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run)Build →
- GitHub Copilot TestedBlocks Blocks at turn end only. It does not check a file write when it happens. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run)Build →
- Devin TestedBlocks Blocks at turn end only. It does not check a file write when it happens. If the hook errors, the action goes through (vendor docs only, not witnessed)Build →
- Grok Tested Not graded yet for GrokBuild →
- goose Tested Not graded yet for gooseBuild →
- Antigravity Tested Not graded yet for AntigravityBuild →
- OpenHands Untested Not graded yet for OpenHandsBuild →
- Kimi Code Untested Not graded yet for Kimi CodeBuild →
- Factory Droid Untested Not graded yet for Factory DroidBuild →
See it in action
Refused
A staged file contains an AWS access key ID pattern.
Allowed
A commit adds a source file containing the word 'password' in a comment without a secret value.
Both examples are this policy's own test cases.
What it misses
Split or encoded values, quoted values with spaces, unlisted names, reference-, placeholder- or expression-like values (a call, a subscript, a member chain).
Latest change
0.1.5 · · Code that handles a password is no longer refused (SS-1; hardening review of 2026-11-15, REVIEW-secrets sections 4 and 4b). The two bare alternatives, password[=:]<12+ characters> and (api|secret|auth)[_-]?(key|token)[=:]<20+ characters>, matched any run of characters, so password = getpass.getpass(), password = request.json["password"], password: formData.get("password"), and password: <your-password> were blocked. They now match a literal value: silent on a placeholder (<...>, ***, xxxx, ..., %(, #{, [[, your/example/changeme/redacted/null words) and on an expression (an identifier chain followed by (, [ or <; a member chain without a digit such as event.target.value; for key and token also a snake_case or UPPER_CASE name). password:: is a path, not an assignment. Provider formats, the named key rule, the quoted alternatives and the command-password alternatives are unchanged. Misses text now names expressions; a dotted passphrase of letters only (correct.horse.battery) is read as a member chain. Measured: the 58 lines of the review's idioms and placeholders, 42 refused before, 0 after; eval suite 59 of 59 before, 64 of 64 after (tc-060 to tc-064, all allow, five of which 0.1.4 fails); every committed refusing case still blocks; replay over first-parent history, chock-catalog 243 commits and 430603 added lines: 141 lines refused before and after, 0 disappear, 0 appear; open-coder-ai/chock 281 commits and 253827 added lines: 44 before and after, 0 and 0. Tests: the scan-secrets pattern tests and the guard-memory-writes copy test.