{
  "schema_version": 1,
  "id": "java-security",
  "track": "coding",
  "name": "Java Security Rules",
  "version": "0.7.2",
  "sha256": "228117950c4d4c0c0a2f2b95135df1ec1ca80f63fb89fa9831842ad9b3d316fa",
  "sha256_v1": "763ef5a9ff2ecae6e25dbb66e66d038a55314e30c53a3a2f29eeb3aff40b06ea",
  "keyword": "block",
  "word": "blocks",
  "says": "blocks on an agent's file writes and at turn end",
  "description": "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.",
  "misses": null,
  "where": [
    "write",
    "turn-end"
  ],
  "groups": [],
  "eval_cases": 177,
  "eval_executed": 167,
  "latest": {
    "version": "0.7.2",
    "date": "2026-11-17",
    "change": "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."
  },
  "agent_labels": {
    "claude-code": {
      "keyword": "block",
      "says": "blocks on an agent's file writes and at turn end"
    },
    "cursor": {
      "keyword": "block",
      "says": "blocks on an agent's file writes and at turn end"
    },
    "codex": {
      "keyword": "block",
      "says": "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)"
    },
    "copilot": {
      "keyword": "block",
      "says": "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)"
    },
    "devin": {
      "keyword": "block",
      "says": "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)"
    },
    "grok": {
      "keyword": "ungraded",
      "says": "Not graded yet for Grok"
    },
    "goose": {
      "keyword": "ungraded",
      "says": "Not graded yet for goose"
    },
    "antigravity": {
      "keyword": "ungraded",
      "says": "Not graded yet for Antigravity"
    },
    "openhands": {
      "keyword": "ungraded",
      "says": "Not graded yet for OpenHands"
    },
    "kimi-code": {
      "keyword": "ungraded",
      "says": "Not graded yet for Kimi Code"
    },
    "factory-droid": {
      "keyword": "ungraded",
      "says": "Not graded yet for Factory Droid"
    }
  },
  "source_url": "https://github.com/open-coder-ai/chock-catalog/tree/e3d71d03e4dd32377ad5bc19fb6bacdfe6607ea4/base/java-security",
  "enforces": "enforced-at-commit",
  "examples": [
    {
      "word": "Refused",
      "prompt": "A MyBatis mapper orders by a column taken from the request, written as ORDER BY ${col}.",
      "command": null
    },
    {
      "word": "Allowed",
      "prompt": "A MyBatis mapper binds a parameter as WHERE id =",
      "command": null
    }
  ]
}
