Chock.sh Build your plugin

Lockfile Integrity

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

65 of 65 pass

In a git repo

At commit

What it does

Script gate (commit, agent write, CI) over npm, yarn, pnpm, bun, poetry, uv, Pipfile, Cargo, go.sum, Gemfile, composer and NuGet locks. Blocks: source off the registry list or not https, missing hash, hash changed for a locked version, unpinned git source, unreadable lock. Asks: SHA-1-only hash, transitive install script, lock or manifest moved alone, go.sum lines removed, lock ignored or deleted. Judges what a change adds. Friction, not a security boundary.

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 end. Where its description says it asks, it refuses at both points, because this client cannot prompt at either pointBuild →
  • Codex TestedBlocks 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)Build →
  • GitHub Copilot TestedBlocks 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)Build →
  • Devin TestedBlocks 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)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

Allowed

A commit bumps left-pad to 1.3.1 in package.json and the lock, with a registry URL and sha512.

Both examples are this policy's own test cases.

What it misses

This policy does not state what it misses.

Latest change

0.0.3 · · Hardening (SR-2d2d): at push and ci the registry host allowlist is the one at the range base, not the one the change under judgement carries: the pull request's base branch (GITHUB_BASE_REF read as origin/<name>), else the before commit of the push event, else the first parent; a root commit has no base, so only the default registries count. A named base that does not resolve, or a shallow checkout with no parent, is a fault (exit 2), never an allow. ci now raises lock-allowlist-edited for a change that carries the allowlist, as tool use and agent-commit do; push does not. The finding message now reads for both writers. Tests: test_lockfile_integrity_sr2d2.py. No eval case can drive this: replay has no range base to name.