Block Wildcard IAM Grants
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
38 of 38 pass
In a git repo
At commit
What it does
Pre-commit gate for the mechanizable slice of ASI03, one line at a time, in IaC, config, policy and CDK files, comments skipped: a wildcard action or principal (a bare Resource star is iam-policy-scan's), any quote style (JSON, YAML, Terraform, CDK, escaped JSON), whole-service wildcards on s3, iam, sts, kms and ec2 actions, Allow with an inverted key, administrator, power-user and IAM-admin managed policies, GCP owner and editor roles and public members, Kubernetes RBAC wildcards and cluster-admin, Azure wildcard actions and Owner. Only a one-line strict-JSON AWS Deny is exempt. Friction, not a security boundary: grants split across lines (iam-policy-scan reads those), partial wildcards, unlisted services and roles, YAML aliases or tags and runtime-built grants pass; other Deny forms and admission-webhook wildcards are refused. Escape: 'pragma: allowlist broad-privilege' on the same line, honoured at commit; at agent tool-use only when that exact line is already committed in HEAD. Use iam-policy-scan.
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 staged IAM policy document grants Action star.
Allowed
A staged IAM document grants a scoped action on a named resource.
Both examples are this policy's own test cases.
What it misses
This policy does not state what it misses.
Latest change
0.1.6 · · Status production -> draft (owner decision 2026-11-15, CAT-S1; review record discovery/2026-11-15-review-container-iam-ci-policies.md). Measured after 0.1.5: catches 12 of 24 and refuses 7 of 26 correct cases, a line gate that cannot see the Deny, condition or HEAD beside a grant; use iam-policy-scan, which catches 19 of 24 and refuses 2 of 26. No rule, script or eval changed.