iam-least-privilege-advisor
Analyzes AWS IAM policies to identify over-permissive grants — wildcard actions, wildcard resources, privilege-escalation actions (PassRole, AssumeRole), inverse wildcards (NotAction/NotResource), and condition-key bypasses — then provides least-privilege remediation. Use when reviewing IAM policies, checking for wildcard or escalation permissions, auditing role or user privileges, or tightening access control scope.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-24
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- iam-least-privilege-advisor
- license
- Apache-2.0
- metadata
- { "tags": "iam, security, least-privilege, policy-analysis, privilege-escalation", "phase": "2", "author": "Jacky Chan — AWS Community Builder", "domain": "aws-cloudops", "family": "Security", "version": "0.3.0", "keywords": "IAM, least privilege, policy analysis, wildcard permissions, privilege escalation, over-permissive, IAM audit, PassRole, AssumeRole, NotAction, NotResource, condition bypass, policy remediation", "complexity": "high", "entry_point": "false", "when_to_use": "Reviewing an IAM policy document (inline or managed), auditing a role or user before production deployment, checking for wildcard or escalation permissions, tightening access-control scope, or scoping down a policy derived from CloudTrail activity.", "requires_llm": "true", "verdict_shape": "OVERPERMISSIVE | LEAST_PRIVILEGE | AMBIGUOUS", "supports_pipeline": "true" }
- description
- Analyzes AWS IAM policies to identify over-permissive grants — wildcard actions, wildcard resources, privilege-escalation actions (PassRole, AssumeRole), inverse wildcards (NotAction/NotResource), and condition-key bypasses — then provides least-privilege remediation. Use when reviewing IAM policies, checking for wildcard or escalation permissions, auditing role or user privileges, or tightening access control scope.
- compatibility
- Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf). No AWS CLI required for offline policy-document classification. Live-account audits use aws iam simulate-principal-policy and aws cloudtrail lookup-events (AWS CLI v2, SSO or key-based credentials).
02 资源文件 17
- 参考文档eval/test-cases.yaml3.8 KB
- 参考文档evals/baselines/admin-wildcard.md900 B
- 参考文档evals/baselines/s3-get-wildcard-scoped-resource.md736 B
- 参考文档evals/baselines/s3-poweruser-wildcard-resource.md648 B
- 参考文档evals/baselines/s3-readonly-scoped.md557 B
- 参考文档evals/baselines/sts-assume-role-scoped.md832 B
- 参考文档evals/eval_config.yaml1.8 KB
- 参考文档evals/evals.json4.2 KB
- 参考文档evals/prompts/admin-wildcard.md379 B
- 参考文档evals/prompts/s3-get-wildcard-scoped-resource.md686 B
- 参考文档evals/prompts/s3-poweruser-wildcard-resource.md414 B
- 参考文档evals/prompts/s3-readonly-scoped.md524 B
- 参考文档evals/prompts/sts-assume-role-scoped.md551 B
- 参考文档examples/end-to-end.md3.7 KB
- 参考文档references/advanced-patterns.md8.4 KB
- 参考文档references/policy-analysis-guide.md7.7 KB
- 参考文档skill.usf.yaml3.8 KB
03 SKILL.md 正文
IAM Least-Privilege Advisor
Activation
Activate this skill when the user provides an IAM policy document (JSON), references a role/user/group policy for review, or asks whether a policy is safe, least-privilege, or over-permissive. Trigger phrases: "review this policy", "is this least privilege?", "check my IAM policy", "tighten these permissions", "audit this role", "scan for wildcard permissions", "is this policy secure?".
Mindset
Classify IAM policy documents against least-privilege principles and provide specific remediation. The goal is not just "avoid wildcards" — it is to identify the blast radius of every statement: what could a principal with this policy actually do, and could an attacker chain these permissions for privilege escalation?
A policy with s3:GetObject on one bucket has a narrow blast radius. A policy
with iam:PassRole on "*" has a catastrophic blast radius even though
neither the action nor the resource is "*". The classification must catch
both obvious wildcards and subtle escalation paths.
Quick reference
If the policy has Action: "*" on Resource: "*" or a service wildcard on
"*", it is OVERPERMISSIVE. If it uses NotAction/NotResource, it is
OVERPERMISSIVE. If it grants iam:PassRole or sts:AssumeRole on "*", it
is OVERPERMISSIVE. Named actions on specific ARNs are LEAST_PRIVILEGE. See
the steps below for edge cases (conditions, resource scope, exceptions).
Process — Classification logic (apply in order)
Step 0: Validate input and policy version
If the policy document is not valid JSON (malformed syntax, trailing commas, unquoted keys, YAML where JSON is expected), output:
POLICY: <name>
VERDICT: ERROR
REASON: Policy document is not valid JSON — cannot parse statements.
REMEDIATION: Validate the policy JSON with a linter or aws iam simulate-custom-policy --policy-input-list.
Do not attempt classification on malformed input. Additionally, check the
Version field: if it is "2008-10-17" (the legacy version), flag it —
policy variables like ${aws:username} silently fail to resolve, and
several condition operators are unsupported. The correct version is
"2012-10-17". A policy with the wrong version may behave differently
than its text suggests, making classification unreliable.
Step 1: Separate Deny from Allow (with overlap resolution)
If a statement has Effect: Deny, it narrows effective permissions — it
never grants access. Deny statements are security controls. Exclude Deny
statements from the verdict — they can only reduce the policy's blast
radius, never increase it. However, if a Deny statement uses NotAction or
NotResource, append a DENY_FLAG note to the REMEDIATION field:
DENY_FLAG: Statement <N> uses NotAction/NotResource in a Deny — this denies
all actions/resources except those listed, which may break workloads
silently. Review whether the deny is intentionally broad.
Allow/Deny overlap resolution: when the same action+resource pair appears
in both an Allow and a Deny statement within the same policy, the Deny
always wins regardless of statement order or Sid. This is the IAM
evaluation rule: explicit Deny takes absolute precedence. For classification,
do NOT let the presence of a Deny "cancel" an over-permissive Allow for a
different action+resource — only the exact overlapping pair is denied. A
policy that Allows s3:* on * and Denies s3:DeleteBucket on a specific
bucket is still OVERPERMISSIVE for every other S3 action and resource.
Cross-policy overlap: if a permissions boundary or SCP denies the action, the effective permission is denied even though the identity-based policy allows it. However, classify the identity-based policy on its own text — a boundary can be removed, so the identity policy's blast radius is the classification truth. Note the boundary presence in REMEDIATION.
Step 2: Admin wildcard — maximum blast radius
If a statement has Effect: Allow with Action: "*" AND Resource: "*",
the policy is OVERPERMISSIVE with CRITICAL risk. This grants every
action on every resource in the account — equivalent to
AdministratorAccess.
Step 3: Service-level wildcards on all resources
If a statement has Effect: Allow with any wildcard action (e.g., s3:*,
ec2:*, s3:Get*, iam:List*) AND Resource: "*", the policy is
OVERPERMISSIVE with HIGH risk — no scope restriction on either axis.
A generic service wildcard (e.g., s3:*, ec2:*) is HIGH, NOT CRITICAL —
only the privilege-escalation-service wildcards (Step 5) escalate to CRITICAL.
Risk-level mapping (emit exactly one RISK per statement, derived from VERDICT):
OVERPERMISSIVE+ admin wildcard (Action: "*"Resource: "*") → CRITICALOVERPERMISSIVE+ privilege-escalation-service wildcard (Step 5 list) → CRITICALOVERPERMISSIVE+ any other service wildcard onResource: "*"→ HIGHAMBIGUOUS→ MODERATE (access is conditionally restricted — bounded exposure)LEAST_PRIVILEGE→ LOW
Severity escalation: If the wildcard action is on a privilege-escalation service, escalate risk to CRITICAL:
iam:*— full IAM control; can create users, roles, policies, and attach them to any principal.sts:*— can assume any role in the account or cross-account if the trust policy allows.kms:*— can decrypt any ciphertext, modify key policies, schedule key deletion. KMS is a data-access multiplier because most encrypted data flows through it.secretsmanager:*— can read every secret in the vault.ssm:*— can read all Parameter StoreSecureStringvalues (often credentials stored outside Secrets Manager).lambda:*— can create functions with any execution role when combined withiam:PassRole.cloudformation:*— can create stacks that instantiate any AWS resource with any passed role, bypassing the principal's own policy.
Step 4: Inverse wildcards (NotAction / NotResource)
If a statement uses NotAction or NotResource, classify as
OVERPERMISSIVE regardless of what actions or resources are listed.
NotAction grants every action EXCEPT the listed ones — when AWS ships a
new API for that service, it is automatically included in the grant.
NotResource similarly grants access to all resources except those
explicitly excluded. These are inverse wildcards and are almost always a
misconfiguration or a debugging shortcut left in production.
Step 5: Privilege-escalation actions on wildcard resources
If a statement grants any of these specific actions with Resource: "*"
(even without wildcard actions), classify as OVERPERMISSIVE. These
actions enable privilege escalation by design — a principal can use them to
gain permissions beyond their own policy:
iam:PassRoleon"*"— the single most common privesc vector. Allows passing any role to EC2, Lambda, CloudFormation, or any service that accepts a role ARN. The passed role's permissions then execute under that service's identity, not the caller's.sts:AssumeRoleon"*"— allows assuming any role in the account.iam:CreatePolicy/iam:CreatePolicyVersionon"*"— can create arbitrary permission documents and attach them to any principal.iam:AttachRolePolicy/iam:PutRolePolicyon"*"— can attach any managed policy or inject an inline policy into any role.iam:UpdateAssumeRolePolicyon"*"— can modify the trust policy of any role, allowing arbitrary principals to assume it.iam:CreateServiceLinkedRoleon"*"— frequently overlooked. Creates a service-linked role that grants the linked service permissions to act on the caller's behalf (e.g.,AWSServiceRoleForEC2Spotgrants Spot Fleet access). The principal effectively delegates escalated permissions to the service, bypassing their own policy limits.
Step 6: Wildcard actions scoped to specific resources
If a statement has Effect: Allow with wildcard actions (e.g., s3:Get*,
s3:List*) but scoped to specific concrete ARNs, the policy is
AMBIGUOUS. Wildcard action patterns on narrow resources are often
acceptable for read-only workloads, but AWS adds new APIs over time —
s3:Get* silently included s3:GetObjectTorrent, and any future Get*
action is automatically granted.
Step 7: Evaluate Condition keys for bypass paths
If an Allow statement includes a Condition block, check whether the
condition actually restricts access or creates a bypass. See the
Condition-key bypass catalog in the Expert edge cases section for the
full list with exploitation mechanics. Quick checklist:
aws:SourceIpcontaining0.0.0.0/0— equivalent to no IP restriction.ForAllValues:StringEquals— evaluates true when request has zero matching values (absent-key bypass).Nulloperator with"false"— means "key must be ABSENT".StringLikewithout*anchors — exact match, but with unanchored wildcards like${aws:username}, user-controlled values may match unintended resources.
Statements with bypass-prone conditions classify as AMBIGUOUS at best.
Step 8: Check resource ARN scope
If the resource ARN uses a partition wildcard (arn:aws-*:), it spans all
partitions — commercial, AWS GovCloud (US), and AWS China. If it uses a
broad pattern like arn:aws:s3:::*, it includes every S3 bucket globally,
not just the caller's account. These classify as OVERPERMISSIVE even
when the action is explicitly named — the resource scope is effectively
unconstrained.
Step 9: Specific named actions on specific resources (LEAST_PRIVILEGE)
If all Allow statements have specific named actions (no wildcards, no
NotAction) AND specific resource ARNs (no "*", no NotResource), the
policy is LEAST_PRIVILEGE.
Legitimate Resource: "*" exception: Some AWS actions only support
Resource: "*" by design and do NOT break LEAST_PRIVILEGE when paired with
explicitly named actions:
s3:ListAllMyBuckets,s3:HeadBucketiam:ListRoles,iam:ListUsers,iam:GetAccountSummaryec2:Describe*(describe operations — resource-level permissions optional)organizations:DescribeOrganization,organizations:ListAccountscloudwatch:GetMetricStatistics,logs:DescribeLogGroups,sts:GetCallerIdentity
These are safe as long as the action is explicitly named, not a service
wildcard like ec2:*.
Step 10: IAM policy size check
After classification, verify the policy's serialized JSON size against IAM limits:
- Managed policy: 6,144 characters max
- Inline policy: 10,240 characters max
- Managed policy versions: 10 versions max (oldest auto-deleted)
If the policy exceeds the limit, append a SIZE_WARNING to the REMEDIATION field regardless of verdict:
SIZE_WARNING: Policy is <N> characters, exceeding the <managed|inline> limit
of <limit>. Split into multiple statements scoped by service or resource
group. Use AWS IAM Access Analyzer policy generation to produce a compressed
form. If derived from CloudTrail, partition by service prefix.
Step 11: Aggregation
When a policy contains multiple statements, the policy-level verdict is the worst verdict across all Allow statements, where OVERPERMISSIVE is worse than AMBIGUOUS and AMBIGUOUS is worse than LEAST_PRIVILEGE.
Output format (per policy)
POLICY: <name>
VERDICT: OVERPERMISSIVE | LEAST_PRIVILEGE | AMBIGUOUS
REASON: <1-2 sentences citing the specific statement and config>
RISK: CRITICAL | HIGH | MODERATE | LOW
REMEDIATION: <specific action, or "None required" if least-privilege>
Multi-statement aggregation example
A policy with two statements — one tight, one broad:
POLICY: mixed-policy
VERDICT: OVERPERMISSIVE
REASON: Statement 1 (s3:GetObject on arn:aws:s3:::app-data-prod/*) is LEAST_PRIVILEGE, but Statement 2 (iam:PassRole on "*") is OVERPERMISSIVE (privilege escalation). Policy verdict is the worst statement.
RISK: CRITICAL
REMEDIATION: Restrict iam:PassRole in Statement 2 to the specific role ARN the workload needs (e.g., arn:aws:iam::123456789012:role/app-execution-role).
Expert edge cases
These patterns represent genuine, non-obvious IAM attack surface that a senior security engineer would catch but a generalist would miss.
Moved verbatim → references/advanced-patterns.md § "Expert edge cases". Load when: S3 dual-ARNs, iam:PassedToService scoping, aws:ResourceAccount, tag-mutation bypass, kms:Decrypt on "*", the condition-key bypass catalog, MFA interaction, PassRole variants, trust-policy abuse.
Effective permissions context
The classification logic above evaluates a single identity-based policy document in isolation. In production, AWS computes effective permissions by intersecting multiple policy layers in this evaluation order:
- Explicit Deny in ANY policy (identity, resource-based, SCP, permissions boundary, session policy) → request is DENIED. Deny wins everywhere.
- Permissions boundary (if attached to the role) → if the boundary does not allow the action, request is DENIED. A boundary caps the maximum effective permissions regardless of what the identity-based policy grants.
- Service Control Policy (SCP) (if the account is in an Organization) → SCPs set the maximum permissions for the account. An Allow in an SCP does nothing; only a Deny restricts.
- Session policy (if the role was assumed with a session policy) → the effective permissions are the INTERSECTION of the role's policy and the session policy.
- Identity-based policy Allow → grants access if no above layer denied.
- Resource-based policy (S3 bucket policy, KMS key policy, SQS policy,
Lambda function policy):
- Same-account access: EITHER the identity-based OR the resource-based policy can grant access (union). A principal with no identity-based policy can still access a resource if the resource-based policy allows it.
- Cross-account access: BOTH the identity-based AND the resource-based policy must allow access (intersection).
Cross-account resource-based policy decision branch: When evaluating a resource-based policy (e.g., S3 bucket policy):
- If
Principal: "*"with no condition → OVERPERMISSIVE (any AWS account principal can access, limited only by the caller's identity-based policy, which the resource owner does not control). - If
Principal: "*"withaws:SourceAccountoraws:SourceArncondition → AMBIGUOUS (scoped to a specific account/ARN, but the resource owner depends on the caller's account configuration). - If
Principalis a specific ARN → evaluate the action/resource scope as normal for LEAST_PRIVILEGE / OVERPERMISSIVE. - For same-account resource-based policies with
Principal: "*": AMBIGUOUS — the blast radius is wider than the identity-based policy alone suggests (any principal in the account can access without their own Allow).
Classification implication: Always classify the identity-based policy on its own text. Note the presence of resource-based policies and boundaries in the REMEDIATION field — they affect effective permissions but do not change the classification of the policy document under review.
Anti-Patterns — NEVER
-
NEVER classify
Action: "*", Resource: "*"as anything other than OVERPERMISSIVE. This grants administrative access to every service and resource — the most dangerous pattern in AWS IAM. -
NEVER classify a service wildcard on
Resource: "*"(e.g.,s3:*on"*") as LEAST_PRIVILEGE. The resource wildcard means every bucket, every object, every setting; the action wildcard adds deletion and configuration changes. -
NEVER treat
NotActionorNotResourceas a scoped grant. These are inverse wildcards that grant everything except the listed values. New AWS APIs are automatically included. -
NEVER assume a policy is safe because the role name sounds harmless (e.g., "ReadOnlyRole", "app-service-role"). Role names are human labels; always verify the policy document.
-
NEVER recommend managed policies (
AdministratorAccess,PowerUserAccess,AmazonS3FullAccess) as remediation. They reintroduce the exact blast radius being constrained.PowerUserAccessgrants full access to every service except IAM — still effectively admin-level. -
NEVER ignore
Conditionkeys usingForAllValues— this operator evaluates true when the request contains zero matching values, creating a bypass when the attribute is absent from the request. -
NEVER treat
iam:PassRoleon"*"as safe. This is the most common privilege-escalation vector — it lets a principal pass any role to any service, executing under the passed role's permissions. -
NEVER classify a policy as OVERPERMISSIVE based on its
Effect: Denystatements. Deny statements only restrict; they cannot grant access. -
NEVER accept
aws:SourceIpwith0.0.0.0/0as a real condition — it is the CIDR for the entire internet and provides zero restriction. -
NEVER trust
aws:ResourceTagconditions as a hard boundary when the principal hastag:TagResourcesor a broad service wildcard that includes tagging (e.g.,ec2:*). The principal can self-tag resources to satisfy the condition and bypass the ABAC boundary. -
NEVER use
aws:PrincipalArnwith a wildcard pattern in a role trust policy. This allows any principal matching the pattern (potentially any account) to assume the role. Always use exact ARNs. -
NEVER assume a
StringLikecondition without explicit*anchors is safe against injection. If the matched value is user-controlled (e.g.,${aws:username}expanded into a resource ARN), a username containing path separators or wildcards can cause unintended matches. -
NEVER assume a scoped policy fits within IAM limits without checking. Inline policies are capped at 10,240 characters; managed policies at 6,144 characters; a maximum of 10 versions per managed policy. A policy derived from CloudTrail with hundreds of unique actions may exceed these limits — split across multiple statements or policies.
-
NEVER trust
iam:simulate-principal-policyresults blindly for cross-service scenarios. The simulator tests individual actions in isolation and may report a permission as denied when the workload uses a chained API flow (e.g.,lambda:InvokeFunctioncallings3:GetObjectunder the function's role). Always cross-reference simulator results with actual CloudTrail activity. -
NEVER treat
kms:DecryptonResource: "*"as a minor issue. It is a silent data-exfiltration multiplier — any encrypted resource in the account becomes readable if the ciphertext is accessible. -
NEVER overlook
iam:CreateServiceLinkedRoleas a privilege-escalation vector. It delegates permissions to the linked service, which may exceed the principal's own policy limits.
Remediation guidance
CloudTrail-derived least-privilege workflow
Moved verbatim → references/policy-analysis-guide.md § "CloudTrail-derived least-privilege workflow". Load when: generating a scoped policy from 90 days of CloudTrail activity (extract actions/ARNs, implicit calls, service-list exceptions, validate, monitor).
For OVERPERMISSIVE policies
- Replace wildcard actions with specific named actions derived from CloudTrail (workflow above).
- Replace
Resource: "*"with the specific ARN(s) the workload accesses. - For privilege-escalation actions (
iam:PassRole,sts:AssumeRole): restrict to the minimum role ARN the workload needs — never leave on"*". Addiam:PassedToServiceto constrain which service can receive the role. - For
NotAction/NotResource: convert to explicitActionandResourceallow-lists. - For partition wildcards (
arn:aws-*:): pin toarn:aws:for the partition the workload operates in. - For
kms:Decrypton"*": scope to specific key ARNs and addaws:ResourceAccountto prevent cross-account decryption.
For AMBIGUOUS policies
- Expand wildcard patterns to explicit named actions (e.g., replace
s3:Get*with the specifics3:GetObject,s3:GetObjectVersion). - Review Condition keys for bypass paths (Step 7, Condition-key bypass catalog).
- Validate that the resource ARN scope matches the workload boundary.
- For tag-based conditions: verify the principal does NOT have tagging
permissions on the same resources, or add an explicit Deny on
tag:TagResources.
For LEAST_PRIVILEGE policies
- No remediation required.
- Confirm the policy is attached only to the intended principal.
- Verify a permissions boundary is set on the role if the account has a broad SCP — the boundary caps the maximum effective permissions.
For policies exceeding IAM size limits
- Split by service prefix (e.g., all
s3:*actions in one statement, allec2:*in another). - Use customer-managed policies instead of inline (larger size limit).
- Factor common action+resource pairs into a reusable managed policy.
- If the policy is CloudTrail-derived, partition by event source.
Recent AWS features (2024-2026)
Moved verbatim → references/advanced-patterns.md § "Recent AWS features". Load when: cross-referencing unused-access findings, Identity Center permission sets, or the new aws:SourceOrgID / aws:CalledVia condition keys.
References
See references/policy-analysis-guide.md for the wildcard pattern reference
table, common over-permissive patterns found in the wild, and the
remediation tool reference.
References (load on demand)
- references/advanced-patterns.md — expert edge cases (S3 dual-ARN, PassedToService, ResourceAccount, tag-mutation bypass, kms:Decrypt on "*", condition-key bypass catalog, MFA interaction, PassRole variants, trust-policy abuse) and recent AWS features
- references/policy-analysis-guide.md — wildcard pattern tables, escalation taxonomy, condition bypass reference, wild-found patterns, remediation tools; now also holds the CloudTrail-derived least-privilege workflow moved from SKILL.md
Domain
AWS CloudOps / IAM Security & Compliance.
AWS documentation
- AWS IAM User Guide — https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html
- IAM Security Best Practices — https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
- IAM API Reference — https://docs.aws.amazon.com/IAM/latest/APIReference/
- IAM CLI Reference — https://docs.aws.amazon.com/cli/latest/reference/iam/
- IAM Access Analyzer policy validation — https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-validation.html
04 同仓库更多 Skills
xray-tracing-deployer
Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL / method / service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry / ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS / EKS / Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.
wellarchitected-workload-auditor
Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.
wellarchitected-review-operator
Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer / get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.
wafv2-web-acl-deployer
Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB/API Gateway/CloudFront, or configuring CAPTCHA/Challenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.
wafv2-web-acl-auditor
Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow/bypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.
waf-rule-deployer
Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.