---
id: guard-deletion
track: coding
version: 0.0.4
label: blocks
keyword: block
where: write turn-end
sha256: 9df1b5a8f0fd0616ce30c99d8cbea07618aa7361a1e8db343decce643f3df249
source: https://github.com/open-coder-ai/chock-catalog/tree/e3d71d03e4dd32377ad5bc19fb6bacdfe6607ea4/base/guard-deletion
catalog_ref: e3d71d03e4dd32377ad5bc19fb6bacdfe6607ea4
---

# Guard Deletion and Mitigation Removal

guard-deletion · version 0.0.4

Blocks — Blocks on an agent's file writes and at turn end. 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

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.

## Its label on each agent

- Claude Code (tested): Blocks — Blocks on an agent's file writes and at turn end. Builder: /coding/builder/#client=claude-code&p=guard-deletion
- Cursor (tested): Blocks — 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. Builder: /coding/builder/#client=cursor&p=guard-deletion
- Codex (tested): Blocks — 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). Builder: /coding/builder/#client=codex&p=guard-deletion
- GitHub Copilot (tested): Blocks — 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). Builder: /coding/builder/#client=copilot&p=guard-deletion
- Devin (tested): Blocks — 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). Builder: /coding/builder/#client=devin&p=guard-deletion
- Grok (tested): Not graded yet for Grok. Builder: /coding/builder/#client=grok&p=guard-deletion
- goose (tested): Not graded yet for goose. Builder: /coding/builder/#client=goose&p=guard-deletion
- Antigravity (tested): Not graded yet for Antigravity. Builder: /coding/builder/#client=antigravity&p=guard-deletion
- OpenHands (untested): Not graded yet for OpenHands. Builder: /coding/builder/#client=openhands&p=guard-deletion
- Kimi Code (untested): Not graded yet for Kimi Code. Builder: /coding/builder/#client=kimi-code&p=guard-deletion
- Factory Droid (untested): Not graded yet for Factory Droid. Builder: /coding/builder/#client=factory-droid&p=guard-deletion

## What it misses

This policy does not state what it misses.

## Examples

- Asks: The agent deletes \`if not user.is_admin: raise PermissionDenied\` from a view and puts nothing in its place.
- Allowed: The agent rewrites the admin check as a role comparison that raises in the same place.

## Latest change

0.0.4 · 2026-11-09 — 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.

## Provenance

- Tested by 22 of 23 cases run automatically
- SHA-256: `9df1b5a8f0fd0616ce30c99d8cbea07618aa7361a1e8db343decce643f3df249`
- Catalog commit: https://github.com/open-coder-ai/chock-catalog/commit/e3d71d03e4dd32377ad5bc19fb6bacdfe6607ea4
- Source: https://github.com/open-coder-ai/chock-catalog/tree/e3d71d03e4dd32377ad5bc19fb6bacdfe6607ea4/base/guard-deletion (catalog path `base/guard-deletion`)
- Presets: Code hardening
- JSON: `/api/coding/policies/guard-deletion.json`
- Report a problem: https://chock.sh/report/?policy=guard-deletion&version=0.0.4&page=%2Fcoding%2Fpolicies%2Fguard-deletion%2F
