Reads IAM, RBAC and role documents whole (JSON, YAML, Terraform, ARM, Bicep, k8s). Refuses Action star, an inverted key, a service wildcard or iam:PassRole on every resource; AdministratorAccess; public trust; cluster-admin; subscription Owner; GCP owner/editor; Azure role Actions star. Asks for writes on every resource, cross-account trust. Only added grants. Misses computed grants, partial wildcards, outside variables, k8s escalate/bind/anonymous, secret reads. Waiver: pragma or sidecar.
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 Iam Policy Scan?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/open-coder-ai-iam-policy-scan)
---
name: iam-policy-scan
description: "Reads IAM, RBAC and role documents whole (JSON, YAML, Terraform, ARM, Bicep, k8s). Refuses Action star, an inverted key, a service wildcard or iam:PassRole on every resource; AdministratorAccess; public trust; cluster-admin; subscription Owner; GCP owner/editor; Azure role Actions star. Asks for writes on every resource, cross-account trust. Only added grants. Misses computed grants, partial wildcards, outside variables, k8s escalate/bind/anonymous, secret reads. Waiver: pragma or sidecar."
metadata:
chock.artifact: hook
chock.enforcement: block
chock.coverage_without_chock: advisory
---
# IAM Policy Scan
Reads IAM, RBAC and role documents whole (JSON, YAML, Terraform, ARM, Bicep, k8s). Refuses Action star, an inverted key, a service wildcard or iam:PassRole on every resource; AdministratorAccess; public trust; cluster-admin; subscription Owner; GCP owner/editor; Azure role Actions star. Asks for writes on every resource, cross-account trust. Only added grants. Misses computed grants, partial wildcards, outside variables, k8s escalate/bind/anonymous, secret reads. Waiver: pragma or sidecar.
```
on(commit|tool_use): block(script) script=iam-policy-scan-gate.py
Broad IAM, RBAC or role grant added. Name the actions, resources and principals the task needs: no Action star, no service wildcard or iam:PassRole on every resource, no write actions on every resource, no AdministratorAccess attached, no Allow with NotAction, NotResource or NotPrincipal, no public principal without a Condition, no cluster-admin binding, no GCP roles/owner or roles/editor, no Azure role with Actions star, no Owner or Contributor at subscription scope. A reviewed exception is a person's: a pragma comment 'pragma: allowlist broad-privilege' beside the grant (YAML, Terraform, Bicep), or an entry in .chock/iam-policy-scan.json for strict JSON, which cannot carry a comment. In the agent a waiver counts only once a person has committed it, so an agent asks a person.
```
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