[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A94ZATVA5X0XF4FP29P8EV":3,"skill-same:01M7A94ZATVA5X0XF4FP29P8EV":147},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M7A94ZATVA5X0XF4FP29P8EV","inspector2-automation-automator",null,"Designs and deploys Amazon Inspector v2 automation workflows — enabling Inspector across EC2, ECR, and Lambda resources; EventBridge routing for finding events; severity-based auto- remediation (Critical = patch via SSM Automation, High = notify with Slack\u002Femail); ECR image scan on push integration; Lambda code scan finding handling; finding suppression for accepted risks; Inspector to Security Hub finding forwarding; multi-account via Organizations delegated admin; patch baseline association for OS-level remediation; SSM Automation runbook design for OS patching; container image rebuild trigger via CodeBuild; finding lifecycle (open\u002Fsuppressed\u002Fclosed) and SLA enforcement. Emits AUTOMATION_DEPLOYED with a workflow template (CLI or CloudFormation) or REVIEW_REQUIRED with the specific gap. Use when building Inspector-driven remediation, wiring SSM patch baselines to Inspector findings, configuring ECR rescan, or forwarding Inspector findings to Security Hub.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: inspector2-automation-automator\ndescription: Designs and deploys Amazon Inspector v2 automation workflows — enabling Inspector across EC2, ECR, and Lambda resources; EventBridge routing for finding events; severity-based auto- remediation (Critical = patch via SSM Automation, High = notify with Slack\u002Femail); ECR image scan on push integration; Lambda code scan finding handling; finding suppression for accepted risks; Inspector to Security Hub finding forwarding; multi-account via Organizations delegated admin; patch baseline association for OS-level remediation; SSM Automation runbook design for OS patching; container image rebuild trigger via CodeBuild; finding lifecycle (open\u002Fsuppressed\u002Fclosed) and SLA enforcement. Emits AUTOMATION_DEPLOYED with a workflow template (CLI or CloudFormation) or REVIEW_REQUIRED with the specific gap. Use when building Inspector-driven remediation, wiring SSM patch baselines to Inspector findings, configuring ECR rescan, or forwarding Inspector findings to Security Hub.\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline workflow design. Live deployment uses aws inspector2 enable, list-findings, list-coverage, aws ssm create-document, start-automation-execution, create-patch-baseline, aws events put-rule, put-targets, aws securityhub batch-import-findings, aws ecr put-image-scanning-configuration, start-image-scan, and aws codebuild start-build — AWS CLI v2, SSO or key-based credentials.\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '4'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Security\n  task_type: automate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\n  when_to_use: Designing Inspector v2 automation, wiring SSM Automation runbooks to Inspector findings, building severity-based remediation (Critical=patch, High=notify), configuring ECR image scan on push, handling Lambda code scan findings, forwarding Inspector findings to Security Hub, building multi-account Inspector via Organizations delegated admin, configuring patch baseline associations, or suppressing accepted-risk findings.\n  activation_triggers: automate Inspector finding, Inspector v2 remediation, ECR image scan on push, Lambda code scan finding, Inspector to Security Hub, severity-based remediation, SSM patch baseline for Inspector, Inspector delegated admin, Inspector finding suppression, container image rebuild, Inspector EventBridge, Critical finding auto-patch\n  invocation_schema: 'Input: either (a) an Inspector finding or finding type (e.g., CVE-2026-1234 on i-0abc123, or \"all Critical findings in prod-OU\"), OR (b) an automation requirement (\"auto-patch Critical Inspector findings, notify on High\"). Output: deterministic REMEDIATION block per finding class — FINDING\u002FSEVERITY\u002FDETECTION\u002FRESPONSE\u002FSSM_RUNBOOK\u002FVERIFICATION\u002F VERDICT — where VERDICT is AUTOMATION_DEPLOYED (workflow template ready) or REVIEW_REQUIRED (specific gap cited).'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: Amazon Inspector, Inspector v2, Inspector2, vulnerability scanning, ECR image scan, Lambda code scan, EventBridge finding, SSM patch baseline, SSM Automation runbook, Security Hub, delegated admin, finding suppression, finding lifecycle, severity-based remediation, container rebuild, patch remediation\n  tags: amazon-inspector, security-automation, ssm-patch, security-hub, eventbridge, automate\n---\n\n# Inspector2 Automation Automator\n\n## Mindset\n\n**One-line takeaway:** every Inspector automation is a five-stage\npipeline — **enable** (Inspector coverage across EC2\u002FECR\u002FLambda) →\n**detect** (finding emitted, EventBridge routes it) → **triage**\n(severity + resource context determines response) → **remediate**\n(SSM Automation patch, container rebuild, or notify) → **verify**\n(finding transitions to CLOSED, Security Hub reflects the fix). A gap\nin ANY stage produces silent exposure: the CVE is found, but the\nLambda function never gets rebuilt, or the patch runs but the\nfinding stays OPEN because the instance was never rescanned.\n\n→ Extended Mindset bullets moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Enable Inspector across EC2 \u002F ECR \u002F Lambda | Step 2 |\n| Pick severity-based response | Step 4 (severity matrix) |\n| Wire EventBridge rule for findings | Step 5 |\n| Build SSM patch baseline for OS findings | Step 6 |\n| SSM Automation runbook for patching | Step 7 |\n| ECR image scan on push + rebuild trigger | Step 8 |\n| Lambda code scan finding handling | Step 9 |\n| Inspector to Security Hub forwarding | Step 10 |\n| Finding suppression for accepted risks | Step 11 |\n| Multi-account via delegated admin | Step 12 |\n| Finding lifecycle and SLA enforcement | Step 13 |\n| Patch baseline association to instance | Step 14 |\n| Avoid common automation pitfalls | Anti-Patterns |\n| Recent features (rescan, code scan) | Recent AWS features |\n\n## Critical rules at a glance (do NOT bury these)\n\n1. **Inspector ECR scans are PUSH-TIME, not continuous.** A scanned\n   image stays \"scanned\" until a NEW image is pushed. New CVEs\n   discovered tomorrow are NOT detected for images pushed today\n   until a manual rescan runs. Wire a scheduled rescan via\n   `start-image-scan` for production-critical repositories.\n2. **Lambda code scans are STATIC analysis at deploy time, NOT\n   runtime.** They detect vulnerable dependency versions in the\n   deployment package. They do NOT detect runtime behavior, RCE\n   exploitation, or supply-chain attacks against the function's\n   runtime. Pair with CloudTrail and GuardDuty for runtime coverage.\n3. **SSM patch baseline + maintenance window is the canonical\n   remediation path for EC2 OS findings.** SSM Automation runbook\n   `AWS-RunPatchBaseline` with `Operation: Install` applies\n   patches; the runbook does NOT reboot by default (set\n   `RebootOption: RebootIfNeeded`).\n4. **Inspector findings have a 7-day SUPPRESSION window by default\n   before re-alerting.** Suppressing a finding marks it\n   `SUPPRESSED` but does NOT close it. The finding re-opens after\n   the suppression expires unless explicitly closed.\n5. **Security Hub finding ingestion from Inspector has ~5 minute\n   propagation latency.** A \"patched\" Inspector finding may remain\n   `OPEN` in Security Hub for several minutes. Verify with\n   `securityhub get-findings` filtered by `AwsAccountId` and\n   `GeneratorId` before declaring the workflow complete.\n\n## Pre-flight: data requirements\n\nDesigning an Inspector automation requires these inputs:\n\n| Input | Source | Why |\n|---|---|---|\n| Inspector coverage | `inspector2 list-coverage` | Confirm EC2\u002FECR\u002FLambda enabled |\n| Delegated admin status | `inspector2 list-delegated-admin-accounts` | Multi-account routing |\n| Finding type \u002F sample finding ARN | `inspector2 list-findings` | Concrete workflow design |\n| Resource type targeted | `finding.Resources[0].Type` | Drives remediation strategy |\n| Severity distribution | `inspector2 list-findings --filter-criteria severity=...` | Triage priority |\n| ECR repos + scan frequency | `ecr describe-image-scan-findings`, `put-image-scanning-configuration` | Continuous scan gap analysis |\n| SSM agent health on EC2 | `ssm describe-instance-information` | Patch baseline can't run on unmanaged instances |\n| Existing patch baselines | `ssm describe-patch-baselines` | Avoid duplicates |\n| Security Hub integration | `inspector2 batch-get-configuration` → `SecurityHubStatus` | Forwarding status |\n\n**If the input is malformed** (missing finding type, ambiguous\ntarget resource), emit:\n\n```text\nFINDING: \u003Creference>\nVERDICT: ERROR\nREASON: Cannot design Inspector automation — finding type and target resource are required inputs.\nGAP: Re-supply the Inspector finding ARN or finding type plus target resource identifier (instance ID, ECR repo+tag, Lambda function ARN).\n```\n\n## Process — Workflow design (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Inspector behaviors\n\nThese behaviors change the workflow design if ignored:\n\n→ Step-0 expert-knowledge deep dive moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n### Step 1: Classify the finding source\n\nFor each Inspector finding, classify the source:\n\n| Source class | Resource type | Example finding | Notes |\n|---|---|---|---|\n| EC2 OS package | `AwsEc2Instance` | CVE-2026-1234 on `openssl` | Best fit for SSM patch baseline |\n| ECR container image | `AwsEcrContainerImage` | CVE in base image `amazonlinux:2` | Rebuild trigger, not patch |\n| Lambda function code | `AwsLambdaFunction` | Vulnerable dependency in package | Function update required |\n| Network reachability | `AwsEc2Instance` | Open SSH to internet | Security group fix (not patch) |\n| Secret detection | `AwsLambdaFunction` \u002F `AwsEcrContainerImage` | Hardcoded credential | Code fix required |\n\nIf the source is ECR, the remediation is \"rebuild the image\" not\n\"patch in place.\" Mark this in the workflow design.\n\n### Step 2: Enable Inspector (EC2 \u002F ECR \u002F Lambda)\n\n→ Inspector enable + delegated-admin CLI moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Common pitfall:** the delegated admin account must be a member of\nthe Organization, and Inspector must be enabled in the management\naccount first. A standalone delegated admin call fails silently.\n\n### Step 3: Map the resource type to a remediation strategy\n\n| Resource type | Finding class | Strategy |\n|---|---|---|\n| `AwsEc2Instance` | OS package CVE | SSM `AWS-RunPatchBaseline` (Step 6-7) |\n| `AwsEc2Instance` | Network reachability | Custom SSM doc to revoke SG rule (manual trigger) |\n| `AwsEcrContainerImage` | Container CVE | Trigger CodeBuild rebuild from patched base (Step 8) |\n| `AwsLambdaFunction` | Dependency CVE | Update function code with patched package (Step 9) |\n| `AwsLambdaFunction` | Secret in code | Code review + secret removal (manual trigger) |\n\n**If no automated remediation exists** for the finding class (e.g.,\nnetwork reachability finding on a production security group), the\nverdict tilts toward REVIEW_REQUIRED until the custom SSM document\nor manual procedure is built.\n\n### Step 4: Decide severity-based response (the severity matrix)\n\n| Severity | SLA | Response | Automation |\n|---|---|---|---|\n| `Critical` | 24 hours | Auto-patch via SSM within 4 hours of detection | EventBridge → SSM `AWS-RunPatchBaseline` |\n| `High` | 7 days | Notify via Slack\u002Femail within 1 day; queue for next patch window | EventBridge → Lambda → Slack |\n| `Medium` | 30 days | Roll into monthly maintenance window | Cron → SSM |\n| `Low` | 90 days | Triage at quarterly review | Report only |\n\n**Decision rule:** default to **automatic patching for Critical**\nonly after the SSM patch baseline has been validated in non-prod.\nHigh\u002FMedium\u002FLow should always require human review before patching\nin production.\n\n### Step 5: Wire EventBridge rule for findings\n\n→ EventBridge rule wiring + triage Lambda handler moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n### Step 6: SSM patch baseline for OS findings\n\n→ SSM patch baseline creation CLI + gotchas moved verbatim to [references\u002Fssm-patch-baselines.md](references\u002Fssm-patch-baselines.md).\n\n### Step 7: SSM Automation runbook for patching\n\n→ SSM Automation patch runbook moved verbatim to [references\u002Fssm-patch-baselines.md](references\u002Fssm-patch-baselines.md).\n\n### Step 8: ECR image scan on push + rebuild trigger\n\n→ ECR scan-on-push, rescan, rebuild-trigger implementation moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n### Step 9: Lambda code scan finding handling\n\nLambda findings require function code update — there is no in-place\npatch. The workflow:\n\n→ Lambda code-scan finding handler moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Lambda finding gotchas:**\n- Code scan findings are NOT auto-remediable via SSM.\n- The fix requires the function's CI\u002FCD pipeline to update the\n  dependency version.\n- Suppression is the only \"non-fix\" option (Step 11).\n\n### Step 10: Inspector to Security Hub forwarding\n\n→ Security Hub forwarding enable\u002Fverify CLI moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Integration rules:**\n- Closing an Inspector finding closes the Security Hub finding\n  (within 5 minutes).\n- Suppressing an Inspector finding sets the Security Hub finding\n  workflow status to `SUPPRESSED`.\n- Inspector-generated Security Hub findings have\n  `ProductArn: arn:aws:securityhub:\u003Cregion>::product\u002Faws\u002Finspector`.\n\n### Step 11: Finding suppression for accepted risks\n\nFor findings on resources where remediation is not feasible (e.g.,\nlegacy system with no patch available):\n\n→ Finding suppression CLI moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Suppression rules:**\n- Suppressed findings stay in Inspector with `status: SUPPRESSED`.\n- They are excluded from default finding queries.\n- They re-open if the finding changes (e.g., new evidence).\n- Document suppression rationale in `suppressionReason` for audit.\n\n→ Automated suppression Lambda moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n### Step 12: Multi-account via delegated admin\n\n→ Multi-account delegated-admin CLI moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Multi-account gotchas:**\n- Member accounts cannot disable Inspector once the delegated admin\n  has enabled it.\n- The delegated admin account is the only place to view aggregated\n  findings.\n- Security Hub aggregated findings follow the Security Hub\n  delegated admin (which may be a different account from the\n  Inspector delegated admin).\n\n### Step 13: Finding lifecycle and SLA enforcement\n\nInspector finding lifecycle:\n\n```\nOPEN → (auto-resolved or patched) → CLOSED\nOPEN → (suppressed for accepted risk) → SUPPRESSED → (re-opens if finding changes) → OPEN\n```\n\nSLA enforcement via scheduled Lambda:\n\n→ SLA enforcement Lambda moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n### Step 14: Patch baseline association to instances\n\n→ Patch-group tagging + baseline association CLI moved verbatim to [references\u002Fssm-patch-baselines.md](references\u002Fssm-patch-baselines.md).\n\n**Patch group gotchas:**\n- An instance can be in only one patch group per OS.\n- The patch group maps to a baseline via `register-patch-baseline-for-patches`.\n- Removing the tag detaches the instance from the baseline.\n\n## Output format\n\n```text\nFINDING: \u003Creference>\nSEVERITY: \u003CCRITICAL | HIGH | MEDIUM | LOW>\nDETECTION:\n  - Source: \u003Caws.inspector2 via EventBridge>\n  - Resource: \u003Ctype + identifier>\n  - CVE: \u003Cid + package>\nRESPONSE:\n  - Action: \u003CSSM patch | CodeBuild rebuild | Lambda update | notify>\n  - SLA: \u003Cdays>\n  - Automation: EventBridge → SSM | Lambda → CodeBuild\nSSM_RUNBOOK: \u003CAWS-RunPatchBaseline | custom document>\nVERIFICATION:\n  - Rescan: aws inspector2 list-findings --filter-criteria status=OPEN\n  - Security Hub: aws securityhub get-findings --filter-criteria RecordState=ACTIVE\nMULTI_ACCOUNT: \u003Csingle | delegated-admin>\nVERDICT: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\nGAP: \u003Cif REVIEW_REQUIRED, the specific missing piece>\nTEMPLATE: \u003CCLI snippet or YAML for the workflow>\n```\n\n### Worked example — AUTOMATION_DEPLOYED, Critical EC2 CVE auto-patch\n\n```text\nFINDING: ec2-critical-cve-patch\nSEVERITY: CRITICAL\nDETECTION:\n  - Source: aws.inspector2 via EventBridge (rule inspector-critical-auto-patch)\n  - Resource: AWS_EC2_INSTANCE i-0abc123def456\n  - CVE: CVE-2026-1234 on openssl (CVSS 9.8)\nRESPONSE:\n  - Action: SSM patch via AWS-RunPatchBaseline\n  - SLA: 24 hours (4-hour automation window)\n  - Automation: EventBridge → SSM start-automation-execution\nSSM_RUNBOOK: AWS-RunPatchBaseline with Operation=Install, RebootOption=RebootIfNeeded\nVERIFICATION:\n  - Rescan: aws inspector2 list-findings --filter-criteria findingArn=...\n  - Security Hub: aws securityhub get-findings --filter-criteria GeneratorId=aws-inspector\nMULTI_ACCOUNT: single (111111111111)\nVERDICT: AUTOMATION_DEPLOYED\nGAP: None\nTEMPLATE:\n  aws events put-rule --name inspector-critical-auto-patch --event-pattern '{\"source\":[\"aws.inspector2\"],\"detail-type\":[\"Inspector Finding\"],\"detail\":{\"severity\":[\"CRITICAL\"],\"status\":[\"OPEN\"]}}'\n  aws ssm start-automation-execution --document-name AWS-RunPatchBaseline --parameters '{\"InstanceId\":[\"i-0abc123def456\"],\"Operation\":[\"Install\"],\"RebootOption\":[\"RebootIfNeeded\"]}' --mode Auto\n```\n\n### Worked example — REVIEW_REQUIRED, missing delegated admin\n\n→ Secondary worked example moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\n\n## Anti-Patterns — NEVER do these things\n\n- NEVER auto-patch Critical Inspector findings in production\n  without first validating the patch baseline in non-prod. A\n  misconfigured baseline can apply a bad kernel patch that\n  bricks the instance. Always run a 1-week soak in non-prod first.\n\n- NEVER assume ECR image scan results are continuous. A scanned\n  image stays \"clean\" forever in the Inspector dashboard unless\n  explicitly rescanned. Wire a weekly scheduled rescan via\n  EventBridge → Lambda → `start-image-scan` for production repos.\n\n- NEVER confuse Lambda code scan findings with runtime findings.\n  Lambda code scans are static analysis on the deployment package.\n  They do NOT detect runtime exploitation. Pair with CloudTrail +\n  GuardDuty for runtime coverage.\n\n- NEVER suppress findings without documenting the rationale in\n  `suppressionReason`. A finding suppressed silently is invisible\n  in default queries; the next operator will not know why.\n\n- NEVER auto-rebuild production container images on every Critical\n  finding. A misconfigured EventBridge rule can trigger dozens of\n  concurrent CodeBuild runs, exhausting the build fleet. Rate-limit\n  via SQS buffer or step function.\n\n- NEVER rely on Inspector SSM coverage alone for EC2. Inspector\n  requires SSM agent. Instances without the agent (e.g., Bottlerocket\n  without SSM, custom AMIs) are invisible to Inspector. Wire a\n  separate Config rule for SSM agent health.\n\n- NEVER forget the SSM patch baseline `ApproveAfterDays` setting.\n  A baseline with `ApproveAfterDays: 7` will NOT patch CVEs that\n  are less than 7 days old. For Critical CVEs, use a separate\n  baseline with `ApproveAfterDays: 0`.\n\n- NEVER close Inspector findings manually. Inspector auto-closes\n  findings when the underlying vulnerability is no longer detected\n  (post-rescan). Manual close creates drift between Inspector and\n  Security Hub.\n\n- NEVER wire Security Hub as the only finding source for\n  remediation. Security Hub has ~5-minute propagation latency from\n  Inspector. For real-time automation, use the\n  `aws.inspector2` EventBridge source directly.\n\n- NEVER use Inspector severity as the sole trigger. A\n  business-context overlay (e.g., \"Critical on production\n  instance\" vs \"Critical on dev sandbox\") is required. Use the\n  Lambda triage pattern (Step 5) to add resource tags to the\n  decision.\n\n- NEVER assume the Inspector delegated admin can disable Inspector\n  in a member account. The delegated admin can ENABLE but member\n  accounts can NOT disable once the delegated admin has enabled.\n  This is a security feature, not a bug — but it confuses\n  operators expecting symmetric control.\n\n- NEVER omit the DLQ on EventBridge → Lambda for Inspector finding\n  routing. Inspector findings can fire in bursts (e.g., when a\n  popular base image CVE is published). Lambda throttling without\n  DLQ produces silent finding loss.\n\n- NEVER assume `AWS-RunPatchBaseline` patches everything. It only\n  patches packages in the configured patch baseline. Third-party\n  repos, unmanaged packages, and packages outside the baseline are\n  NOT patched. Extend the baseline or use a custom SSM document.\n\n- NEVER apply Critical patches without a snapshot. Use\n  `aws:createImage` (or `aws:backupEc2Instance`) as the first\n  step in any patch automation runbook. A bad patch without a\n  rollback snapshot is unrecoverable without a rebuild.\n\n- NEVER use the deprecated Inspector Classic APIs (`inspector`)\n  for new automation. Inspector v2 (`inspector2`) is the\n  supported API. Inspector Classic is end-of-life.\n\n- NEVER forget the SSM service role for `AWS-RunPatchBaseline`.\n  The instance's instance profile needs `AmazonSSMManagedInstanceCore`\n  plus the patching permissions. Missing profile → `ACCESS_DENIED`\n  on patch execution.\n\n- NEVER wire Inspector to SSM patching without verifying instance\n  inventory. An instance with stale SSM agent or unreachable from\n  SSM endpoints silently fails patching. The Inspector finding\n  stays OPEN indefinitely. Wire a CloudWatch alarm on\n  `SSM > InstancePatchCompliance` for stale instances.\n\n## Pre-flight safety checks (run before applying any Inspector CLI)\n\n→ Pre-flight safety checks moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n## Appendix A — Common Inspector automation patterns (summary)\n\nThe most-used automation patterns. The default for any new\nautomation should be SNS notification; escalate to SSM patching\nonly after notification alone has failed to remediate.\n\n| Pattern | Severity | Reversible | Notes |\n|---|---|---|---|\n| SNS notify only | Any | Yes | Slack\u002Femail |\n| SSM patch (EC2) | Critical | Yes (snapshot rollback) | Use `AWS-RunPatchBaseline` |\n| ECR image rebuild | Critical\u002FHigh | Yes (rollback tag) | Trigger CodeBuild |\n| Lambda function update | Critical\u002FHigh | Yes (version rollback) | CI\u002FCD pipeline required |\n| Finding suppression | Any | Yes (re-open) | Document rationale |\n| Security Hub forwarding | All | Yes | One-way Inspector → SecHub |\n| SSM patch via maintenance window | Medium | Yes | Scheduled, not event-driven |\n\nFor the full pattern catalog (input parameters, severity pairing,\nsafety profiles, and execution role requirements), see\n**references\u002Finspector2-automation-patterns.md**. Always\ncross-reference the pattern's parameter contract with your\n`start-automation-execution` or Lambda handler payload.\n\n## Appendix B — Decision tree (which automation pattern)\n\n```\nIs the finding on EC2, ECR, or Lambda?\n├─ EC2 OS package → Severity?\n│       ├─ Critical → SSM AWS-RunPatchBaseline (Step 7) with snapshot\n│       ├─ High     → Notify + queue for next maintenance window\n│       └─ Med\u002FLow  → Roll into monthly patch cycle\n├─ ECR container image → Severity?\n│       ├─ Critical\u002FHigh → Trigger CodeBuild rebuild from patched base (Step 8)\n│       └─ Med\u002FLow       → Notify repo owner; queue for next image rebuild\n└─ Lambda function → Code scan or runtime?\n        ├─ Code scan → Notify function owner (Step 9); CI\u002FCD redeploy required\n        └─ Runtime   → Not Inspector's scope; route to GuardDuty\n```\n\n## Recent AWS features (2024-2026)\n\n→ Recent AWS features catalog moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Expert heuristic: automation blast radius\n\nInspector-driven auto-patching is the highest-leverage security\ncontrol but also the highest-risk. A misconfigured patch automation\ncan apply a bad kernel patch across an entire OU within hours,\nbricking production instances with no rollback window.\n\n**The rule (non-negotiable):**\n\n> ALWAYS run Inspector-driven auto-patching in `Scan` mode for 1 week\n  in non-prod before promoting to `Install` mode. ALWAYS snapshot\n  instances before any patch automation. NEVER enable auto-patch on\n  production without a validated rollback path (AMI + CloudFormation\n  redeploy).\n\n**Why this rule exists:** Inspector findings fire in bursts (when a\npopular base image CVE is published, dozens of findings can surface\nacross an account in minutes). EventBridge → SSM automation can\npatch all of them concurrently, exceeding instance capacity for\nreboot or applying a bad patch before operators notice.\n\n→ Blast-radius scoping techniques + 3-cycle protocol + CFN pattern moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n**Surface in the output:** for any recommended automation, include\n`BLAST_RADIUS: \u003Cscope>` (e.g., `OU-wide`,\n`tag-scoped:env=prod`, `single-instance`, `single-account`) and\n`VALIDATION_STATUS: \u003Cscan-non-prod | install-non-prod | scan-prod |\ninstall-prod>`. If `VALIDATION_STATUS` is not `install-prod`, do\nNOT mark the auto-patch recommendation as deployable.\n\n## References (load on demand)\n\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked example: REVIEW_REQUIRED (missing delegated admin).\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — enable\u002Fcoverage CLI (Steps 2, 12); EventBridge wiring + triage Lambda (Step 5); ECR scan\u002Frescan\u002Frebuild (Step 8); Lambda, Security Hub, suppression and SLA handlers (Steps 9-11, 13); pre-flight safety checks.\n- [references\u002Fssm-patch-baselines.md](references\u002Fssm-patch-baselines.md) — extended: patch baseline creation, patch runbooks, patch-group tagging (Steps 6, 7, 14).\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — extended Mindset bullets; Step-0 expert knowledge; recent AWS features; blast-radius scoping techniques, 3-cycle validation protocol, CloudFormation pattern.\n\n## Domain\n\nAWS CloudOps \u002F Security Automation — Inspector-driven remediation.\n\n## AWS documentation\n\n- **Amazon Inspector** — https:\u002F\u002Fdocs.aws.amazon.com\u002Finspector\u002Flatest\u002Fuser\u002Fscaling-securing.html\n- **Inspector v2 API** — https:\u002F\u002Fdocs.aws.amazon.com\u002Finspector\u002Fv2\u002F\n- **SSM Patch Manager** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-patch.html\n- **SSM Automation Runbooks** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-ssa-docs.html\n- **Inspector + Security Hub** — https:\u002F\u002Fdocs.aws.amazon.com\u002Finspector\u002Flatest\u002Fuser\u002Fsecurityhub-integration.html\n- **ECR Image Scanning** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonECR\u002Flatest\u002Fuserguide\u002Fimage-scanning.html\n","# Inspector2 Automation Automator\n\n## Mindset\n\n**One-line takeaway:** every Inspector automation is a five-stage\npipeline — **enable** (Inspector coverage across EC2\u002FECR\u002FLambda) →\n**detect** (finding emitted, EventBridge routes it) → **triage**\n(severity + resource context determines response) → **remediate**\n(SSM Automation patch, container rebuild, or notify) → **verify**\n(finding transitions to CLOSED, Security Hub reflects the fix). A gap\nin ANY stage produces silent exposure: the CVE is found, but the\nLambda function never gets rebuilt, or the patch runs but the\nfinding stays OPEN because the instance was never rescanned.\n\n→ Extended Mindset bullets moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Enable Inspector across EC2 \u002F ECR \u002F Lambda | Step 2 |\n| Pick severity-based response | Step 4 (severity matrix) |\n| Wire EventBridge rule for findings | Step 5 |\n| Build SSM patch baseline for OS findings | Step 6 |\n| SSM Automation runbook for patching | Step 7 |\n| ECR image scan on push + rebuild trigger | Step 8 |\n| Lambda code scan finding handling | Step 9 |\n| Inspector to Security Hub forwarding | Step 10 |\n| Finding suppression for accepted risks | Step 11 |\n| Multi-account via delegated admin | Step 12 |\n| Finding lifecycle and SLA enforcement | Step 13 |\n| Patch baseline association to instance | Step 14 |\n| Avoid common automation pitfalls | Anti-Patterns |\n| Recent features (rescan, code scan) | Recent AWS features |\n\n## Critical rules at a glance (do NOT bury these)\n\n1. **Inspector ECR scans are PUSH-TIME, not continuous.** A scanned\n   image stays \"scanned\" until a NEW image is pushed. New CVEs\n   discovered tomorrow are NOT detected for images pushed today\n   until a manual rescan runs. Wire a scheduled rescan via\n   `start-image-scan` for production-critical repositories.\n2. **Lambda code scans are STATIC analysis at deploy time, NOT\n   runtime.** They detect vulnerable dependency versions in the\n   deployment package. They do NOT detect runtime behavior, RCE\n   exploitation, or supply-chain attacks against the function's\n   runtime. Pair with CloudTrail and GuardDuty for runtime coverage.\n3. **SSM patch baseline + maintenance window is the canonical\n   remediation path for EC2 OS findings.** SSM Automation runbook\n   `AWS-RunPatchBaseline` with `Operation: Install` applies\n   patches; the runbook does NOT reboot by default (set\n   `RebootOption: RebootIfNeeded`).\n4. **Inspector findings have a 7-day SUPPRESSION window by default\n   before re-alerting.** Suppressing a finding marks it\n   `SUPPRESSED` but does NOT close it. The finding re-opens after\n   the suppression expires unless explicitly closed.\n5. **Security Hub finding ingestion from Inspector has ~5 minute\n   propagation latency.** A \"patched\" Inspector finding may remain\n   `OPEN` in Security Hub for several minutes. Verify with\n   `securityhub get-findings` filtered by `AwsAccountId` and\n   `GeneratorId` before declaring the workflow complete.\n\n## Pre-flight: data requirements\n\nDesigning an Inspector automation requires these inputs:\n\n| Input | Source | Why |\n|---|---|---|\n| Inspector coverage | `inspector2 list-coverage` | Confirm EC2\u002FECR\u002FLambda enabled |\n| Delegated admin status | `inspector2 list-delegated-admin-accounts` | Multi-account routing |\n| Finding type \u002F sample finding ARN | `inspector2 list-findings` | Concrete workflow design |\n| Resource type targeted | `finding.Resources[0].Type` | Drives remediation strategy |\n| Severity distribution | `inspector2 list-findings --filter-criteria severity=...` | Triage priority |\n| ECR repos + scan frequency | `ecr describe-image-scan-findings`, `put-image-scanning-configuration` | Continuous scan gap analysis |\n| SSM agent health on EC2 | `ssm describe-instance-information` | Patch baseline can't run on unmanaged instances |\n| Existing patch baselines | `ssm describe-patch-baselines` | Avoid duplicates |\n| Security Hub integration | `inspector2 batch-get-configuration` → `SecurityHubStatus` | Forwarding status |\n\n**If the input is malformed** (missing finding type, ambiguous\ntarget resource), emit:\n\n```text\nFINDING: \u003Creference>\nVERDICT: ERROR\nREASON: Cannot design Inspector automation — finding type and target resource are required inputs.\nGAP: Re-supply the Inspector finding ARN or finding type plus target resource identifier (instance ID, ECR repo+tag, Lambda function ARN).\n```\n\n## Process — Workflow design (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Inspector behaviors\n\nThese behaviors change the workflow design if ignored:\n\n→ Step-0 expert-knowledge deep dive moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n### Step 1: Classify the finding source\n\nFor each Inspector finding, classify the source:\n\n| Source class | Resource type | Example finding | Notes |\n|---|---|---|---|\n| EC2 OS package | `AwsEc2Instance` | CVE-2026-1234 on `openssl` | Best fit for SSM patch baseline |\n| ECR container image | `AwsEcrContainerImage` | CVE in base image `amazonlinux:2` | Rebuild trigger, not patch |\n| Lambda function code | `AwsLambdaFunction` | Vulnerable dependency in package | Function update required |\n| Network reachability | `AwsEc2Instance` | Open SSH to internet | Security group fix (not patch) |\n| Secret detection | `AwsLambdaFunction` \u002F `AwsEcrContainerImage` | Hardcoded credential | Code fix required |\n\nIf the source is ECR, the remediation is \"rebuild the image\" not\n\"patch in place.\" Mark this in the workflow design.\n\n### Step 2: Enable Inspector (EC2 \u002F ECR \u002F Lambda)\n\n→ Inspector enable + delegated-admin CLI moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Common pitfall:** the delegated admin account must be a member of\nthe Organization, and Inspector must be enabled in the management\naccount first. A standalone delegated admin call fails silently.\n\n### Step 3: Map the resource type to a remediation strategy\n\n| Resource type | Finding class | Strategy |\n|---|---|---|\n| `AwsEc2Instance` | OS package CVE | SSM `AWS-RunPatchBaseline` (Step 6-7) |\n| `AwsEc2Instance` | Network reachability | Custom SSM doc to revoke SG rule (manual trigger) |\n| `AwsEcrContainerImage` | Container CVE | Trigger CodeBuild rebuild from patched base (Step 8) |\n| `AwsLambdaFunction` | Dependency CVE | Update function code with patched package (Step 9) |\n| `AwsLambdaFunction` | Secret in code | Code review + secret removal (manual trigger) |\n\n**If no automated remediation exists** for the finding class (e.g.,\nnetwork reachability finding on a production security group), the\nverdict tilts toward REVIEW_REQUIRED until the custom SSM document\nor manual procedure is built.\n\n### Step 4: Decide severity-based response (the severity matrix)\n\n| Severity | SLA | Response | Automation |\n|---|---|---|---|\n| `Critical` | 24 hours | Auto-patch via SSM within 4 hours of detection | EventBridge → SSM `AWS-RunPatchBaseline` |\n| `High` | 7 days | Notify via Slack\u002Femail within 1 day; queue for next patch window | EventBridge → Lambda → Slack |\n| `Medium` | 30 days | Roll into monthly maintenance window | Cron → SSM |\n| `Low` | 90 days | Triage at quarterly review | Report only |\n\n**Decision rule:** default to **automatic patching for Critical**\nonly after the SSM patch baseline has been validated in non-prod.\nHigh\u002FMedium\u002FLow should always require human review before patching\nin production.\n\n### Step 5: Wire EventBridge rule for findings\n\n→ EventBridge rule wiring + triage Lambda handler moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n### Step 6: SSM patch baseline for OS findings\n\n→ SSM patch baseline creation CLI + gotchas moved verbatim to [references\u002Fssm-patch-baselines.md](references\u002Fssm-patch-baselines.md).\n\n### Step 7: SSM Automation runbook for patching\n\n→ SSM Automation patch runbook moved verbatim to [references\u002Fssm-patch-baselines.md](references\u002Fssm-patch-baselines.md).\n\n### Step 8: ECR image scan on push + rebuild trigger\n\n→ ECR scan-on-push, rescan, rebuild-trigger implementation moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n### Step 9: Lambda code scan finding handling\n\nLambda findings require function code update — there is no in-place\npatch. The workflow:\n\n→ Lambda code-scan finding handler moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Lambda finding gotchas:**\n- Code scan findings are NOT auto-remediable via SSM.\n- The fix requires the function's CI\u002FCD pipeline to update the\n  dependency version.\n- Suppression is the only \"non-fix\" option (Step 11).\n\n### Step 10: Inspector to Security Hub forwarding\n\n→ Security Hub forwarding enable\u002Fverify CLI moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Integration rules:**\n- Closing an Inspector finding closes the Security Hub finding\n  (within 5 minutes).\n- Suppressing an Inspector finding sets the Security Hub finding\n  workflow status to `SUPPRESSED`.\n- Inspector-generated Security Hub findings have\n  `ProductArn: arn:aws:securityhub:\u003Cregion>::product\u002Faws\u002Finspector`.\n\n### Step 11: Finding suppression for accepted risks\n\nFor findings on resources where remediation is not feasible (e.g.,\nlegacy system with no patch available):\n\n→ Finding suppression CLI moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Suppression rules:**\n- Suppressed findings stay in Inspector with `status: SUPPRESSED`.\n- They are excluded from default finding queries.\n- They re-open if the finding changes (e.g., new evidence).\n- Document suppression rationale in `suppressionReason` for audit.\n\n→ Automated suppression Lambda moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n### Step 12: Multi-account via delegated admin\n\n→ Multi-account delegated-admin CLI moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n**Multi-account gotchas:**\n- Member accounts cannot disable Inspector once the delegated admin\n  has enabled it.\n- The delegated admin account is the only place to view aggregated\n  findings.\n- Security Hub aggregated findings follow the Security Hub\n  delegated admin (which may be a different account from the\n  Inspector delegated admin).\n\n### Step 13: Finding lifecycle and SLA enforcement\n\nInspector finding lifecycle:\n\n```\nOPEN → (auto-resolved or patched) → CLOSED\nOPEN → (suppressed for accepted risk) → SUPPRESSED → (re-opens if finding changes) → OPEN\n```\n\nSLA enforcement via scheduled Lambda:\n\n→ SLA enforcement Lambda moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n### Step 14: Patch baseline association to instances\n\n→ Patch-group tagging + baseline association CLI moved verbatim to [references\u002Fssm-patch-baselines.md](references\u002Fssm-patch-baselines.md).\n\n**Patch group gotchas:**\n- An instance can be in only one patch group per OS.\n- The patch group maps to a baseline via `register-patch-baseline-for-patches`.\n- Removing the tag detaches the instance from the baseline.\n\n## Output format\n\n```text\nFINDING: \u003Creference>\nSEVERITY: \u003CCRITICAL | HIGH | MEDIUM | LOW>\nDETECTION:\n  - Source: \u003Caws.inspector2 via EventBridge>\n  - Resource: \u003Ctype + identifier>\n  - CVE: \u003Cid + package>\nRESPONSE:\n  - Action: \u003CSSM patch | CodeBuild rebuild | Lambda update | notify>\n  - SLA: \u003Cdays>\n  - Automation: EventBridge → SSM | Lambda → CodeBuild\nSSM_RUNBOOK: \u003CAWS-RunPatchBaseline | custom document>\nVERIFICATION:\n  - Rescan: aws inspector2 list-findings --filter-criteria status=OPEN\n  - Security Hub: aws securityhub get-findings --filter-criteria RecordState=ACTIVE\nMULTI_ACCOUNT: \u003Csingle | delegated-admin>\nVERDICT: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\nGAP: \u003Cif REVIEW_REQUIRED, the specific missing piece>\nTEMPLATE: \u003CCLI snippet or YAML for the workflow>\n```\n\n### Worked example — AUTOMATION_DEPLOYED, Critical EC2 CVE auto-patch\n\n```text\nFINDING: ec2-critical-cve-patch\nSEVERITY: CRITICAL\nDETECTION:\n  - Source: aws.inspector2 via EventBridge (rule inspector-critical-auto-patch)\n  - Resource: AWS_EC2_INSTANCE i-0abc123def456\n  - CVE: CVE-2026-1234 on openssl (CVSS 9.8)\nRESPONSE:\n  - Action: SSM patch via AWS-RunPatchBaseline\n  - SLA: 24 hours (4-hour automation window)\n  - Automation: EventBridge → SSM start-automation-execution\nSSM_RUNBOOK: AWS-RunPatchBaseline with Operation=Install, RebootOption=RebootIfNeeded\nVERIFICATION:\n  - Rescan: aws inspector2 list-findings --filter-criteria findingArn=...\n  - Security Hub: aws securityhub get-findings --filter-criteria GeneratorId=aws-inspector\nMULTI_ACCOUNT: single (111111111111)\nVERDICT: AUTOMATION_DEPLOYED\nGAP: None\nTEMPLATE:\n  aws events put-rule --name inspector-critical-auto-patch --event-pattern '{\"source\":[\"aws.inspector2\"],\"detail-type\":[\"Inspector Finding\"],\"detail\":{\"severity\":[\"CRITICAL\"],\"status\":[\"OPEN\"]}}'\n  aws ssm start-automation-execution --document-name AWS-RunPatchBaseline --parameters '{\"InstanceId\":[\"i-0abc123def456\"],\"Operation\":[\"Install\"],\"RebootOption\":[\"RebootIfNeeded\"]}' --mode Auto\n```\n\n### Worked example — REVIEW_REQUIRED, missing delegated admin\n\n→ Secondary worked example moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\n\n## Anti-Patterns — NEVER do these things\n\n- NEVER auto-patch Critical Inspector findings in production\n  without first validating the patch baseline in non-prod. A\n  misconfigured baseline can apply a bad kernel patch that\n  bricks the instance. Always run a 1-week soak in non-prod first.\n\n- NEVER assume ECR image scan results are continuous. A scanned\n  image stays \"clean\" forever in the Inspector dashboard unless\n  explicitly rescanned. Wire a weekly scheduled rescan via\n  EventBridge → Lambda → `start-image-scan` for production repos.\n\n- NEVER confuse Lambda code scan findings with runtime findings.\n  Lambda code scans are static analysis on the deployment package.\n  They do NOT detect runtime exploitation. Pair with CloudTrail +\n  GuardDuty for runtime coverage.\n\n- NEVER suppress findings without documenting the rationale in\n  `suppressionReason`. A finding suppressed silently is invisible\n  in default queries; the next operator will not know why.\n\n- NEVER auto-rebuild production container images on every Critical\n  finding. A misconfigured EventBridge rule can trigger dozens of\n  concurrent CodeBuild runs, exhausting the build fleet. Rate-limit\n  via SQS buffer or step function.\n\n- NEVER rely on Inspector SSM coverage alone for EC2. Inspector\n  requires SSM agent. Instances without the agent (e.g., Bottlerocket\n  without SSM, custom AMIs) are invisible to Inspector. Wire a\n  separate Config rule for SSM agent health.\n\n- NEVER forget the SSM patch baseline `ApproveAfterDays` setting.\n  A baseline with `ApproveAfterDays: 7` will NOT patch CVEs that\n  are less than 7 days old. For Critical CVEs, use a separate\n  baseline with `ApproveAfterDays: 0`.\n\n- NEVER close Inspector findings manually. Inspector auto-closes\n  findings when the underlying vulnerability is no longer detected\n  (post-rescan). Manual close creates drift between Inspector and\n  Security Hub.\n\n- NEVER wire Security Hub as the only finding source for\n  remediation. Security Hub has ~5-minute propagation latency from\n  Inspector. For real-time automation, use the\n  `aws.inspector2` EventBridge source directly.\n\n- NEVER use Inspector severity as the sole trigger. A\n  business-context overlay (e.g., \"Critical on production\n  instance\" vs \"Critical on dev sandbox\") is required. Use the\n  Lambda triage pattern (Step 5) to add resource tags to the\n  decision.\n\n- NEVER assume the Inspector delegated admin can disable Inspector\n  in a member account. The delegated admin can ENABLE but member\n  accounts can NOT disable once the delegated admin has enabled.\n  This is a security feature, not a bug — but it confuses\n  operators expecting symmetric control.\n\n- NEVER omit the DLQ on EventBridge → Lambda for Inspector finding\n  routing. Inspector findings can fire in bursts (e.g., when a\n  popular base image CVE is published). Lambda throttling without\n  DLQ produces silent finding loss.\n\n- NEVER assume `AWS-RunPatchBaseline` patches everything. It only\n  patches packages in the configured patch baseline. Third-party\n  repos, unmanaged packages, and packages outside the baseline are\n  NOT patched. Extend the baseline or use a custom SSM document.\n\n- NEVER apply Critical patches without a snapshot. Use\n  `aws:createImage` (or `aws:backupEc2Instance`) as the first\n  step in any patch automation runbook. A bad patch without a\n  rollback snapshot is unrecoverable without a rebuild.\n\n- NEVER use the deprecated Inspector Classic APIs (`inspector`)\n  for new automation. Inspector v2 (`inspector2`) is the\n  supported API. Inspector Classic is end-of-life.\n\n- NEVER forget the SSM service role for `AWS-RunPatchBaseline`.\n  The instance's instance profile needs `AmazonSSMManagedInstanceCore`\n  plus the patching permissions. Missing profile → `ACCESS_DENIED`\n  on patch execution.\n\n- NEVER wire Inspector to SSM patching without verifying instance\n  inventory. An instance with stale SSM agent or unreachable from\n  SSM endpoints silently fails patching. The Inspector finding\n  stays OPEN indefinitely. Wire a CloudWatch alarm on\n  `SSM > InstancePatchCompliance` for stale instances.\n\n## Pre-flight safety checks (run before applying any Inspector CLI)\n\n→ Pre-flight safety checks moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\n\n## Appendix A — Common Inspector automation patterns (summary)\n\nThe most-used automation patterns. The default for any new\nautomation should be SNS notification; escalate to SSM patching\nonly after notification alone has failed to remediate.\n\n| Pattern | Severity | Reversible | Notes |\n|---|---|---|---|\n| SNS notify only | Any | Yes | Slack\u002Femail |\n| SSM patch (EC2) | Critical | Yes (snapshot rollback) | Use `AWS-RunPatchBaseline` |\n| ECR image rebuild | Critical\u002FHigh | Yes (rollback tag) | Trigger CodeBuild |\n| Lambda function update | Critical\u002FHigh | Yes (version rollback) | CI\u002FCD pipeline required |\n| Finding suppression | Any | Yes (re-open) | Document rationale |\n| Security Hub forwarding | All | Yes | One-way Inspector → SecHub |\n| SSM patch via maintenance window | Medium | Yes | Scheduled, not event-driven |\n\nFor the full pattern catalog (input parameters, severity pairing,\nsafety profiles, and execution role requirements), see\n**references\u002Finspector2-automation-patterns.md**. Always\ncross-reference the pattern's parameter contract with your\n`start-automation-execution` or Lambda handler payload.\n\n## Appendix B — Decision tree (which automation pattern)\n\n```\nIs the finding on EC2, ECR, or Lambda?\n├─ EC2 OS package → Severity?\n│       ├─ Critical → SSM AWS-RunPatchBaseline (Step 7) with snapshot\n│       ├─ High     → Notify + queue for next maintenance window\n│       └─ Med\u002FLow  → Roll into monthly patch cycle\n├─ ECR container image → Severity?\n│       ├─ Critical\u002FHigh → Trigger CodeBuild rebuild from patched base (Step 8)\n│       └─ Med\u002FLow       → Notify repo owner; queue for next image rebuild\n└─ Lambda function → Code scan or runtime?\n        ├─ Code scan → Notify function owner (Step 9); CI\u002FCD redeploy required\n        └─ Runtime   → Not Inspector's scope; route to GuardDuty\n```\n\n## Recent AWS features (2024-2026)\n\n→ Recent AWS features catalog moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Expert heuristic: automation blast radius\n\nInspector-driven auto-patching is the highest-leverage security\ncontrol but also the highest-risk. A misconfigured patch automation\ncan apply a bad kernel patch across an entire OU within hours,\nbricking production instances with no rollback window.\n\n**The rule (non-negotiable):**\n\n> ALWAYS run Inspector-driven auto-patching in `Scan` mode for 1 week\n  in non-prod before promoting to `Install` mode. ALWAYS snapshot\n  instances before any patch automation. NEVER enable auto-patch on\n  production without a validated rollback path (AMI + CloudFormation\n  redeploy).\n\n**Why this rule exists:** Inspector findings fire in bursts (when a\npopular base image CVE is published, dozens of findings can surface\nacross an account in minutes). EventBridge → SSM automation can\npatch all of them concurrently, exceeding instance capacity for\nreboot or applying a bad patch before operators notice.\n\n→ Blast-radius scoping techniques + 3-cycle protocol + CFN pattern moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n**Surface in the output:** for any recommended automation, include\n`BLAST_RADIUS: \u003Cscope>` (e.g., `OU-wide`,\n`tag-scoped:env=prod`, `single-instance`, `single-account`) and\n`VALIDATION_STATUS: \u003Cscan-non-prod | install-non-prod | scan-prod |\ninstall-prod>`. If `VALIDATION_STATUS` is not `install-prod`, do\nNOT mark the auto-patch recommendation as deployable.\n\n## References (load on demand)\n\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked example: REVIEW_REQUIRED (missing delegated admin).\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — enable\u002Fcoverage CLI (Steps 2, 12); EventBridge wiring + triage Lambda (Step 5); ECR scan\u002Frescan\u002Frebuild (Step 8); Lambda, Security Hub, suppression and SLA handlers (Steps 9-11, 13); pre-flight safety checks.\n- [references\u002Fssm-patch-baselines.md](references\u002Fssm-patch-baselines.md) — extended: patch baseline creation, patch runbooks, patch-group tagging (Steps 6, 7, 14).\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — extended Mindset bullets; Step-0 expert knowledge; recent AWS features; blast-radius scoping techniques, 3-cycle validation protocol, CloudFormation pattern.\n\n## Domain\n\nAWS CloudOps \u002F Security Automation — Inspector-driven remediation.\n\n## AWS documentation\n\n- **Amazon Inspector** — https:\u002F\u002Fdocs.aws.amazon.com\u002Finspector\u002Flatest\u002Fuser\u002Fscaling-securing.html\n- **Inspector v2 API** — https:\u002F\u002Fdocs.aws.amazon.com\u002Finspector\u002Fv2\u002F\n- **SSM Patch Manager** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-patch.html\n- **SSM Automation Runbooks** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-ssa-docs.html\n- **Inspector + Security Hub** — https:\u002F\u002Fdocs.aws.amazon.com\u002Finspector\u002Flatest\u002Fuser\u002Fsecurityhub-integration.html\n- **ECR Image Scanning** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonECR\u002Flatest\u002Fuserguide\u002Fimage-scanning.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":42},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"lifecycle_status":39,"invocation_schema":40,"supports_pipeline":37,"activation_triggers":41},"amazon-inspector, security-automation, ssm-patch, security-hub, eventbridge, automate","4","Jacky Chan — AWS Community Builder","aws-cloudops","Security","0.1.0","Amazon Inspector, Inspector v2, Inspector2, vulnerability scanning, ECR image scan, Lambda code scan, EventBridge finding, SSM patch baseline, SSM Automation runbook, Security Hub, delegated admin, finding suppression, finding lifecycle, severity-based remediation, container rebuild, patch remediation","automate","high","false","capability","Designing Inspector v2 automation, wiring SSM Automation runbooks to Inspector findings, building severity-based remediation (Critical=patch, High=notify), configuring ECR image scan on push, handling Lambda code scan findings, forwarding Inspector findings to Security Hub, building multi-account Inspector via Organizations delegated admin, configuring patch baseline associations, or suppressing accepted-risk findings.","true","AUTOMATION_DEPLOYED | REVIEW_REQUIRED","active","Input: either (a) an Inspector finding or finding type (e.g., CVE-2026-1234 on i-0abc123, or \"all Critical findings in prod-OU\"), OR (b) an automation requirement (\"auto-patch Critical Inspector findings, notify on High\"). Output: deterministic REMEDIATION block per finding class — FINDING\u002FSEVERITY\u002FDETECTION\u002FRESPONSE\u002FSSM_RUNBOOK\u002FVERIFICATION\u002F VERDICT — where VERDICT is AUTOMATION_DEPLOYED (workflow template ready) or REVIEW_REQUIRED (specific gap cited).","automate Inspector finding, Inspector v2 remediation, ECR image scan on push, Lambda code scan finding, Inspector to Security Hub, severity-based remediation, SSM patch baseline for Inspector, Inspector delegated admin, Inspector finding suppression, container image rebuild, Inspector EventBridge, Critical finding auto-patch","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline workflow design. Live deployment uses aws inspector2 enable, list-findings, list-coverage, aws ssm create-document, start-automation-execution, create-patch-baseline, aws events put-rule, put-targets, aws securityhub batch-import-findings, aws ecr put-image-scanning-configuration, start-image-scan, and aws codebuild start-build — AWS CLI v2, SSO or key-based credentials.","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Finspector2-automation-automator",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill inspector2-automation-automator",{"tool":57,"command":58},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill inspector2-automation-automator",{"tool":60,"command":61},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill inspector2-automation-automator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002FSKILL.md",true,[65,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",7313,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Feval\u002Ftest-cases.yaml",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"evals\u002Fbaselines\u002Fdelegated-admin-multiaccount.md",554,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fbaselines\u002Fdelegated-admin-multiaccount.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"evals\u002Fbaselines\u002Fec2-critical-auto-patch.md",692,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fbaselines\u002Fec2-critical-auto-patch.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"evals\u002Fbaselines\u002Fecr-image-scan-rebuild.md",485,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fbaselines\u002Fecr-image-scan-rebuild.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"evals\u002Fbaselines\u002Ffinding-suppression-accepted-risk.md",547,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fbaselines\u002Ffinding-suppression-accepted-risk.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fbaselines\u002Flambda-finding-notify.md",540,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fbaselines\u002Flambda-finding-notify.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"evals\u002Feval_config.yaml",1784,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Feval_config.yaml",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"evals\u002Fevals.json",4338,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fevals.json",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"evals\u002Fprompts\u002Fdelegated-admin-multiaccount.md",772,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fprompts\u002Fdelegated-admin-multiaccount.md",{"path":104,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":105,"sourceHtmlUrl":106},"evals\u002Fprompts\u002Fec2-critical-auto-patch.md",775,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fprompts\u002Fec2-critical-auto-patch.md",{"path":108,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":109,"sourceHtmlUrl":110},"evals\u002Fprompts\u002Fecr-image-scan-rebuild.md",753,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fprompts\u002Fecr-image-scan-rebuild.md",{"path":112,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":113,"sourceHtmlUrl":114},"evals\u002Fprompts\u002Ffinding-suppression-accepted-risk.md",820,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fprompts\u002Ffinding-suppression-accepted-risk.md",{"path":116,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":117,"sourceHtmlUrl":118},"evals\u002Fprompts\u002Flambda-finding-notify.md",730,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fevals\u002Fprompts\u002Flambda-finding-notify.md",{"path":120,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":121,"sourceHtmlUrl":122},"examples\u002Fend-to-end.md",8113,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fexamples\u002Fend-to-end.md",{"path":124,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fadvanced-patterns.md",9797,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Freferences\u002Fadvanced-patterns.md",{"path":128,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fdiagnostic-commands.md",10367,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Freferences\u002Fdiagnostic-commands.md",{"path":132,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Finspector2-automation-patterns.md",6007,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Freferences\u002Finspector2-automation-patterns.md",{"path":136,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":137,"sourceHtmlUrl":138},"references\u002Fssm-patch-baselines.md",9841,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Freferences\u002Fssm-patch-baselines.md",{"path":140,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":141,"sourceHtmlUrl":142},"references\u002Fworked-examples.md",1151,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Freferences\u002Fworked-examples.md",{"path":144,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":145,"sourceHtmlUrl":146},"skill.usf.yaml",4649,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Finspector2-automation-automator\u002Fskill.usf.yaml",[148,155,162,169,176,183],{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","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 \u002F method \u002F 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 \u002F 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 \u002F EKS \u002F 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","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 \u002F 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","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\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","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\u002Fbypass 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":189,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]