Chock.sh Build your plugin
Blocksv0.7.2

Java Security Rules

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

167 of 177 pass

In a git repo

At commit

What it does

Trigger: writing Java or Kotlin (Spring, Jakarta EE, Quarkus, Android), SQL/JPA/MyBatis, templates, application.properties/.yml, web.xml, pom.xml, Gradle; "customize java security" opens the guided page. avoid: injection, XXE, SSRF, unsafe deserialization, path traversal, weak crypto, trust-all TLS, Spring Security off, exposed secrets, known-exploited deps, SpotBugs/Sonar/PMD/Checkstyle findings. 129 rules, 16 packs, each allow|deny|ask in .chock/security.json; absent = deny (quality: allow). Not production-grade: try it under rollout: observe first.

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 MyBatis mapper orders by a column taken from the request, written as ORDER BY ${col}.

Allowed

A MyBatis mapper binds a parameter as WHERE id =

Both examples are this policy's own test cases.

What it misses

This policy does not state what it misses.

Latest change

0.7.2 · · Description only (CAT-S1; review record discovery/2026-11-15-review-java-security.md): the label says this is a draft, to be tried under rollout: observe first. Status stays draft; no rule, script or eval changed.