[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A7DWK5JPVF144J5Q4RBHSH":3,"skill-same:01M7A7DWK5JPVF144J5Q4RBHSH":137},{"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":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M7A7DWK5JPVF144J5Q4RBHSH","ec2-security-group-auditor",null,"Classifies each EC2 security group's inbound exposure as OPEN, PUBLIC_NONCRITICAL, or RESTRICTED (worst-case per-rule aggregation) and emits remediation mapped to CIS AWS Foundations \u002F PCI-DSS \u002F NIST SP 800-53. Invoke when: (a) pre-production SG review, (b) periodic CIS\u002FPCI-DSS compliance audit, (c) incident response involving suspected network exposure, or (d) VPC\u002Faccount security-baseline validation. Recognizes port ranges, non-TCP protocols, managed prefix lists, IPv6 sources, split-horizon CIDR pairs, and overlapping rules. Keywords: security group, SG, ec2, inbound rule, port exposure, 0.0.0.0\u002F0, CIDR audit, attack surface, compliance check, VPC security.","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\u002Fec2-security-group-auditor\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ec2-security-group-auditor\ndescription: 'Classifies each EC2 security group''s inbound exposure as OPEN, PUBLIC_NONCRITICAL, or RESTRICTED (worst-case per-rule aggregation) and emits remediation mapped to CIS AWS Foundations \u002F PCI-DSS \u002F NIST SP 800-53. Invoke when: (a) pre-production SG review, (b) periodic CIS\u002FPCI-DSS compliance audit, (c) incident response involving suspected network exposure, or (d) VPC\u002Faccount security-baseline validation. Recognizes port ranges, non-TCP protocols, managed prefix lists, IPv6 sources, split-horizon CIDR pairs, and overlapping rules. Keywords: security group, SG, ec2, inbound rule, port exposure, 0.0.0.0\u002F0, CIDR audit, attack surface, compliance check, VPC security.'\nlicense: Apache-2.0\ncompatibility: Requires an LLM-based agent runtime (Claude Code, Cursor, Windsurf) or direct invocation. No AWS CLI calls needed for classification — the skill operates on provided SG rule data. For live AWS audits, requires aws-cli >= 2.0 with ec2:DescribeSecurityGroups and ec2:GetManagedPrefixListEntries permissions.\nmetadata:\n  domain: aws-cloudops\n  complexity: medium\n  requires_llm: 'true'\n  phase: '2'\n  supports_pipeline: 'true'\n  family: Security\n  verdict_shape: OPEN | PUBLIC_NONCRITICAL | RESTRICTED\n  version: 0.4.0\n  author: Jacky Chan — AWS Community Builder\n  tags: aws, ec2, security-group, network-security, compliance, audit\n  dependencies: aws-orchestrator\n  keywords: security group, SG, ec2, inbound rule, port exposure, 0.0.0.0\u002F0, CIDR audit, attack surface, compliance check, VPC security, CIS benchmark, PCI-DSS, NIST SP 800-53, network exposure, prefix list\n  when_to_use: Use when reviewing EC2 security group inbound rules for public exposure, compliance auditing against CIS AWS Foundations Benchmark \u002F PCI-DSS \u002F NIST SP 800-53, incident response involving suspected network exposure, or onboarding a new VPC or account for security baseline validation.\n---\n\n# EC2 Security-Group Auditor\n\nAn AWS CloudOps agent skill that analyzes EC2 security group inbound rules\nto identify publicly exposed ports, classify each security group's exposure\nlevel with a CVSS-style risk score, and provide specific remediation guidance\nmapped to compliance controls.\n\n## Quick verdict logic (at-a-glance)\n\nFor EACH inbound rule: classify **SOURCE** (PUBLIC \u002F RESTRICTED \u002F\nCONDITIONAL), then **PORT** (CRITICAL \u002F NON_CRITICAL). Combine:\nPUBLIC + CRITICAL → **OPEN**; PUBLIC + NON_CRITICAL →\n**PUBLIC_NONCRITICAL**; RESTRICTED source → **RESTRICTED**. SG verdict =\nWORST per-rule verdict (`OPEN > PUBLIC_NONCRITICAL > RESTRICTED`).\nSources arrive in FOUR distinct API arrays — `IpRanges`, `Ipv6Ranges`,\n`UserIdGroupPairs`, `PrefixListIds` — iterate all four or you will miss\nIPv6 exposure, SG-ref cycles, and prefix-list drift. Full procedure,\nport-range intersection rules, and edge cases in §\"Classification logic\";\ndeep AWS dataplane behavior in §\"AWS dataplane expert details\".\n\n## Activation keywords\n\nsecurity group, SG, ec2, inbound rule, port exposure, open SSH, open RDP,\nopen database, 0.0.0.0\u002F0, public port, network exposure, CIDR audit,\nfirewall rule, attack surface, compliance check, VPC security, prefix list,\nCIS benchmark, PCI-DSS.\n\n## Reasoning framework (Mindset — why the procedure is ordered this way)\n\nSecurity groups are **stateful** — return traffic for an allowed inbound\nflow is automatically permitted, so there is no need for \"return port\"\nrules. That confusion is common: engineers add `32768-65535` inbound from\n`0.0.0.0\u002F0` thinking it is needed for responses — it is not; that rule is\na side channel for inbound traffic and should be removed. Because SGs are\nstateful and evaluated per-rule by the AWS dataplane, the verdict for a\nsecurity group is the **worst (most permissive) verdict of any individual\ninbound rule** — a single open rule creates an attack surface even if\nevery other rule is locked down. The procedure below evaluates each rule\nindependently first, then aggregates to the worst case. This is the\ninverse of firewall \"default deny\" reasoning: a restrictive rule does NOT\nnarrow an already-open rule on the same SG.\n\n## AWS dataplane expert details (Mindset — non-obvious AWS behavior)\nFull AWS dataplane expert details moved to\n[references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Classification logic (Process — per-rule evaluation, worst-case aggregation)\n\nEvaluate EACH inbound rule independently, assign a per-rule verdict, then\ntake the **worst** verdict across all rules as the SG's verdict.\n`OPEN > PUBLIC_NONCRITICAL > RESTRICTED`.\n\n### Decision procedure (pseudocode)\n\n```\nfunction classify_sg(sg):\n    per_rule_verdicts = []\n    for rule in sg.inbound_rules:\n        src = classify_source(rule.source)          # PUBLIC | RESTRICTED | CONDITIONAL\n        port = classify_port(rule.port, rule.protocol)  # CRITICAL | NON_CRITICAL | N_A\n\n        if src == PUBLIC:\n            if port == CRITICAL:\n                per_rule_verdicts.append(OPEN)\n            elif port == NON_CRITICAL:\n                per_rule_verdicts.append(PUBLIC_NONCRITICAL)\n            else:\n                per_rule_verdicts.append(PUBLIC_NONCRITICAL)  # ICMP-only\n        elif src == CONDITIONAL:                     # managed prefix list\n            entries = inspect_prefix_list(rule.source)\n            if any_entry_public(entries):\n                if port == CRITICAL: per_rule_verdicts.append(OPEN)\n                else: per_rule_verdicts.append(PUBLIC_NONCRITICAL)\n            else:\n                per_rule_verdicts.append(RESTRICTED)\n        else:                                        # RESTRICTED source\n            per_rule_verdicts.append(RESTRICTED)\n\n    if no inbound rules: return RESTRICTED\n    return worst(per_rule_verdicts)  # OPEN > PUBLIC_NONCRITICAL > RESTRICTED\n\nfunction classify_port(port, protocol):\n    if protocol == -1: return CRITICAL               # ALL protocols\n    if port == \"0-65535\": return CRITICAL             # all TCP\u002FUDP ports\n    if intersects(port, HIGH_RISK_PORTS): return CRITICAL\n    if port in [80, 443, 8080]: return NON_CRITICAL\n    if protocol == ICMP: return N_A                   # handled separately\n    return NON_CRITICAL                               # unknown port, non-critical default\n```\n\n### Port range intersection (the most common model error)\n\nA rule with a port **range** must be checked for **intersection** with the\nhigh-risk registry (§\"High-risk port registry\"). Examples:\n- `20-25` contains 22 (SSH) and 25 (SMTP) → CRITICAL → OPEN if PUBLIC\n- `3300-3400` contains 3306 (MySQL) → CRITICAL → OPEN if PUBLIC\n- `440-450` contains 443 only → does NOT intersect high-risk → PUBLIC_NONCRITICAL if PUBLIC\n- `0-65535` intersects all high-risk ports → always CRITICAL\n\n### Multi-port and mixed-protocol entries\n\n- AWS SG rules accept a **single port** or a **port range** — NOT a\n  comma-separated list. Each port or range is a separate rule entry. If\n  the input shows comma-separated ports in one rule, split into per-rule\n  evaluations and aggregate.\n- For **ICMP**, `Port` maps to `Type:Code`: `8` = Echo Request, `0` =\n  Echo Reply, `13` = Timestamp, `-1:-1` = ALL. An ICMP-only rule from a\n  PUBLIC source is PUBLIC_NONCRITICAL (reconnaissance, not data-plane\n  access).\n- A rule with the same port on **both TCP and UDP** (e.g., RDP 3389 over\n  TCP+UDP): evaluate each protocol independently, take the worse verdict.\n\n### Worked examples\n\n- **Mixed rules (web-tier pattern):** SG has `443 TCP 0.0.0.0\u002F0` AND\n  `22 TCP 10.0.0.0\u002F8`. Rule 1 = PUBLIC_NONCRITICAL (public source,\n  non-critical port); Rule 2 = RESTRICTED (private source, even though\n  port 22 is critical). Aggregate = **PUBLIC_NONCRITICAL**. Do NOT\n  classify as OPEN just because SSH appears — check the SOURCE first.\n\n- **All-ports range:** SG has `0-65535 TCP 0.0.0.0\u002F0`. Range intersects\n  the entire high-risk registry → **OPEN**. Do NOT treat `0-65535` as a\n  single non-critical port.\nSecondary worked examples moved to\n[references\u002Fworked-examples.md](references\u002Fworked-examples.md).\n\n## Risk scoring and compliance mapping\n\n### CVSS-style severity per verdict\n\n| Verdict + context | Severity | CVSS range | Action |\n| --- | --- | --- | --- |\n| OPEN — all-ports (`0-65535`) or protocol `-1` from PUBLIC | **Critical** | 9.8–10.0 | P0: remediate immediately |\n| OPEN — administrative ports (22, 23, 3389, 5900, 2375) | **Critical** | 9.0–9.8 | P0: incident-grade response |\n| OPEN — K8s\u002FDocker (6443, 10250, 2379, 2375, 2376) | **Critical** | 9.0–9.8 | P0: cluster takeover risk |\n| OPEN — databases (3306, 5432, 1433, 1521, 27017, 6379, 9200) | **Critical** | 8.5–9.3 | P1: data exfiltration risk |\n| OPEN — amplification (UDP 53, UDP 123, UDP 11211) | **High** | 7.5–8.0 | P1: DDoS reflection vector |\n| PUBLIC_NONCRITICAL — direct to instance (no ALB) | **Medium** | 4.3–5.3 | P2: add ALB or verify intent |\n| PUBLIC_NONCRITICAL — behind ALB\u002FWAF | **Low** | 0.0–3.1 | P3: informational |\n| RESTRICTED | **None** | 0.0 | No action |\n\n### Compliance framework mapping\n\nEach finding maps to specific control IDs that auditors and compliance\nteams reference:\n\n| Finding | CIS AWS Benchmark v3.0 | PCI-DSS v4.0 | NIST SP 800-53 Rev. 5 |\n| --- | --- | --- | --- |\n| SSH (22) from `0.0.0.0\u002F0` | **5.1** | 1.2.1, 1.3.1 | SC-7(5), AC-4 |\n| RDP (3389) from `0.0.0.0\u002F0` | **5.2** | 1.2.1, 1.3.1 | SC-7(5), AC-4 |\n| Any other port from `0.0.0.0\u002F0` | **5.3** | 1.2.1 | SC-7(5) |\n| Default SG allows any traffic | **5.4** | 1.2.2 | SC-7, SC-7(12) |\n| DB\u002Fadmin port on public SG | — | **1.3.4**, 1.4.1 | SC-7(5), SC-7(11) |\n| Amplification vector (UDP DNS\u002FNTP) | — | 1.3.6 | SC-7(20), SC-5 |\n\n**CIS 5.1\u002F5.2** are the most commonly failed controls in AWS environments.\nAny OPEN verdict on ports 22 or 3389 is a direct CIS 5.1\u002F5.2 violation\nand should be cited in the REMEDIATION field.\n\n## NEVER (critical anti-patterns — apply before emitting a verdict)\n\n- NEVER classify SSH (port 22) or RDP (port 3389) open to `0.0.0.0\u002F0`\n  (or `::\u002F0`) as anything other than **OPEN**. Botnets enumerate these\n  ports within minutes. This is a direct CIS 5.1\u002F5.2 violation.\n\n- NEVER classify `0-65535` (all TCP ports) or protocol `-1` (all\n  protocols) from `0.0.0.0\u002F0` as merely RESTRICTED or\n  PUBLIC_NONCRITICAL. All-ports-to-internet is maximum exposure.\n\n- NEVER assume a port range is safe because it is \"narrow.\" A range\n  `20-25` contains 22 (SSH); `3300-3310` contains 3306 (MySQL).\n  Always intersect the range against the high-risk registry.\n\n- NEVER classify a rule as OPEN solely because a high-risk port\n  appears — check the SOURCE first. Port 22 from `10.0.0.0\u002F8` is\n  RESTRICTED. Confusing these produces false-positive OPEN verdicts.\n\n- NEVER assume a port is safe because the service is \"just a database.\"\n  MySQL, PostgreSQL, Redis, MongoDB, Elasticsearch exposed to the\n  internet are the root cause of countless data breaches.\n\n- NEVER treat a managed prefix list (`pl-xxxxxxxx`) as automatically\n  RESTRICTED. AWS-managed lists for CloudFront, S3, and DynamoDB contain\n  public IPs. Inspect with\n  `aws ec2 get-managed-prefix-list-entries --prefix-list-id \u003Cpl-id>`.\n\n- NEVER treat `10.0.0.0\u002F7` as fully private. The `\u002F7` spans `10\u002F8`\n  (RFC 1918) AND `11\u002F8` (public). Any CIDR broader than the RFC 1918\n  boundaries is partially public → classify as PUBLIC.\n\n- NEVER add inbound \"ephemeral\" rules (`1024-65535` from `0.0.0.0\u002F0`)\n  for return traffic. Security groups are stateful — responses to\n  outbound flows are automatically allowed. This misconfiguration is\n  common and creates a wide attack surface for zero benefit.\n\n- NEVER assume `::\u002F0` (IPv6 `any`) is less dangerous than `0.0.0.0\u002F0`.\n  AWS IPv6 addresses are globally routable by default. A dual-stack\n  instance with `::\u002F0` on port 22 is just as exposed as IPv4.\n\n- NEVER dismiss UDP DNS (port 53) from `0.0.0.0\u002F0`. An open UDP 53\n  resolver is a DNS amplification reflector (~50-80× amplification).\n  AWS throttles accounts hosting open resolvers. Classify as OPEN.\n\n- NEVER permit ICMP `ALL` (type `-1`) from `0.0.0.0\u002F0` without flagging\n  it. While ICMP alone is PUBLIC_NONCRITICAL, `ALL` enables timestamp\n  queries (OS fingerprinting), address-mask queries (network mapping),\n  and Smurf amplification.\n\n- NEVER expose SNMP (UDP 161) to the internet. Community strings\n  (`public`, `private`) are sent in cleartext in SNMPv1\u002Fv2c; the full\n  network topology and configuration are leaked. Classify as OPEN.\n\n- NEVER assume overlapping or redundant CIDR rules are harmless. AWS\n  evaluates every inbound allow rule independently (UNION semantics —\n  there is NO first-match priority and NO deny in SGs; deny lives in\n  NACLs). A port with BOTH `0.0.0.0\u002F0` and `10.0.0.0\u002F8` sources means\n  the broader (`0.0.0.0\u002F0`) rule is the effective exposure; the\n  restrictive rule adds nothing and must be REMOVED, not narrowed.\n  Flag every duplicate and overlap as a cleanup item — they obscure\n  the real posture during manual review AND defeat naive\n  `grep \"0.0.0.0\u002F0\"` audits.\n\n- NEVER miss split-horizon CIDR evasion. Two rules `0.0.0.0\u002F1` and\n  `128.0.0.0\u002F1` on the same port cover the ENTIRE IPv4 space, yet\n  neither literally equals `0.0.0.0\u002F0`. The same applies to `\u002F2` quad\n  splits and `\u002F3` octets. Always union complementary halves before\n  classifying — a per-rule RESTRICTED verdict can hide a union that is\n  effectively PUBLIC.\n\n- NEVER trust a customer-managed prefix list as permanently RESTRICTED.\n  The list owner can add public CIDRs at any time without changing the\n  SG rule. Re-audit prefix-list entries on every review cycle. Flag\n  any `pl-xxxxxxxx` reference in a RESTRICTED SG for periodic\n  re-validation.\n\n- NEVER recommend simply deleting a rule without providing the\n  replacement. SG rule deletion is a live-affecting change — the\n  replacement (bastion SG reference, SSM Session Manager, app-tier SG\n  reference) must be specified so the operator can apply it without\n  losing application access.\n\n## Source classification (Reference)\n\nClassify the `Source` field BEFORE evaluating the port — misclassifying a\nsource is the most common auditor error.\n\n| Source | Class | Notes |\n| --- | --- | --- |\n| `0.0.0.0\u002F0` | **PUBLIC** (IPv4 internet) | All IPv4 addresses. |\n| `::\u002F0` | **PUBLIC** (IPv6 internet) | All IPv6 addresses. Treat identically. |\n| `0.0.0.0\u002F1` + `128.0.0.0\u002F1` | **PUBLIC** (split-horizon evasion) | Union covers all IPv4; classify each as PUBLIC. |\n| CIDR broader than RFC 1918 boundaries | **PUBLIC** (partial) | e.g., `10.0.0.0\u002F7` spans `10\u002F8` (private) AND `11\u002F8` (public). |\n| `100.64.0.0\u002F10` | **RESTRICTED** (CGNAT, RFC 6598) | Carrier-grade NAT; flag for review. |\n| `10.0.0.0\u002F8`, `172.16.0.0\u002F12`, `192.168.0.0\u002F16` | **RESTRICTED** (RFC 1918) | Standard private ranges. |\n| `sg-xxxxxxxx` | **RESTRICTED** (SG reference) | Self-references valid for inter-tier comms. |\n| `pl-xxxxxxxx` | **CONDITIONAL** | See §\"Prefix-list evaluation procedure\". |\n| Specific public IP `\u002F32` | **RESTRICTED** (single source) | Narrow; flag for rotation review. |\n| Missing \u002F blank | **RESTRICTED** | Treat conservatively as no source. |\n\n## Prefix-list evaluation procedure (Reference)\n\nWhen a rule's source is `pl-xxxxxxxx`, classification is CONDITIONAL on the\nprefix list's entries:\n\n### Step 1 — Identify the type\n\n```\naws ec2 describe-managed-prefix-lists --prefix-list-ids pl-xxxxxxxx\n```\nCheck `OwnerId`: if it matches your account, it is **customer-managed**;\nif `Amazon`, it is **AWS-managed** (CloudFront, S3, DynamoDB).\n\n### Step 2 — Enumerate entries\n\n```\naws ec2 get-managed-prefix-list-entries --prefix-list-id pl-xxxxxxxx\n```\n\n### Step 3 — Classify\n\n- **ALL entries** RFC 1918 or `\u002F32` known IPs → **RESTRICTED**.\n- **ANY public entry** → treat as **PUBLIC** for classification.\n- **AWS-managed exception** (CloudFront\u002FS3\u002FDynamoDB): entries are AWS\n  service IPs — effectively public but trusted infrastructure. Classify\n  as **PUBLIC_NONCRITICAL** for non-critical ports (443, 80); **OPEN**\n  for critical ports (22, 3389, databases, all-ports). AWS edge IPs\n  should not be trusted with administrative access.\n\n## High-risk port registry (Reference)\n\n### Administrative access\n| Port(s) | Protocol | Service | Risk |\n| --- | --- | --- | --- |\n| 22 | TCP | SSH | Brute-force #1; CIS 5.1. |\n| 23 | TCP | Telnet | Unencrypted; trivially exploitable. |\n| 3389 | TCP\u002FUDP | RDP | Brute-force; BlueKeep. CIS 5.2. |\n| 5900-5910 | TCP | VNC | Often no auth; trivial takeover. |\n| 2375, 2376 | TCP | Docker daemon | Container RCE; full host compromise. |\n\n### Databases\n| Port(s) | Protocol | Service | Risk |\n| --- | --- | --- | --- |\n| 3306 | TCP | MySQL \u002F Aurora MySQL | Data exfiltration, ransomware. |\n| 5432 | TCP | PostgreSQL \u002F Aurora PG | Data exfiltration, ransomware. |\n| 1433 | TCP | MSSQL | Data exfil; SA brute-force. |\n| 1521 | TCP | Oracle TNS | Data exfil; TNS poisoning. |\n| 27017-27019 | TCP | MongoDB | NoSQL ransomware. |\n| 6379 | TCP | Redis | Cryptomining, data exfil, ransomware. |\n| 9042 | TCP | Cassandra | NoSQL data exfiltration. |\n| 5984 | TCP | CouchDB | Default \"admin party\" on old versions. |\n| 11211 | TCP\u002FUDP | Memcached | UDP amplification DDoS (~51,000×). |\n| 9200, 9300 | TCP | Elasticsearch | Data exfil + ransomware. |\n\n### Message queues \u002F streaming \u002F container orchestration\n| Port(s) | Protocol | Service | Risk |\n| --- | --- | --- | --- |\n| 5671, 5672 | TCP | AMQP \u002F RabbitMQ | Queue manipulation. |\n| 9092 | TCP | Kafka | Topic read\u002Fwrite; data tampering. |\n| 6443 | TCP | Kubernetes API | Full cluster takeover. |\n| 10250 | TCP | Kubelet | Per-node RCE. |\n| 2379, 2380 | TCP | etcd | K8s control-plane root. |\n\n### Windows \u002F RPC \u002F directory\n| Port(s) | Protocol | Service | Risk |\n| --- | --- | --- | --- |\n| 135, 139, 445 | TCP | MS-RPC \u002F NetBIOS \u002F SMB | WannaCry; EternalBlue. |\n| 389, 636 | TCP | LDAP \u002F LDAPS | Credential theft. |\n| 25 | TCP | SMTP | Open-relay spam. |\n\n### Amplification vectors (non-TCP)\n| Port(s) | Protocol | Service | Amplification factor |\n| --- | --- | --- | --- |\n| 53 | UDP | DNS | ~50-80× |\n| 123 | UDP | NTP (MONLIST) | ~556× |\n| 161 | UDP | SNMP | ~3-15× |\n| 1900 | UDP | SSDP \u002F UPnP | ~30× |\n| 5353 | UDP | mDNS | Local enumeration |\n\n### Maximum exposure\n| Port(s) | Protocol | Risk |\n| --- | --- | --- |\n| 0-65535 | TCP | Every TCP service attackable. |\n| All (`-1`) | ALL | TCP + UDP + ICMP + SCTP; worst case. |\n\n### Non-critical (PUBLIC_NONCRITICAL when PUBLIC)\n| Port(s) | Protocol | Notes |\n| --- | --- | --- |\n| 80 | TCP | Acceptable behind ALB; verify redirect to 443. |\n| 443 | TCP | Acceptable for web-facing tiers behind ALB\u002FWAF. |\n| 8080 | TCP | Acceptable behind ALB; verify not admin panel. |\n\n## Output format (Process — per security group)\n\n```text\nSECURITY_GROUP: \u003Cname>\nVERDICT: OPEN | PUBLIC_NONCRITICAL | RESTRICTED\nSEVERITY: Critical | High | Medium | Low | None\nCIS_CONTROLS: \u003Ce.g., \"5.1\" or \"5.2, 5.3\" or \"N\u002FA\">\nREASON: \u003C1-2 sentences citing the specific rules and per-rule verdicts>\nREMEDIATION: \u003Cspecific action, or \"None required\" if RESTRICTED>\n```\n\n## Pre-flight safety checks (Process — run before any remediation CLI)\n\n- Capture current SG rule set: `aws ec2 describe-security-groups\n  --group-ids \u003Csg-id> --output json > \u002Ftmp\u002F\u003Csg-id>-backup-$(date +%s).json`.\n- Verify rollback: after backup, confirm the file is non-empty and parses\n  as valid JSON (`python3 -c \"import json; json.load(open('\u003Cfile>'))\"`).\n  A truncated\u002Fempty backup is useless for rollback.\n- Prefer **additive** changes (add restrictive rule, verify, then remove\n  open rule) over **destructive** changes (delete first).\n- For OPEN verdicts on administrative ports (22, 3389, 2375, 6443,\n  10250), confirm the operator has an alternative access path (SSM\n  Session Manager, console, or another SG rule) BEFORE removing the\n  open rule.\n- Verify dependency impact:\n  `aws ec2 describe-network-interfaces --filters Name=group-id,Values=\u003Csg-id>`\n  — removing a rule that a load balancer, peered VPC, or Lambda function\n  depends on will cause an outage.\n- For prefix-list sources, snapshot entries:\n  `aws ec2 get-managed-prefix-list-entries --prefix-list-id \u003Cpl-id>\n  --output json > \u002Ftmp\u002F\u003Cpl-id>-backup-$(date +%s).json`.\n\n## Remediation guidance (Process — per verdict)\n\nFor **OPEN** security groups:\n\n- **SSH (22):** prefer AWS Systems Manager Session Manager — no open\n  ports, IAM-authenticated, fully audited. Fallback: bastion SG ref.\n- **RDP (3389):** restrict to a bastion or jump-SG ref.\n- **Databases (3306, 5432, 1433, 1521, 27017, 6379, 9042, 5984, 11211,\n  9200):** restrict to the application-tier SG ID ONLY. Database subnets\n  should have no IGW route (private subnet with NAT, not public).\n- **Elasticsearch (9200, 9300):** restrict to ingestion SG + dashboard\n  SG; transport port (9300) never leaves the peer set.\n- **Docker daemon (2375, 2376):** never expose to internet. Bind to\n  localhost or private VPN; enable TLS client cert auth on 2376.\n- **Kubernetes API (6443) \u002F Kubelet (10250) \u002F etcd (2379-2380):**\n  restrict to control-plane and operator CIDRs. P0 remediation.\n- **SMB (445) \u002F NetBIOS (139):** remove entirely; restrict to\n  directory-member SG references.\n- **DNS (UDP 53):** if not a designated resolver, remove. If it IS a\n  resolver, restrict to known client CIDRs and enable RRL.\n- **SNMP (UDP 161):** restrict to monitoring SG; upgrade to SNMPv3\n  authPriv.\n- **Memcached UDP:** disable UDP entirely; amplification is severe.\n- **All-ports (0-65535) \u002F protocol -1:** delete and recreate with ONLY\n  the specific ports the workload requires.\n\nFor **PUBLIC_NONCRITICAL** security groups:\n\n- **Public HTTPS (443):** verify the SG is attached to an ALB\u002FNLB, not\n  directly to backend instances. The backend SG should reference the ALB\n  SG ID, not `0.0.0.0\u002F0`.\n- **Public HTTP (80):** acceptable only for redirect-to-HTTPS.\n- **ICMP:** restrict to a known monitoring CIDR; never allow ICMP ALL.\n\nFor **RESTRICTED** security groups:\n\n- No remediation required for RFC 1918 \u002F SG-ref \u002F `\u002F32` rules.\n- If rules use `100.64.0.0\u002F10` (CGNAT) or broad `\u002F7`–`\u002F9` CIDRs,\n  flag for review.\n- For customer-managed prefix-list references, schedule periodic\n  re-audit of list entries — the list owner can add public CIDRs without\n  changing the SG rule.\n- Recommend enabling VPC Flow Logs for ongoing auditing.\n\n## Recent AWS features (2024-2026)\nRecent AWS features notes moved to\n[references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Section taxonomy (CloudOps auditor pattern)\n\n**Pattern:** CloudOps Auditor — `Mindset → Process → Reference → Tool`.\nEach major section is tagged inline with its pattern role so the\nstructure is machine-recognizable and aids comprehension:\n\n1. **Frontmatter** — name, description, version.\n2. **Activation keywords** — discoverability terms.\n3. **Quick verdict logic** — at-a-glance summary (progressive disclosure entry point).\n4. **Reasoning framework** `[Mindset]` — the *why*.\n5. **AWS dataplane expert details** `[Mindset]` — non-obvious AWS behavior.\n6. **Classification logic** `[Process]` — per-rule evaluation then\n   worst-case aggregation, as formal pseudocode.\n7. **Risk scoring and compliance mapping** `[Process]` — CVSS severity +\n   CIS\u002FPCI-DSS\u002FNIST control IDs.\n8. **NEVER** `[Process]` — anti-patterns applied before verdict.\n9. **Source classification** `[Reference]` — CIDR \u002F SG-ref \u002F prefix-list\n   decision table.\n10. **Prefix-list evaluation procedure** `[Reference]` — programmatic\n    inspection.\n11. **High-risk port registry** `[Reference]` — categorized port tables.\n12. **Output format** `[Tool]` — per-SG report shape.\n13. **Pre-flight safety checks** `[Process]` — non-destructive guards.\n14. **Remediation guidance** `[Tool]` — per-verdict action plan.\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — AWS dataplane expert details (union evaluation, conntrack ceiling, four source arrays, quotas, peering\u002FRAM, prefix-list drift, Config\u002FSecurity Hub controls, Reachability Analyzer) and recent AWS features (moved from this file)\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — effective enumeration queries for scoping an audit (moved from this file)\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples: private-CIDR database, prefix-list source, IPv6 dual-stack, overlapping CIDRs, split-horizon evasion, prefix-list drift (moved from this file)\n- [references\u002Fsecurity-group-exposure-guide.md](references\u002Fsecurity-group-exposure-guide.md) — high-risk port registry, CIDR\u002Fsource classification, remediation patterns\n\n## Domain\n\nAWS CloudOps \u002F EC2 Network Security & Compliance.\n\n## AWS documentation\n\n- **Amazon EC2 User Guide (Security Groups)** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FUserGuide\u002Fec2-security-groups.html\n- **EC2 Security** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FUserGuide\u002Fec2-security.html\n- **EC2 API Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FAPIReference\u002F\n- **AWS CLI — ec2 command reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fec2\u002F\n- **VPC security groups** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fvpc\u002Flatest\u002Fuserguide\u002Fvpc-security-groups.html\n","# EC2 Security-Group Auditor\n\nAn AWS CloudOps agent skill that analyzes EC2 security group inbound rules\nto identify publicly exposed ports, classify each security group's exposure\nlevel with a CVSS-style risk score, and provide specific remediation guidance\nmapped to compliance controls.\n\n## Quick verdict logic (at-a-glance)\n\nFor EACH inbound rule: classify **SOURCE** (PUBLIC \u002F RESTRICTED \u002F\nCONDITIONAL), then **PORT** (CRITICAL \u002F NON_CRITICAL). Combine:\nPUBLIC + CRITICAL → **OPEN**; PUBLIC + NON_CRITICAL →\n**PUBLIC_NONCRITICAL**; RESTRICTED source → **RESTRICTED**. SG verdict =\nWORST per-rule verdict (`OPEN > PUBLIC_NONCRITICAL > RESTRICTED`).\nSources arrive in FOUR distinct API arrays — `IpRanges`, `Ipv6Ranges`,\n`UserIdGroupPairs`, `PrefixListIds` — iterate all four or you will miss\nIPv6 exposure, SG-ref cycles, and prefix-list drift. Full procedure,\nport-range intersection rules, and edge cases in §\"Classification logic\";\ndeep AWS dataplane behavior in §\"AWS dataplane expert details\".\n\n## Activation keywords\n\nsecurity group, SG, ec2, inbound rule, port exposure, open SSH, open RDP,\nopen database, 0.0.0.0\u002F0, public port, network exposure, CIDR audit,\nfirewall rule, attack surface, compliance check, VPC security, prefix list,\nCIS benchmark, PCI-DSS.\n\n## Reasoning framework (Mindset — why the procedure is ordered this way)\n\nSecurity groups are **stateful** — return traffic for an allowed inbound\nflow is automatically permitted, so there is no need for \"return port\"\nrules. That confusion is common: engineers add `32768-65535` inbound from\n`0.0.0.0\u002F0` thinking it is needed for responses — it is not; that rule is\na side channel for inbound traffic and should be removed. Because SGs are\nstateful and evaluated per-rule by the AWS dataplane, the verdict for a\nsecurity group is the **worst (most permissive) verdict of any individual\ninbound rule** — a single open rule creates an attack surface even if\nevery other rule is locked down. The procedure below evaluates each rule\nindependently first, then aggregates to the worst case. This is the\ninverse of firewall \"default deny\" reasoning: a restrictive rule does NOT\nnarrow an already-open rule on the same SG.\n\n## AWS dataplane expert details (Mindset — non-obvious AWS behavior)\nFull AWS dataplane expert details moved to\n[references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Classification logic (Process — per-rule evaluation, worst-case aggregation)\n\nEvaluate EACH inbound rule independently, assign a per-rule verdict, then\ntake the **worst** verdict across all rules as the SG's verdict.\n`OPEN > PUBLIC_NONCRITICAL > RESTRICTED`.\n\n### Decision procedure (pseudocode)\n\n```\nfunction classify_sg(sg):\n    per_rule_verdicts = []\n    for rule in sg.inbound_rules:\n        src = classify_source(rule.source)          # PUBLIC | RESTRICTED | CONDITIONAL\n        port = classify_port(rule.port, rule.protocol)  # CRITICAL | NON_CRITICAL | N_A\n\n        if src == PUBLIC:\n            if port == CRITICAL:\n                per_rule_verdicts.append(OPEN)\n            elif port == NON_CRITICAL:\n                per_rule_verdicts.append(PUBLIC_NONCRITICAL)\n            else:\n                per_rule_verdicts.append(PUBLIC_NONCRITICAL)  # ICMP-only\n        elif src == CONDITIONAL:                     # managed prefix list\n            entries = inspect_prefix_list(rule.source)\n            if any_entry_public(entries):\n                if port == CRITICAL: per_rule_verdicts.append(OPEN)\n                else: per_rule_verdicts.append(PUBLIC_NONCRITICAL)\n            else:\n                per_rule_verdicts.append(RESTRICTED)\n        else:                                        # RESTRICTED source\n            per_rule_verdicts.append(RESTRICTED)\n\n    if no inbound rules: return RESTRICTED\n    return worst(per_rule_verdicts)  # OPEN > PUBLIC_NONCRITICAL > RESTRICTED\n\nfunction classify_port(port, protocol):\n    if protocol == -1: return CRITICAL               # ALL protocols\n    if port == \"0-65535\": return CRITICAL             # all TCP\u002FUDP ports\n    if intersects(port, HIGH_RISK_PORTS): return CRITICAL\n    if port in [80, 443, 8080]: return NON_CRITICAL\n    if protocol == ICMP: return N_A                   # handled separately\n    return NON_CRITICAL                               # unknown port, non-critical default\n```\n\n### Port range intersection (the most common model error)\n\nA rule with a port **range** must be checked for **intersection** with the\nhigh-risk registry (§\"High-risk port registry\"). Examples:\n- `20-25` contains 22 (SSH) and 25 (SMTP) → CRITICAL → OPEN if PUBLIC\n- `3300-3400` contains 3306 (MySQL) → CRITICAL → OPEN if PUBLIC\n- `440-450` contains 443 only → does NOT intersect high-risk → PUBLIC_NONCRITICAL if PUBLIC\n- `0-65535` intersects all high-risk ports → always CRITICAL\n\n### Multi-port and mixed-protocol entries\n\n- AWS SG rules accept a **single port** or a **port range** — NOT a\n  comma-separated list. Each port or range is a separate rule entry. If\n  the input shows comma-separated ports in one rule, split into per-rule\n  evaluations and aggregate.\n- For **ICMP**, `Port` maps to `Type:Code`: `8` = Echo Request, `0` =\n  Echo Reply, `13` = Timestamp, `-1:-1` = ALL. An ICMP-only rule from a\n  PUBLIC source is PUBLIC_NONCRITICAL (reconnaissance, not data-plane\n  access).\n- A rule with the same port on **both TCP and UDP** (e.g., RDP 3389 over\n  TCP+UDP): evaluate each protocol independently, take the worse verdict.\n\n### Worked examples\n\n- **Mixed rules (web-tier pattern):** SG has `443 TCP 0.0.0.0\u002F0` AND\n  `22 TCP 10.0.0.0\u002F8`. Rule 1 = PUBLIC_NONCRITICAL (public source,\n  non-critical port); Rule 2 = RESTRICTED (private source, even though\n  port 22 is critical). Aggregate = **PUBLIC_NONCRITICAL**. Do NOT\n  classify as OPEN just because SSH appears — check the SOURCE first.\n\n- **All-ports range:** SG has `0-65535 TCP 0.0.0.0\u002F0`. Range intersects\n  the entire high-risk registry → **OPEN**. Do NOT treat `0-65535` as a\n  single non-critical port.\nSecondary worked examples moved to\n[references\u002Fworked-examples.md](references\u002Fworked-examples.md).\n\n## Risk scoring and compliance mapping\n\n### CVSS-style severity per verdict\n\n| Verdict + context | Severity | CVSS range | Action |\n| --- | --- | --- | --- |\n| OPEN — all-ports (`0-65535`) or protocol `-1` from PUBLIC | **Critical** | 9.8–10.0 | P0: remediate immediately |\n| OPEN — administrative ports (22, 23, 3389, 5900, 2375) | **Critical** | 9.0–9.8 | P0: incident-grade response |\n| OPEN — K8s\u002FDocker (6443, 10250, 2379, 2375, 2376) | **Critical** | 9.0–9.8 | P0: cluster takeover risk |\n| OPEN — databases (3306, 5432, 1433, 1521, 27017, 6379, 9200) | **Critical** | 8.5–9.3 | P1: data exfiltration risk |\n| OPEN — amplification (UDP 53, UDP 123, UDP 11211) | **High** | 7.5–8.0 | P1: DDoS reflection vector |\n| PUBLIC_NONCRITICAL — direct to instance (no ALB) | **Medium** | 4.3–5.3 | P2: add ALB or verify intent |\n| PUBLIC_NONCRITICAL — behind ALB\u002FWAF | **Low** | 0.0–3.1 | P3: informational |\n| RESTRICTED | **None** | 0.0 | No action |\n\n### Compliance framework mapping\n\nEach finding maps to specific control IDs that auditors and compliance\nteams reference:\n\n| Finding | CIS AWS Benchmark v3.0 | PCI-DSS v4.0 | NIST SP 800-53 Rev. 5 |\n| --- | --- | --- | --- |\n| SSH (22) from `0.0.0.0\u002F0` | **5.1** | 1.2.1, 1.3.1 | SC-7(5), AC-4 |\n| RDP (3389) from `0.0.0.0\u002F0` | **5.2** | 1.2.1, 1.3.1 | SC-7(5), AC-4 |\n| Any other port from `0.0.0.0\u002F0` | **5.3** | 1.2.1 | SC-7(5) |\n| Default SG allows any traffic | **5.4** | 1.2.2 | SC-7, SC-7(12) |\n| DB\u002Fadmin port on public SG | — | **1.3.4**, 1.4.1 | SC-7(5), SC-7(11) |\n| Amplification vector (UDP DNS\u002FNTP) | — | 1.3.6 | SC-7(20), SC-5 |\n\n**CIS 5.1\u002F5.2** are the most commonly failed controls in AWS environments.\nAny OPEN verdict on ports 22 or 3389 is a direct CIS 5.1\u002F5.2 violation\nand should be cited in the REMEDIATION field.\n\n## NEVER (critical anti-patterns — apply before emitting a verdict)\n\n- NEVER classify SSH (port 22) or RDP (port 3389) open to `0.0.0.0\u002F0`\n  (or `::\u002F0`) as anything other than **OPEN**. Botnets enumerate these\n  ports within minutes. This is a direct CIS 5.1\u002F5.2 violation.\n\n- NEVER classify `0-65535` (all TCP ports) or protocol `-1` (all\n  protocols) from `0.0.0.0\u002F0` as merely RESTRICTED or\n  PUBLIC_NONCRITICAL. All-ports-to-internet is maximum exposure.\n\n- NEVER assume a port range is safe because it is \"narrow.\" A range\n  `20-25` contains 22 (SSH); `3300-3310` contains 3306 (MySQL).\n  Always intersect the range against the high-risk registry.\n\n- NEVER classify a rule as OPEN solely because a high-risk port\n  appears — check the SOURCE first. Port 22 from `10.0.0.0\u002F8` is\n  RESTRICTED. Confusing these produces false-positive OPEN verdicts.\n\n- NEVER assume a port is safe because the service is \"just a database.\"\n  MySQL, PostgreSQL, Redis, MongoDB, Elasticsearch exposed to the\n  internet are the root cause of countless data breaches.\n\n- NEVER treat a managed prefix list (`pl-xxxxxxxx`) as automatically\n  RESTRICTED. AWS-managed lists for CloudFront, S3, and DynamoDB contain\n  public IPs. Inspect with\n  `aws ec2 get-managed-prefix-list-entries --prefix-list-id \u003Cpl-id>`.\n\n- NEVER treat `10.0.0.0\u002F7` as fully private. The `\u002F7` spans `10\u002F8`\n  (RFC 1918) AND `11\u002F8` (public). Any CIDR broader than the RFC 1918\n  boundaries is partially public → classify as PUBLIC.\n\n- NEVER add inbound \"ephemeral\" rules (`1024-65535` from `0.0.0.0\u002F0`)\n  for return traffic. Security groups are stateful — responses to\n  outbound flows are automatically allowed. This misconfiguration is\n  common and creates a wide attack surface for zero benefit.\n\n- NEVER assume `::\u002F0` (IPv6 `any`) is less dangerous than `0.0.0.0\u002F0`.\n  AWS IPv6 addresses are globally routable by default. A dual-stack\n  instance with `::\u002F0` on port 22 is just as exposed as IPv4.\n\n- NEVER dismiss UDP DNS (port 53) from `0.0.0.0\u002F0`. An open UDP 53\n  resolver is a DNS amplification reflector (~50-80× amplification).\n  AWS throttles accounts hosting open resolvers. Classify as OPEN.\n\n- NEVER permit ICMP `ALL` (type `-1`) from `0.0.0.0\u002F0` without flagging\n  it. While ICMP alone is PUBLIC_NONCRITICAL, `ALL` enables timestamp\n  queries (OS fingerprinting), address-mask queries (network mapping),\n  and Smurf amplification.\n\n- NEVER expose SNMP (UDP 161) to the internet. Community strings\n  (`public`, `private`) are sent in cleartext in SNMPv1\u002Fv2c; the full\n  network topology and configuration are leaked. Classify as OPEN.\n\n- NEVER assume overlapping or redundant CIDR rules are harmless. AWS\n  evaluates every inbound allow rule independently (UNION semantics —\n  there is NO first-match priority and NO deny in SGs; deny lives in\n  NACLs). A port with BOTH `0.0.0.0\u002F0` and `10.0.0.0\u002F8` sources means\n  the broader (`0.0.0.0\u002F0`) rule is the effective exposure; the\n  restrictive rule adds nothing and must be REMOVED, not narrowed.\n  Flag every duplicate and overlap as a cleanup item — they obscure\n  the real posture during manual review AND defeat naive\n  `grep \"0.0.0.0\u002F0\"` audits.\n\n- NEVER miss split-horizon CIDR evasion. Two rules `0.0.0.0\u002F1` and\n  `128.0.0.0\u002F1` on the same port cover the ENTIRE IPv4 space, yet\n  neither literally equals `0.0.0.0\u002F0`. The same applies to `\u002F2` quad\n  splits and `\u002F3` octets. Always union complementary halves before\n  classifying — a per-rule RESTRICTED verdict can hide a union that is\n  effectively PUBLIC.\n\n- NEVER trust a customer-managed prefix list as permanently RESTRICTED.\n  The list owner can add public CIDRs at any time without changing the\n  SG rule. Re-audit prefix-list entries on every review cycle. Flag\n  any `pl-xxxxxxxx` reference in a RESTRICTED SG for periodic\n  re-validation.\n\n- NEVER recommend simply deleting a rule without providing the\n  replacement. SG rule deletion is a live-affecting change — the\n  replacement (bastion SG reference, SSM Session Manager, app-tier SG\n  reference) must be specified so the operator can apply it without\n  losing application access.\n\n## Source classification (Reference)\n\nClassify the `Source` field BEFORE evaluating the port — misclassifying a\nsource is the most common auditor error.\n\n| Source | Class | Notes |\n| --- | --- | --- |\n| `0.0.0.0\u002F0` | **PUBLIC** (IPv4 internet) | All IPv4 addresses. |\n| `::\u002F0` | **PUBLIC** (IPv6 internet) | All IPv6 addresses. Treat identically. |\n| `0.0.0.0\u002F1` + `128.0.0.0\u002F1` | **PUBLIC** (split-horizon evasion) | Union covers all IPv4; classify each as PUBLIC. |\n| CIDR broader than RFC 1918 boundaries | **PUBLIC** (partial) | e.g., `10.0.0.0\u002F7` spans `10\u002F8` (private) AND `11\u002F8` (public). |\n| `100.64.0.0\u002F10` | **RESTRICTED** (CGNAT, RFC 6598) | Carrier-grade NAT; flag for review. |\n| `10.0.0.0\u002F8`, `172.16.0.0\u002F12`, `192.168.0.0\u002F16` | **RESTRICTED** (RFC 1918) | Standard private ranges. |\n| `sg-xxxxxxxx` | **RESTRICTED** (SG reference) | Self-references valid for inter-tier comms. |\n| `pl-xxxxxxxx` | **CONDITIONAL** | See §\"Prefix-list evaluation procedure\". |\n| Specific public IP `\u002F32` | **RESTRICTED** (single source) | Narrow; flag for rotation review. |\n| Missing \u002F blank | **RESTRICTED** | Treat conservatively as no source. |\n\n## Prefix-list evaluation procedure (Reference)\n\nWhen a rule's source is `pl-xxxxxxxx`, classification is CONDITIONAL on the\nprefix list's entries:\n\n### Step 1 — Identify the type\n\n```\naws ec2 describe-managed-prefix-lists --prefix-list-ids pl-xxxxxxxx\n```\nCheck `OwnerId`: if it matches your account, it is **customer-managed**;\nif `Amazon`, it is **AWS-managed** (CloudFront, S3, DynamoDB).\n\n### Step 2 — Enumerate entries\n\n```\naws ec2 get-managed-prefix-list-entries --prefix-list-id pl-xxxxxxxx\n```\n\n### Step 3 — Classify\n\n- **ALL entries** RFC 1918 or `\u002F32` known IPs → **RESTRICTED**.\n- **ANY public entry** → treat as **PUBLIC** for classification.\n- **AWS-managed exception** (CloudFront\u002FS3\u002FDynamoDB): entries are AWS\n  service IPs — effectively public but trusted infrastructure. Classify\n  as **PUBLIC_NONCRITICAL** for non-critical ports (443, 80); **OPEN**\n  for critical ports (22, 3389, databases, all-ports). AWS edge IPs\n  should not be trusted with administrative access.\n\n## High-risk port registry (Reference)\n\n### Administrative access\n| Port(s) | Protocol | Service | Risk |\n| --- | --- | --- | --- |\n| 22 | TCP | SSH | Brute-force #1; CIS 5.1. |\n| 23 | TCP | Telnet | Unencrypted; trivially exploitable. |\n| 3389 | TCP\u002FUDP | RDP | Brute-force; BlueKeep. CIS 5.2. |\n| 5900-5910 | TCP | VNC | Often no auth; trivial takeover. |\n| 2375, 2376 | TCP | Docker daemon | Container RCE; full host compromise. |\n\n### Databases\n| Port(s) | Protocol | Service | Risk |\n| --- | --- | --- | --- |\n| 3306 | TCP | MySQL \u002F Aurora MySQL | Data exfiltration, ransomware. |\n| 5432 | TCP | PostgreSQL \u002F Aurora PG | Data exfiltration, ransomware. |\n| 1433 | TCP | MSSQL | Data exfil; SA brute-force. |\n| 1521 | TCP | Oracle TNS | Data exfil; TNS poisoning. |\n| 27017-27019 | TCP | MongoDB | NoSQL ransomware. |\n| 6379 | TCP | Redis | Cryptomining, data exfil, ransomware. |\n| 9042 | TCP | Cassandra | NoSQL data exfiltration. |\n| 5984 | TCP | CouchDB | Default \"admin party\" on old versions. |\n| 11211 | TCP\u002FUDP | Memcached | UDP amplification DDoS (~51,000×). |\n| 9200, 9300 | TCP | Elasticsearch | Data exfil + ransomware. |\n\n### Message queues \u002F streaming \u002F container orchestration\n| Port(s) | Protocol | Service | Risk |\n| --- | --- | --- | --- |\n| 5671, 5672 | TCP | AMQP \u002F RabbitMQ | Queue manipulation. |\n| 9092 | TCP | Kafka | Topic read\u002Fwrite; data tampering. |\n| 6443 | TCP | Kubernetes API | Full cluster takeover. |\n| 10250 | TCP | Kubelet | Per-node RCE. |\n| 2379, 2380 | TCP | etcd | K8s control-plane root. |\n\n### Windows \u002F RPC \u002F directory\n| Port(s) | Protocol | Service | Risk |\n| --- | --- | --- | --- |\n| 135, 139, 445 | TCP | MS-RPC \u002F NetBIOS \u002F SMB | WannaCry; EternalBlue. |\n| 389, 636 | TCP | LDAP \u002F LDAPS | Credential theft. |\n| 25 | TCP | SMTP | Open-relay spam. |\n\n### Amplification vectors (non-TCP)\n| Port(s) | Protocol | Service | Amplification factor |\n| --- | --- | --- | --- |\n| 53 | UDP | DNS | ~50-80× |\n| 123 | UDP | NTP (MONLIST) | ~556× |\n| 161 | UDP | SNMP | ~3-15× |\n| 1900 | UDP | SSDP \u002F UPnP | ~30× |\n| 5353 | UDP | mDNS | Local enumeration |\n\n### Maximum exposure\n| Port(s) | Protocol | Risk |\n| --- | --- | --- |\n| 0-65535 | TCP | Every TCP service attackable. |\n| All (`-1`) | ALL | TCP + UDP + ICMP + SCTP; worst case. |\n\n### Non-critical (PUBLIC_NONCRITICAL when PUBLIC)\n| Port(s) | Protocol | Notes |\n| --- | --- | --- |\n| 80 | TCP | Acceptable behind ALB; verify redirect to 443. |\n| 443 | TCP | Acceptable for web-facing tiers behind ALB\u002FWAF. |\n| 8080 | TCP | Acceptable behind ALB; verify not admin panel. |\n\n## Output format (Process — per security group)\n\n```text\nSECURITY_GROUP: \u003Cname>\nVERDICT: OPEN | PUBLIC_NONCRITICAL | RESTRICTED\nSEVERITY: Critical | High | Medium | Low | None\nCIS_CONTROLS: \u003Ce.g., \"5.1\" or \"5.2, 5.3\" or \"N\u002FA\">\nREASON: \u003C1-2 sentences citing the specific rules and per-rule verdicts>\nREMEDIATION: \u003Cspecific action, or \"None required\" if RESTRICTED>\n```\n\n## Pre-flight safety checks (Process — run before any remediation CLI)\n\n- Capture current SG rule set: `aws ec2 describe-security-groups\n  --group-ids \u003Csg-id> --output json > \u002Ftmp\u002F\u003Csg-id>-backup-$(date +%s).json`.\n- Verify rollback: after backup, confirm the file is non-empty and parses\n  as valid JSON (`python3 -c \"import json; json.load(open('\u003Cfile>'))\"`).\n  A truncated\u002Fempty backup is useless for rollback.\n- Prefer **additive** changes (add restrictive rule, verify, then remove\n  open rule) over **destructive** changes (delete first).\n- For OPEN verdicts on administrative ports (22, 3389, 2375, 6443,\n  10250), confirm the operator has an alternative access path (SSM\n  Session Manager, console, or another SG rule) BEFORE removing the\n  open rule.\n- Verify dependency impact:\n  `aws ec2 describe-network-interfaces --filters Name=group-id,Values=\u003Csg-id>`\n  — removing a rule that a load balancer, peered VPC, or Lambda function\n  depends on will cause an outage.\n- For prefix-list sources, snapshot entries:\n  `aws ec2 get-managed-prefix-list-entries --prefix-list-id \u003Cpl-id>\n  --output json > \u002Ftmp\u002F\u003Cpl-id>-backup-$(date +%s).json`.\n\n## Remediation guidance (Process — per verdict)\n\nFor **OPEN** security groups:\n\n- **SSH (22):** prefer AWS Systems Manager Session Manager — no open\n  ports, IAM-authenticated, fully audited. Fallback: bastion SG ref.\n- **RDP (3389):** restrict to a bastion or jump-SG ref.\n- **Databases (3306, 5432, 1433, 1521, 27017, 6379, 9042, 5984, 11211,\n  9200):** restrict to the application-tier SG ID ONLY. Database subnets\n  should have no IGW route (private subnet with NAT, not public).\n- **Elasticsearch (9200, 9300):** restrict to ingestion SG + dashboard\n  SG; transport port (9300) never leaves the peer set.\n- **Docker daemon (2375, 2376):** never expose to internet. Bind to\n  localhost or private VPN; enable TLS client cert auth on 2376.\n- **Kubernetes API (6443) \u002F Kubelet (10250) \u002F etcd (2379-2380):**\n  restrict to control-plane and operator CIDRs. P0 remediation.\n- **SMB (445) \u002F NetBIOS (139):** remove entirely; restrict to\n  directory-member SG references.\n- **DNS (UDP 53):** if not a designated resolver, remove. If it IS a\n  resolver, restrict to known client CIDRs and enable RRL.\n- **SNMP (UDP 161):** restrict to monitoring SG; upgrade to SNMPv3\n  authPriv.\n- **Memcached UDP:** disable UDP entirely; amplification is severe.\n- **All-ports (0-65535) \u002F protocol -1:** delete and recreate with ONLY\n  the specific ports the workload requires.\n\nFor **PUBLIC_NONCRITICAL** security groups:\n\n- **Public HTTPS (443):** verify the SG is attached to an ALB\u002FNLB, not\n  directly to backend instances. The backend SG should reference the ALB\n  SG ID, not `0.0.0.0\u002F0`.\n- **Public HTTP (80):** acceptable only for redirect-to-HTTPS.\n- **ICMP:** restrict to a known monitoring CIDR; never allow ICMP ALL.\n\nFor **RESTRICTED** security groups:\n\n- No remediation required for RFC 1918 \u002F SG-ref \u002F `\u002F32` rules.\n- If rules use `100.64.0.0\u002F10` (CGNAT) or broad `\u002F7`–`\u002F9` CIDRs,\n  flag for review.\n- For customer-managed prefix-list references, schedule periodic\n  re-audit of list entries — the list owner can add public CIDRs without\n  changing the SG rule.\n- Recommend enabling VPC Flow Logs for ongoing auditing.\n\n## Recent AWS features (2024-2026)\nRecent AWS features notes moved to\n[references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Section taxonomy (CloudOps auditor pattern)\n\n**Pattern:** CloudOps Auditor — `Mindset → Process → Reference → Tool`.\nEach major section is tagged inline with its pattern role so the\nstructure is machine-recognizable and aids comprehension:\n\n1. **Frontmatter** — name, description, version.\n2. **Activation keywords** — discoverability terms.\n3. **Quick verdict logic** — at-a-glance summary (progressive disclosure entry point).\n4. **Reasoning framework** `[Mindset]` — the *why*.\n5. **AWS dataplane expert details** `[Mindset]` — non-obvious AWS behavior.\n6. **Classification logic** `[Process]` — per-rule evaluation then\n   worst-case aggregation, as formal pseudocode.\n7. **Risk scoring and compliance mapping** `[Process]` — CVSS severity +\n   CIS\u002FPCI-DSS\u002FNIST control IDs.\n8. **NEVER** `[Process]` — anti-patterns applied before verdict.\n9. **Source classification** `[Reference]` — CIDR \u002F SG-ref \u002F prefix-list\n   decision table.\n10. **Prefix-list evaluation procedure** `[Reference]` — programmatic\n    inspection.\n11. **High-risk port registry** `[Reference]` — categorized port tables.\n12. **Output format** `[Tool]` — per-SG report shape.\n13. **Pre-flight safety checks** `[Process]` — non-destructive guards.\n14. **Remediation guidance** `[Tool]` — per-verdict action plan.\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — AWS dataplane expert details (union evaluation, conntrack ceiling, four source arrays, quotas, peering\u002FRAM, prefix-list drift, Config\u002FSecurity Hub controls, Reachability Analyzer) and recent AWS features (moved from this file)\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — effective enumeration queries for scoping an audit (moved from this file)\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples: private-CIDR database, prefix-list source, IPv6 dual-stack, overlapping CIDRs, split-horizon evasion, prefix-list drift (moved from this file)\n- [references\u002Fsecurity-group-exposure-guide.md](references\u002Fsecurity-group-exposure-guide.md) — high-risk port registry, CIDR\u002Fsource classification, remediation patterns\n\n## Domain\n\nAWS CloudOps \u002F EC2 Network Security & Compliance.\n\n## AWS documentation\n\n- **Amazon EC2 User Guide (Security Groups)** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FUserGuide\u002Fec2-security-groups.html\n- **EC2 Security** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FUserGuide\u002Fec2-security.html\n- **EC2 API Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FAPIReference\u002F\n- **AWS CLI — ec2 command reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fec2\u002F\n- **VPC security groups** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fvpc\u002Flatest\u002Fuserguide\u002Fvpc-security-groups.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":37},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"complexity":32,"when_to_use":33,"dependencies":34,"requires_llm":35,"verdict_shape":36,"supports_pipeline":35},"aws, ec2, security-group, network-security, compliance, audit","2","Jacky Chan — AWS Community Builder","aws-cloudops","Security","0.4.0","security group, SG, ec2, inbound rule, port exposure, 0.0.0.0\u002F0, CIDR audit, attack surface, compliance check, VPC security, CIS benchmark, PCI-DSS, NIST SP 800-53, network exposure, prefix list","medium","Use when reviewing EC2 security group inbound rules for public exposure, compliance auditing against CIS AWS Foundations Benchmark \u002F PCI-DSS \u002F NIST SP 800-53, incident response involving suspected network exposure, or onboarding a new VPC or account for security baseline validation.","aws-orchestrator","true","OPEN | PUBLIC_NONCRITICAL | RESTRICTED","Requires an LLM-based agent runtime (Claude Code, Cursor, Windsurf) or direct invocation. No AWS CLI calls needed for classification — the skill operates on provided SG rule data. For live AWS audits, requires aws-cli >= 2.0 with ec2:DescribeSecurityGroups and ec2:GetManagedPrefixListEntries permissions.","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fec2-security-group-auditor",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":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill ec2-security-group-auditor",{"tool":52,"command":53},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill ec2-security-group-auditor",{"tool":55,"command":56},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill ec2-security-group-auditor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002FSKILL.md",true,[60,66,70,74,78,82,86,90,94,98,102,106,109,113,117,121,125,129,133],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",3326,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Feval\u002Ftest-cases.yaml",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"evals\u002Fbaselines\u002Fall-ports-open.md",485,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fbaselines\u002Fall-ports-open.md",{"path":71,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":72,"sourceHtmlUrl":73},"evals\u002Fbaselines\u002Fbastion-ssh-open.md",441,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fbaselines\u002Fbastion-ssh-open.md",{"path":75,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":76,"sourceHtmlUrl":77},"evals\u002Fbaselines\u002Fdb-mysql-open.md",499,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fbaselines\u002Fdb-mysql-open.md",{"path":79,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":80,"sourceHtmlUrl":81},"evals\u002Fbaselines\u002Fdb-private-cidr.md",457,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fbaselines\u002Fdb-private-cidr.md",{"path":83,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":84,"sourceHtmlUrl":85},"evals\u002Fbaselines\u002Fweb-tier-https.md",516,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fbaselines\u002Fweb-tier-https.md",{"path":87,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":88,"sourceHtmlUrl":89},"evals\u002Feval_config.yaml",1488,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Feval_config.yaml",{"path":91,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":92,"sourceHtmlUrl":93},"evals\u002Fevals.json",4273,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fevals.json",{"path":95,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":96,"sourceHtmlUrl":97},"evals\u002Fprompts\u002Fall-ports-open.md",216,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fprompts\u002Fall-ports-open.md",{"path":99,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":100,"sourceHtmlUrl":101},"evals\u002Fprompts\u002Fbastion-ssh-open.md",215,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fprompts\u002Fbastion-ssh-open.md",{"path":103,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":104,"sourceHtmlUrl":105},"evals\u002Fprompts\u002Fdb-mysql-open.md",211,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fprompts\u002Fdb-mysql-open.md",{"path":107,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":96,"sourceHtmlUrl":108},"evals\u002Fprompts\u002Fdb-private-cidr.md","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fprompts\u002Fdb-private-cidr.md",{"path":110,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":111,"sourceHtmlUrl":112},"evals\u002Fprompts\u002Fweb-tier-https.md",266,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fevals\u002Fprompts\u002Fweb-tier-https.md",{"path":114,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":115,"sourceHtmlUrl":116},"example\u002Fend-to-end-audit.md",4765,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fexample\u002Fend-to-end-audit.md",{"path":118,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":119,"sourceHtmlUrl":120},"references\u002Fadvanced-patterns.md",6256,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Freferences\u002Fadvanced-patterns.md",{"path":122,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":123,"sourceHtmlUrl":124},"references\u002Fdiagnostic-commands.md",706,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Freferences\u002Fdiagnostic-commands.md",{"path":126,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":127,"sourceHtmlUrl":128},"references\u002Fsecurity-group-exposure-guide.md",7113,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Freferences\u002Fsecurity-group-exposure-guide.md",{"path":130,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":131,"sourceHtmlUrl":132},"references\u002Fworked-examples.md",2250,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Freferences\u002Fworked-examples.md",{"path":134,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":135,"sourceHtmlUrl":136},"skill.usf.yaml",4403,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-security-group-auditor\u002Fskill.usf.yaml",[138,145,152,159,166,173],{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"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":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"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":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"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":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"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":167,"name":168,"nameZh":6,"description":169,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":170,"categories":171,"keywords":172,"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":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"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",[],[]]