{
  "schema_version": 1,
  "id": "guard-deletion",
  "track": "coding",
  "name": "Guard Deletion and Mitigation Removal",
  "version": "0.0.4",
  "sha256": "9df1b5a8f0fd0616ce30c99d8cbea07618aa7361a1e8db343decce643f3df249",
  "sha256_v1": "a2b9116f696310d5d1d26379615b63fac4d39c425776b578c75d49082baf5526",
  "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.4",
    "date": "2026-11-09",
    "change": "Changelog order only (IR-F46): entries had been added at the top of a list that ran oldest-first, so it rose and fell by version; they now run newest-first throughout. No entry's text or version, and no rule, guard or eval, changed. Patch bump because the manifest is part of the published pack hash."
  },
  "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/e3d71d03e4dd32377ad5bc19fb6bacdfe6607ea4/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
    }
  ]
}
