Chock.sh Build your plugin

Policies

Block Wildcard IAM Grants

Block Wildcard IAM Grants: what it does, its label on each agent, what it misses, and examples.

Catalog policy block-wildcard-iam, version 0.1.3, labelled blocks on Claude Code.

What it does

Pre-commit gate for the mechanizable slice of ASI03, one line at a time: a wildcard action, resource or principal in string or list form, 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 statement 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.

On each agent

AgentLabelWhat it does there
Claude CodeBlocksBlocks on an agent's file writes and at turn end
CursorBlocksBlocks on an agent's file writes and at turn end
CodexBlocksBlocks 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)
GitHub CopilotBlocksBlocks 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)
DevinBlocksBlocks 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)
GrokNot gradedNot graded yet for Grok
gooseNot gradedNot graded yet for goose
AntigravityNot gradedNot graded yet for Antigravity
OpenHandsNot gradedNot graded yet for OpenHands
Kimi CodeNot gradedNot graded yet for Kimi Code
Factory DroidNot gradedNot graded yet for Factory Droid

What it misses

This policy does not state what it misses.

Examples from its eval suite

Refused: A staged IAM policy document grants Action star.

Allowed: A staged IAM document grants a scoped action on a named resource.

More

Built from engine 5a4b6287a46e and catalog 1e60d211c1bb.