Works with the AI Agents you already use
AWS IAM Policy Security Audit
by CashonlyTian
Security misconfigurations in AWS IAM are the leading cause of account takeovers.
$7
AWS IAM Policy Security Audit
Example session with this skill installed
Audit the IAM policies in the ./infrastructure/iam folder for the 'billing-service' project. Use #232f3e as the accent color.
- Read your context and instructions
- Compiled the aws iam policy
The scan of the billing-service project is complete. I found 34 findings across 4 policy documents, resulting in a CRITICAL risk level.
IAM Security Audit: billing-service
Total Score: 16/100 (Grade: F)
Risk level: CRITICAL
Findings: 34 total — 7 critical, 10 high, 13 medium, 4 low
| Severity | Count |
|---|---|
| Critical | 7 |
| High | 10 |
| Medium | 13 |
| Low | 4 |
Top 3 Fixes:
- Restrict Wildcard Actions: Change
iam:*to specific list actions inadmin-policy.json. - Add ExternalId: Update the trust relationship in
cross-account-role.jsonto require ansts:ExternalId. - Scope S3 Resources: Replace
Resource: *with specific bucket ARNs for alls3:Get*actions.
Next steps
- Open
scan-report.mdto see the exact line numbers for all 34 findings. - View the generated score-card PNG for a visual summary of the risk distribution.
- Apply the suggested fixes and re-run the audit to reach a passing score (>60).
Clean project check: demo-project-clean
The scan of the clean demo project is complete — no findings.
Total Score: 100/100 (Grade: A)
Risk level: LOW
Findings: 0
Connects securely to your tools. The creator never sees your data.
About this skill
Security misconfigurations in AWS IAM are the leading cause of account takeovers. Relying on manual reviews or generic linters often misses complex privilege escalation paths and weak trust relationships. This skill provides a rigorous security audit for IAM policy documents before they are ever attached to a principal.
What it does
- Detects privilege escalation identifies dangerous combinations like
PassRolewithRunInstancesorCreateFunction. - Audits trust policies flags open principals and ensures third-party accounts use an
ExternalIdwith conditions. - Scans for wildcards catches over-permissive
*actions and resources that grant unintended admin-level access. - Validates conditions checks for weak or missing MFA requirements, insecure source IP ranges, and broad
StringLikepatterns. - Ensures policy hygiene enforces the
2012-10-17version, unique Sids, and the 6,144-character managed policy limit.
How it works
- Target selection provide the local directory containing your JSON IAM policies or Terraform files.
- Local execution the skill runs a Python-based scanner that parses documents and heredoc blocks without calling any AWS APIs.
- Report generation it produces a markdown report with findings sorted by severity and a 1024x1024 PNG score-card.
- Remediation use the prioritized fix list to address critical vulnerabilities and re-run the scan to verify the new score.
Frameworks & tools
The scanner works with raw JSON policy documents and Terraform (.tf) files containing policy heredocs. It is built in Python and runs locally to ensure no sensitive policy data ever leaves your environment.
Why this beats prompting it yourself
Generic LLM prompts often miss the 10 specific security checks required for a 0-100 score. This skill uses a systematic scoring engine that guarantees every check, from escalation paths to character limits, is applied consistently across all files.
Use cases
- Reviewing IAM policies generated by other AI agents before deployment.
- Auditing third-party project repositories during security onboarding.
- Generating shareable security score-cards for client reports or PRs.
- Continuous local verification of IaC policy blocks in CI pipelines.
Known limitations
Does not call AWS APIs, so it cannot verify if deployed policies match local files. It audits documents individually and cannot detect escalation paths split across multiple separate policies.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Audits files only, not live AWS state. Cannot detect escalation across multiple separate policy documents. Does not resolve Terraform jsonencode blocks or HCL interpolations.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
- Software
Python 3Pillow