{
  "schema_version": 1,
  "id": "guard-deletion",
  "track": "coding",
  "name": "Guard Deletion and Mitigation Removal",
  "version": "0.0.3",
  "sha256": "9955f34396a5f1c110af91f17bda349e71f431beb9156f9dc1c856b77f9e47f8",
  "sha256_v1": "4db9ebe3772a979dfeee057c866e841d84a1258c8d591902015e7bdd97a1ea1c",
  "keyword": "block",
  "word": "blocks",
  "says": "blocks on an agent's file writes and at turn end",
  "description": "trigger: a change that removes a check, auth decorator, middleware registration, sanitizer call or path check with none of its kind in the same hunk (ask), or removes a hardening flag, security header, cookie attribute, TLS check or row-level security, or swaps one of those or a narrow file mode for a weakened form (block). Hunk-local: misses a guard moved across hunks or files, one neutralised in place, added insecure settings, a deletion-only commit.",
  "misses": null,
  "where": [
    "write",
    "turn-end"
  ],
  "groups": [
    "code-hardening"
  ],
  "eval_cases": 23,
  "eval_executed": 22,
  "latest": {
    "version": "0.0.3",
    "date": "2026-10-25",
    "change": "Behaviour change, added coverage for quoted file names. The rename and copy header names are now unquoted the way git quotes them (\\a \\b \\f \\n \\r \\t \\v \\\\ \\\" and octal bytes), so a move into or out of a judged scope is recognised for a name that holds a quote, backslash or control character."
  },
  "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. Where its description says it asks, it refuses at both points, because this client cannot prompt at either point"
    },
    "codex": {
      "keyword": "block",
      "says": "blocks on an agent's file writes and at turn end. Where its description says it asks, it refuses at both points, because this client cannot prompt at either point. 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. Where its description says it asks, it refuses at turn end, because this client cannot prompt there. 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. Where its description says it asks, it refuses at turn end, because this client cannot prompt there. 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/guard-deletion",
  "enforces": "enforced-at-commit",
  "examples": [
    {
      "word": "Asks",
      "prompt": "The agent deletes `if not user.is_admin: raise PermissionDenied` from a view and puts nothing in its place.",
      "command": null
    },
    {
      "word": "Allowed",
      "prompt": "The agent rewrites the admin check as a role comparison that raises in the same place.",
      "command": null
    }
  ]
}
