Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    IAM Least-Privilege & K8s RBAC Auditor

    1

    Eliminate AWS/GCP wildcard admin policies, PassRole privilege-escalation chains, public Trust Policies, and Kubernetes cluster-admin bindings—with a read-only policy auditor and SOC 2-ready diffs.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    IAM Least-Privilege & K8s RBAC Auditor

    IAM Least-Privilege & K8s RBAC Auditor

    Example session with this skill installed

    Audit our AWS Terraform IAM (iam.tf, policy.json) and EKS RBAC manifests (k8s-rbac.yaml) for privilege-escalation paths before our SOC 2 audit. Show least-privilege replacements before editing any files.

    • Read your context and instructions
    • Compiled the iam least-privilege

    IAM Least-Privilege & K8s RBAC Blast-Radius Report

    Blast-Radius Risk Tier: CRITICAL ·

    Least-Privilege Score: 0 / 100 (Grade F) ·

    Findings: 9 Critical · 4 High · 1 Medium

    RuleSeverityLocationEscalation / Blast-Radius RiskLeast-Privilege Replacement
    IAM-AWS-002Criticalpolicy.json:14iam:PassRole + lambda:CreateFunction on Resource: "*" allows full account takeoverScope PassRole to specific execution role ARN + iam:PassedToService condition
    IAM-AWS-003Criticaliam.tf:22Trust policy uses Principal: { AWS: "*" } without aws:SourceAccountRestrict to exact AWS account ARN + sts:ExternalId
    IAM-K8S-001Criticalk8s-rbac.yaml:8ClusterRoleBinding grants cluster-admin to payments-saReplace with namespace-scoped Role + RoleBinding
    IAM-K8S-003Highk8s-rbac.yaml:31Cluster-wide get/list/watch on secrets without resourceNamesRestrict to namespace Role with explicit resourceNames: ["payments-db"]

    Least-Privilege Kubernetes RBAC Replacement (Preview)

    apiVersion: rbac.authorization.k8s.io/v1
    kind: Role
    metadata:
      name: payments-secret-reader
      namespace: payments
    rules:
      - apiGroups: [""]
        resources: ["secrets"]
        resourceNames: ["payments-db"]
        verbs: ["get"]
    

    Next Steps (Approval Required)

    Reply

    "Apply least-privilege IAM & RBAC diffs" to harden iam.tf, policy.json, and k8s-rbac.yaml (lifting score from

    0/100 CRITICAL to

    100/100 LOW).

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Shrink Your Cloud & Kubernetes Blast Radius Before SOC 2 or an Incident

    Most cloud breaches don't start with zero-days—they start with Action: "*", iam:PassRole escalation paths, overly broad Trust Policies, or cluster-admin Kubernetes bindings. IAM Least-Privilege & K8s RBAC Auditor combines a strictly read-only Python static analyzer (scripts/audit_iam_rbac.py) with senior AWS, GCP, and Kubernetes RBAC hardening guides to flag escalation chains and generate minimal least-privilege replacements.

    What It Detects (10 Cloud IAM & K8s RBAC Rules)

    • AWS & Terraform IAM (IAM-AWS-001–005):
      • Full wildcard admin policies (Action: "*" + Resource: "*") & AdministratorAccess on workload roles
      • Privilege-escalation action chains (iam:PassRole + ec2:RunInstances/lambda:CreateFunction/ecs:RunTask, or iam:CreatePolicyVersion/AttachRolePolicy/PutRolePolicy on *)
      • Public/confused-deputy Trust Policies (Principal: "*" without ExternalId / aws:SourceAccount)
      • Service wildcards (s3:*, iam:*, kms:*, secretsmanager:*) on Resource: "*" and static aws_iam_access_key users vs OIDC
    • GCP IAM (IAM-GCP-001): Primitive roles/owner / roles/editor bindings and allUsers/allAuthenticatedUsers exposure.
    • Kubernetes RBAC (IAM-K8S-001–004): cluster-admin bindings on app ServiceAccounts, wildcard * verbs/resources or escalate/bind/impersonate, broad secrets read access without resourceNames or pods/exec, and pods missing automountServiceAccountToken: false.

    How to Use

    Ask your AI agent in any Terraform, AWS IAM, or Kubernetes repository:

    • "Audit our Terraform IAM policies and EKS RBAC YAML for privilege-escalation paths ahead of SOC 2."
    • "Replace our wildcard s3:* and cluster-admin bindings with least-privilege policies."

    Or invoke the read-only analyzer directly:

    python3 scripts/audit_iam_rbac.py --path . --format markdown
    

    What's Inside (16 Files)

    • SKILL.md — Deterministic 5-step least-privilege review with LOW/MEDIUM/HIGH/CRITICAL Blast-Radius Risk Tier & A–F grade
    • scripts/audit_iam_rbac.py — Pure Python 3 stdlib analyzer for AWS JSON, Terraform HCL & multi-doc K8s YAML (--fail-on CI gate)
    • references/ — AWS privilege-escalation path catalog, Kubernetes RBAC hardening guide, and complete 10-rule catalog
    • templates/ & examples/ — Blast-radius audit report, least-privilege policy diff template, and worked AWS + EKS SOC 2 audit
    • tests/ — Overprivileged & least-privilege IAM/RBAC fixtures + runnable unit tests

    Security & Privacy Guarantee

    • 100% read-only & offline — never calls AWS/GCP/K8s APIs; skips .env*, *.tfstate*, *.tfvars*, *.key, *.pem, and kubeconfig.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Static policy analysis of AWS IAM JSON, Terraform HCL, and Kubernetes RBAC YAML; does not simulate live AWS IAM Policy Simulator evaluations or inspect runtime cluster roles.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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 2 days ago

    Software
    Python 3.9+ (stdlib only)

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Bundled analyzer is 100% offline and read-only; skips .env, .tfstate, .tfvars, .key, .pem, and kubeconfig files. Write Files is only used after explicit user approval.

    Listed2 days ago

    What's inside

    Frequently Asked Questions

    The auditor scans AWS/GCP IAM (JSON and Terraform HCL) and Kubernetes RBAC manifests (Roles, ClusterRoles, and ServiceAccounts) for privilege escalation and overly broad permissions.

    No, this is a deterministic static analyzer that operates entirely on your local IaC and manifest files; it does not require live API keys or access to your cloud environment.

    The skill identifies complex escalation chains, such as iam:PassRole abuse or K8s pods/exec flaws, which generic prompts often miss or hallucinate, and provides structured, syntax-valid patches.

    The skill generates a deterministic Blast-Radius Grade (A-F) and a zero-outage rollout plan with ready-to-apply code diffs for AWS JSON, Terraform, and K8s YAML.

    This skill is designed for AI agents with file-system access (like AutoGPT, Open Interpreter, or custom LangChain agents) and requires a Python 3 environment to run the bundled analyzer.

    The auditor is a static tool, meaning it cannot detect runtime-only anomalies or identity usage patterns found in CloudTrail or GCP IAM Recommender logs.

    New in Security