{
  "schema_version": 1,
  "id": "block-unsafe-code-execution",
  "track": "coding",
  "name": "Block Unsafe Code Execution",
  "version": "0.1.4",
  "sha256": "ca147837cb1e6ad168af80a2e19a8fb53f7ce6d19a11183f656243a774526c75",
  "sha256_v1": "55f5b035e12d6c8492f8065b8572e6ef7002d03ef6a6d2d16fda77b47c2be3d9",
  "keyword": "block",
  "word": "blocks",
  "says": "blocks on an agent's file writes and at turn end",
  "description": "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).",
  "misses": null,
  "where": [
    "write",
    "turn-end"
  ],
  "groups": [
    "code-hardening"
  ],
  "eval_cases": 54,
  "eval_executed": 54,
  "latest": {
    "version": "0.1.4",
    "date": "2026-11-17",
    "change": "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."
  },
  "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/agentic-security/block-unsafe-code-execution",
  "enforces": "enforced-at-commit",
  "examples": [
    {
      "word": "Refused",
      "prompt": "A staged file passes model output to the Python eval builtin.",
      "command": null
    },
    {
      "word": "Allowed",
      "prompt": "A staged file calls model.eval() to switch a torch module to inference mode.",
      "command": null
    }
  ]
}
