Chock.sh Build your plugin

Flag Hidden Binary Files in Tests

Warns 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

17 of 17 pass

In a git repo

Advisory

What it does

Warns (observe rollout; never refuses yet) when a change adds or edits, in tests/, fixtures/, testdata/, spec/, m4/, vendor/, gradle/wrapper/: a file whose first bytes are an archive, executable, wasm or database signature (any extension), a random-looking non-media file over 100 KB, or a symlink out of the repo; m4/configure/Makefile text that decodes and evaluates; a gradle wrapper jar changed with no new distributionSha256Sum. Misses text-encoded or prefixed payloads, other folders.

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 TestedWarns Warns on an agent's file writes and at turn endBuild →
  • Cursor TestedWarns Warns on an agent's file writes and at turn endBuild →
  • Codex TestedWarns Warns 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 TestedWarns Warns 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 TestedWarns Warns 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

Warns

A commit adds an archive under testdata/ with a .txt name (roadmap xz-in-testdata, the signature is what counts).

Allowed

A person commits a binary fixture together with an allowlist entry holding its path and sha256.

Both examples are this policy's own test cases.

What it misses

This policy does not state what it misses.

Latest change

0.0.5 · · Fix for Windows (IR-F45; tests in test_opaque_blob_nofollow.py). Reading a working-tree file no longer names os.O_NOFOLLOW, which Windows lacks, so the gate no longer faults on every in-scope change there. Where the flag is missing a symlink is still refused: the check before the open stops it. Behaviour elsewhere is unchanged.