{
  "schema_version": 1,
  "id": "protect-commit-privacy",
  "track": "coding",
  "name": "Protect Commit Privacy",
  "version": "0.2.6",
  "sha256": "a45e03826170f98796f98cbd48462c3a16f28d3f4b49acb6446468d234a58508",
  "sha256_v1": "cda6067b910d6bd35720c80d26d2e9436589761fb313e28bac5be69dfba2050c",
  "keyword": "block",
  "word": "blocks",
  "says": "refuses a matched shell command before it runs",
  "description": "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.",
  "misses": null,
  "where": [
    "command"
  ],
  "groups": [
    "git-hygiene"
  ],
  "eval_cases": 35,
  "eval_executed": 35,
  "latest": {
    "version": "0.2.6",
    "date": "2026-10-24",
    "change": "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."
  },
  "agent_labels": {
    "claude-code": {
      "keyword": "block",
      "says": "refuses a matched shell command before it runs"
    },
    "cursor": {
      "keyword": "block",
      "says": "refuses a matched shell command before it runs"
    },
    "codex": {
      "keyword": "block",
      "says": "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)"
    },
    "copilot": {
      "keyword": "block",
      "says": "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)"
    },
    "devin": {
      "keyword": "block",
      "says": "refuses a matched shell command before it runs. If the hook errors, the action goes through (vendor docs only, not witnessed)"
    },
    "grok": {
      "keyword": "ungraded",
      "says": "Not graded yet for Grok"
    },
    "goose": {
      "keyword": "ungraded",
      "says": "Not graded yet for goose"
    },
    "antigravity": {
      "keyword": "ungraded",
      "says": "Not graded yet for Antigravity"
    },
    "openhands": {
      "keyword": "ungraded",
      "says": "Not graded yet for OpenHands"
    },
    "kimi-code": {
      "keyword": "ungraded",
      "says": "Not graded yet for Kimi Code"
    },
    "factory-droid": {
      "keyword": "ungraded",
      "says": "Not graded yet for Factory Droid"
    }
  },
  "source_url": "https://github.com/open-coder-ai/chock-catalog/tree/1e60d211c1bb767152c6ab0167932da06ab3a10f/base/protect-commit-privacy",
  "enforces": "enforced-at-commit",
  "examples": [
    {
      "word": "Refused",
      "prompt": "An agent commits with a message that narrates who asked for the change.",
      "command": "git commit -m \"quick fix because the user asked for it in review\""
    },
    {
      "word": "Allowed",
      "prompt": "An agent commits with a message that describes the change itself.",
      "command": "git commit -m \"fix(hooks): emit LF on Windows for generated dispatchers\""
    }
  ]
}
