Chock.sh Build your plugin
Blocksv0.1.4 preset: Code hardening

Block Unsafe Code Execution

Blocks on an agent's file writes and at turn end.

Acts on

File write · Turn end

When

Before the file write · at turn end

Tested

54 of 54 pass

In a git repo

At commit

What it does

Commit and agent-write gate, greppable slice of ASI05: bare, global-receiver and indirect eval/exec forms, the Function constructor, string timers, exec-mode compile, import by computed name, shell-mode and implicit-shell process APIs, unsafe deserializers (pickle family, unsafe yaml loaders, model loads) and shell eval of a variable. File-type-blind line scan: friction, not a security boundary. Waiver 'pragma: allowlist exec' on the line; in the agent only if already committed in HEAD. Not production-grade: refuses 9 of 34 correct cases (Markdown, docstrings).

Chock adds friction. It is not a security boundary.

Its label on each agent

The catalog grades each policy on each agent. Pick an agent to build with this policy:

  • Claude Code TestedBlocks Blocks on an agent's file writes and at turn endBuild →
  • Cursor TestedBlocks Blocks on an agent's file writes and at turn endBuild →
  • Codex TestedBlocks 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)Build →
  • GitHub Copilot TestedBlocks 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)Build →
  • Devin TestedBlocks 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)Build →
  • Grok Tested Not graded yet for GrokBuild →
  • goose Tested Not graded yet for gooseBuild →
  • Antigravity Tested Not graded yet for AntigravityBuild →
  • OpenHands Untested Not graded yet for OpenHandsBuild →
  • Kimi Code Untested Not graded yet for Kimi CodeBuild →
  • Factory Droid Untested Not graded yet for Factory DroidBuild →

See it in action

Refused

A staged file passes model output to the Python eval builtin.

Allowed

A staged file calls model.eval() to switch a torch module to inference mode.

Both examples are this policy's own test cases.

What it misses

This policy does not state what it misses.

Latest change

0.1.4 · · Status production -> draft (owner decision 2026-11-15, CAT-S1; review record discovery/2026-11-15-review-dependency-and-code-execution-policies.md). Measured after 0.1.3: catches 26 of 33 and refuses 9 of 34 correct cases, among them Markdown that shows the pattern and a docstring that names it; a line gate cannot tell those from code. It returns to production when a script gate or a path exclusion clears those cases and the count is measured again. No rule, script or eval changed.