---
id: refname-filename-metachar
track: coding
version: 0.1.5
label: blocks
keyword: block
where: command write turn-end
sha256: dbab33cf859b0457faff6f0ba2f5212fa83274a55233c119810a3ad6daae9ee8
source: https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/refname-filename-metachar
catalog_ref: 1e60d211c1bb767152c6ab0167932da06ab3a10f
---

# Block Risky Characters in File and Branch Names

refname-filename-metachar · version 0.1.5

Blocks — Refuses a matched shell command before it runs. Blocks on an agent's file writes and at turn end. Chock adds friction. It is not a security boundary. 

In a git repo: at commit (Chock refuses the commit, locally and in CI.)



## 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.

## Its label on each agent

- Claude Code (tested): Blocks — Refuses a matched shell command before it runs. Blocks on an agent's file writes and at turn end. Builder: /coding/builder/#client=claude-code&p=refname-filename-metachar
- Cursor (tested): Blocks — Refuses a matched shell command before it runs. Blocks on an agent's file writes and at turn end. Builder: /coding/builder/#client=cursor&p=refname-filename-metachar
- Codex (tested): Blocks — 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). Builder: /coding/builder/#client=codex&p=refname-filename-metachar
- GitHub Copilot (tested): Blocks — 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). Builder: /coding/builder/#client=copilot&p=refname-filename-metachar
- Devin (tested): Blocks — 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). Builder: /coding/builder/#client=devin&p=refname-filename-metachar
- Grok (tested): Not graded yet for Grok. Builder: /coding/builder/#client=grok&p=refname-filename-metachar
- goose (tested): Not graded yet for goose. Builder: /coding/builder/#client=goose&p=refname-filename-metachar
- Antigravity (tested): Not graded yet for Antigravity. Builder: /coding/builder/#client=antigravity&p=refname-filename-metachar
- OpenHands (untested): Not graded yet for OpenHands. Builder: /coding/builder/#client=openhands&p=refname-filename-metachar
- Kimi Code (untested): Not graded yet for Kimi Code. Builder: /coding/builder/#client=kimi-code&p=refname-filename-metachar
- Factory Droid (untested): Not graded yet for Factory Droid. Builder: /coding/builder/#client=factory-droid&p=refname-filename-metachar

## What it misses

This policy does not state what it misses.

## Examples

- Refused: A change adds a file whose name carries command substitution that decodes and runs a payload.
- Allowed: A change adds ordinary source files.

## Latest change

0.1.5 · 2026-10-27 — 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.

## Provenance

- Tested by 43 of 43 cases run automatically
- SHA-256: `dbab33cf859b0457faff6f0ba2f5212fa83274a55233c119810a3ad6daae9ee8`
- Catalog commit: https://github.com/open-coder-ai/chock-catalog/commit/1e60d211c1bb767152c6ab0167932da06ab3a10f
- Source: https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/refname-filename-metachar (catalog path `base/refname-filename-metachar`)
- Presets: Git hygiene
- JSON: `/api/coding/policies/refname-filename-metachar.json`
- Report a problem: https://chock.sh/report/?policy=refname-filename-metachar&version=0.1.5&page=%2Fcoding%2Fpolicies%2Frefname-filename-metachar%2F
