One-line gate for wildcard IAM grants in scripts and code (.sh, .bash, .ps1, .ts, .java, .cs, .go), comments skipped: wildcard action or principal, service wildcards, inverted Allow, admin policies, GCP owner or public members, k8s wildcards, Azure Owner. JSON, YAML, Terraform, ARM, Bicep and k8s files are iam-policy-scan's; install both. Friction, not a boundary: grants split across lines, partial wildcards and runtime-built grants pass. Escape: the pragma in the gate message, on the line.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Block Wildcard Iam?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/open-coder-ai-block-wildcard-iam)
---
name: block-wildcard-iam
description: "One-line gate for wildcard IAM grants in scripts and code (.sh, .bash, .ps1, .ts, .java, .cs, .go), comments skipped: wildcard action or principal, service wildcards, inverted Allow, admin policies, GCP owner or public members, k8s wildcards, Azure Owner. JSON, YAML, Terraform, ARM, Bicep and k8s files are iam-policy-scan's; install both. Friction, not a boundary: grants split across lines, partial wildcards and runtime-built grants pass. Escape: the pragma in the gate message, on the line."
metadata:
chock.artifact: hook
chock.enforcement: block
chock.coverage_without_chock: advisory
---
# Block Wildcard IAM Grants
One-line gate for wildcard IAM grants in scripts and code (.sh, .bash, .ps1, .ts, .java, .cs, .go), comments skipped: wildcard action or principal, service wildcards, inverted Allow, admin policies, GCP owner or public members, k8s wildcards, Azure Owner. JSON, YAML, Terraform, ARM, Bicep and k8s files are iam-policy-scan's; install both. Friction, not a boundary: grants split across lines, partial wildcards and runtime-built grants pass. Escape: the pragma in the gate message, on the line.
```
on(commit|tool_use): block(content_regex) paths=*.sh|*.bash|*.ps1|*.ts|*.java|*.cs|*.go scan=added_lines allowlist_pragma=pragma:\s*allowlist\s+broad-privilege content_pattern(regex)
Broad privilege grant detected. Name the actions and resources the task needs (no wildcard action, resource or principal, no whole-service wildcard, no admin managed policy, owner role, public member or cluster-admin binding), or a person adds 'pragma: allowlist broad-privilege' on the same line for a reviewed exception (in the agent it counts only when that exact line is already committed in HEAD, so an agent asks a person). Strict JSON cannot carry the pragma; narrow the grant, or keep that document in Terraform/YAML.
```
This skill is advisory: the client reading it has no mechanism to enforce it. The same policy compiled by `chock` blocks at commit, on an agent's file writes and at turn end. See https://github.com/open-coder-ai/chock