---
id: protect-commit-privacy
track: coding
version: 0.2.6
label: blocks
keyword: block
where: command
sha256: a45e03826170f98796f98cbd48462c3a16f28d3f4b49acb6446468d234a58508
source: https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/protect-commit-privacy
catalog_ref: 1e60d211c1bb767152c6ab0167932da06ab3a10f
---

# Protect Commit Privacy

protect-commit-privacy · version 0.2.6

Blocks — Refuses a matched shell command before it runs. 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

Keeps the development conversation out of git history. Guard refuses \`git commit\` and \`gh pr create|edit\` whose message or body (inline -m/-b, -F/--file/--body-file, heredoc on -F -) holds a process-leak marker (session link, 'user asked', ...); commands behind cd, sh -c, sudo, env are read. A commit-msg hook applies the same markers to the recorded message. Narrow deny-list. No waiver: a legitimate phrase needs a person to remove it from MARKERS in the guard; an agent asks the person.

## Its label on each agent

- Claude Code (tested): Blocks — Refuses a matched shell command before it runs. Builder: /coding/builder/#client=claude-code&p=protect-commit-privacy
- Cursor (tested): Blocks — Refuses a matched shell command before it runs. Builder: /coding/builder/#client=cursor&p=protect-commit-privacy
- Codex (tested): Blocks — Refuses a matched shell command before it runs. 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=protect-commit-privacy
- GitHub Copilot (tested): Blocks — Refuses a matched shell command before it runs. 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=protect-commit-privacy
- Devin (tested): Blocks — Refuses a matched shell command before it runs. If the hook errors, the action goes through (vendor docs only, not witnessed). Builder: /coding/builder/#client=devin&p=protect-commit-privacy
- Grok (tested): Not graded yet for Grok. Builder: /coding/builder/#client=grok&p=protect-commit-privacy
- goose (tested): Not graded yet for goose. Builder: /coding/builder/#client=goose&p=protect-commit-privacy
- Antigravity (tested): Not graded yet for Antigravity. Builder: /coding/builder/#client=antigravity&p=protect-commit-privacy
- OpenHands (untested): Not graded yet for OpenHands. Builder: /coding/builder/#client=openhands&p=protect-commit-privacy
- Kimi Code (untested): Not graded yet for Kimi Code. Builder: /coding/builder/#client=kimi-code&p=protect-commit-privacy
- Factory Droid (untested): Not graded yet for Factory Droid. Builder: /coding/builder/#client=factory-droid&p=protect-commit-privacy

## What it misses

This policy does not state what it misses.

## Examples

- Refused: An agent commits with a message that narrates who asked for the change. — `git commit -m "quick fix because the user asked for it in review"`
- Allowed: An agent commits with a message that describes the change itself. — `git commit -m "fix(hooks): emit LF on Windows for generated dispatchers"`

## Latest change

0.2.6 · 2026-10-24 — Shared shell reader updated (SR-2d1; the copy in implementations/chock_shellparse is regenerated, this policy's own script is unchanged). Added coverage: an arithmetic shift in \`$(( ))\`, \`(( ))\` or \`$\[ \]\` is no longer read as the start of a here-document, so the lines after it are judged as before; the string given to \`env -S\` or \`--split-string\` is read as the command env runs; \`env -i\` is recorded on the command it runs. Tests: test_shellparse_sr2d1.py.

## Provenance

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