一键导入
iam-review
Review IAM roles, policies, and trust relationships in a CloudFormation template for least-privilege compliance
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review IAM roles, policies, and trust relationships in a CloudFormation template for least-privilege compliance
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate a monthly capacity and cost report for a service or AWS account, with rightsizing recommendations
Explain what a CloudFormation template does in plain English, including architecture, costs, and access patterns
Review a CloudFormation template for security issues, cost risks, and compliance violations
Assess the blast radius and deployment risk of changes to a CloudFormation template
Generate a rough monthly cost estimate for a CloudFormation template or proposed architecture
Detect and summarise CloudFormation stack drift — differences between deployed resources and their template definitions
| name | iam-review |
| description | Review IAM roles, policies, and trust relationships in a CloudFormation template for least-privilege compliance |
Review all IAM resources in the currently open CloudFormation template or IAM policy document.
First, list every IAM resource in the template:
| Logical ID | Type | Purpose |
|---|---|---|
| ... | AWS::IAM::Role | ... |
| ... | AWS::IAM::Policy | ... |
| ... | AWS::IAM::ManagedPolicy | ... |
For each AWS::IAM::Role, evaluate:
"*")?PermissionsBoundary present? (Required by org policy)OrgPermissionBoundary?Purpose: [what this role is for, inferred from context]
Trust analysis:
[service/account/federated]Permission analysis:
| Statement | Actions | Resources | Risk |
|---|---|---|---|
| Allow s3 access | s3:GetObject, s3:PutObject | arn:aws:s3:::my-bucket/* | LOW — scoped correctly |
| Allow SSM | ssm:GetParameters | arn:aws:ssm:*:*:parameter/* | MEDIUM — resource not scoped |
Issues:
Recommended changes:
# Show the corrected IAM statement(s)
| Role | Permission boundary | Wildcard resources | Wildcard actions | Overall risk |
|---|---|---|---|---|
| AppTaskRole | PRESENT | No | No | LOW |
| DeployRole | MISSING | Yes | No | HIGH |
Check if any combination of allowed actions could let this role escalate its own privileges:
Dangerous combinations:
iam:CreateRole + iam:AttachRolePolicy → can create admin roleiam:PassRole with broad resource → can pass a more-privileged rolests:AssumeRole with Resource: "*" → can assume any role it can reachFlag any escalation paths found.
Map findings to relevant OWASP Cloud Security Top 10 items: