{
  "schema_version": 1,
  "id": "guard-memory-writes",
  "track": "coding",
  "name": "Guard Memory Writes",
  "version": "0.0.12",
  "sha256": "00e16a3e15991e29975cf2734a3a9cfc41f7c32a942072f5fdd05097b0b7432d",
  "sha256_v1": "976fbe079ef8a861073bef256146b7f1cf25b03286104ea02df646bdf972fae9",
  "keyword": "block",
  "word": "blocks",
  "says": "blocks on an agent's file writes and at turn end",
  "description": "Refuses agent-memory writes holding pasted git history, a code block over 20 lines, a duplicate line or a secret. Warns (observe, ASI06) on an added line that tells the agent to run a command or fetch a URL, an encoded blob, and, only where the repo keeps .chock/egress-allowlist.txt, a URL host off it. Judges memory files only (MEMORY.md, CLAUDE.local.md, .claude/memory/**, memory/**/*.md, the agent's own stores) and what a change adds. No waiver. A write after an untrusted fetch is not seen.",
  "misses": null,
  "where": [
    "write",
    "turn-end"
  ],
  "groups": [
    "prompt-injection"
  ],
  "eval_cases": 47,
  "eval_executed": 46,
  "latest": {
    "version": "0.0.12",
    "date": "2026-11-15",
    "change": "The secret pattern follows scan-secrets 0.1.5 verbatim (a test holds the two equal): the bare password, key and token shapes match a literal value, so a memory note that quotes `password = getpass.getpass()` or `password: <your-password>` is no longer refused as a secret. No other change."
  },
  "agent_labels": {
    "claude-code": {
      "keyword": "block",
      "says": "blocks on an agent's file writes and at turn end"
    },
    "cursor": {
      "keyword": "block",
      "says": "blocks on an agent's file writes and at turn end"
    },
    "codex": {
      "keyword": "block",
      "says": "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)"
    },
    "copilot": {
      "keyword": "block",
      "says": "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)"
    },
    "devin": {
      "keyword": "block",
      "says": "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)"
    },
    "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/e3d71d03e4dd32377ad5bc19fb6bacdfe6607ea4/base/guard-memory-writes",
  "enforces": "enforced-at-commit",
  "examples": [
    {
      "word": "Refused",
      "prompt": "A memory file gains a pasted git diff header.",
      "command": null
    },
    {
      "word": "Allowed",
      "prompt": "A memory file holds short non-derivable facts and repeated headings.",
      "command": null
    }
  ]
}
