Block Risky Characters in File and Branch Names
Refuses a matched shell command before it runs. Blocks on an agent's file writes and at turn end.
Acts on
Shell command · File write · Turn end
When
Before the command runs · before the file write · at turn end
Tested
43 of 43 pass
In a git repo
At commit
What it does
Refuses names a shell, CI step or git can misread. Paths a change adds or renames into (commit, agent writes), and branches and tags pushed (pre-push), with command substitution, an IFS expansion, a backtick, ; & | < >, a double quote, a backslash, a control or bidi character, a base64-decode shape, a leading dash or trailing space or dot in a segment, or a '..' segment; a ref also with a full commit id's shape. A guard refuses git and file commands creating such names. No waiver. Friction, not a boundary.
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 Refuses a matched shell command before it runs. Blocks on an agent's file writes and at turn endBuild →
- Cursor TestedBlocks Refuses a matched shell command before it runs. Blocks on an agent's file writes and at turn endBuild →
- Codex TestedBlocks Refuses a matched shell command before it runs. 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 Refuses a matched shell command before it runs. 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 Refuses a matched shell command before it runs. 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 change adds a file whose name carries command substitution that decodes and runs a payload.
Allowed
A change adds ordinary source files.
Both examples are this policy's own test cases.
What it misses
This policy does not state what it misses.
Latest change
0.1.5 · · Title wording only (IR-F40): "Refname Filename Metachar" is now "Block Risky Characters in File and Branch Names". The id, guard and tests are unchanged.