Skip to content

anyshift-io/sre-skills / skills/sg-deceptive-reachability-auditor

sg-deceptive-reachability-auditor

Unverified

FileKindSize
FAILURE_MODES.mdmarkdown3.4 KB
SKILL.mdskill md14.5 KB
fixtures/01-orphaned-front-internal-cidr/instances.jsonconfig1.2 KB
fixtures/01-orphaned-front-internal-cidr/meta.jsonconfig378 B
fixtures/01-orphaned-front-internal-cidr/security-groups.jsonconfig6.8 KB
fixtures/02-public-alb-no-sg-ref/instances.jsonconfig1.2 KB
fixtures/02-public-alb-no-sg-ref/meta.jsonconfig477 B
fixtures/02-public-alb-no-sg-ref/security-groups.jsonconfig7.1 KB
fixtures/03-disjoint-public-vpn-islands/instances.jsonconfig1.4 KB
fixtures/03-disjoint-public-vpn-islands/meta.jsonconfig569 B
fixtures/03-disjoint-public-vpn-islands/security-groups.jsonconfig6.8 KB
fixtures/04-broken-segment-midchain/instances.jsonconfig1.2 KB
fixtures/04-broken-segment-midchain/meta.jsonconfig541 B
fixtures/04-broken-segment-midchain/security-groups.jsonconfig6.3 KB
fixtures/05-six-hop-cdn-waf-gw-app-svc-db/instances.jsonconfig1.4 KB
fixtures/05-six-hop-cdn-waf-gw-app-svc-db/meta.jsonconfig394 B
fixtures/05-six-hop-cdn-waf-gw-app-svc-db/security-groups.jsonconfig8.0 KB
fixtures/06-compromised-ci-runner-deep/instances.jsonconfig1.6 KB
fixtures/06-compromised-ci-runner-deep/meta.jsonconfig466 B
fixtures/06-compromised-ci-runner-deep/security-groups.jsonconfig7.5 KB
fixtures/07-five-hop-ingress-mesh-broker-db/instances.jsonconfig1.2 KB
fixtures/07-five-hop-ingress-mesh-broker-db/meta.jsonconfig394 B
fixtures/07-five-hop-ingress-mesh-broker-db/security-groups.jsonconfig7.4 KB
tests/README.mdmarkdown3.1 KB
tests/_deep.pyscript3.0 KB
tests/_reach_engine.pyscript20.9 KB
tests/_replay.pyscript881 B
tests/eval/README.mdmarkdown4.3 KB
tests/eval/eval_results.jsonconfig561.5 KB
tests/eval/judge_prompt.mdmarkdown3.2 KB
tests/eval/rubric.mdmarkdown4.7 KB
tests/eval/run_eval.pyscript19.8 KB
tests/eval/scenarios.pyscript13.2 KB
tests/replay_01_orphaned_front_internal_cidr.pyscript1.9 KB
tests/replay_02_public_alb_no_sg_ref.pyscript1.9 KB
tests/replay_03_disjoint_public_vpn_islands.pyscript2.0 KB
tests/replay_04_broken_segment_midchain.pyscript2.0 KB
tests/replay_05_six_hop_cdn_waf_gw_app_svc_db.pyscript1.8 KB
tests/replay_06_compromised_ci_runner_deep.pyscript2.0 KB
tests/replay_07_five_hop_ingress_mesh_broker_db.pyscript1.8 KB

FAILURE_MODES.md

View on GitHub
# Failure modes: sg-deceptive-reachability-auditor

This skill composes a reachability graph from security-group references. It is correct
for what that graph can express and wrong in the predictable ways below. Read this before
acting on a finding.

## 1. Reachability is not exploitability

A P1 path means every SG on the path accepts the SG in front of it. It does **not** mean
the path carries traffic. Each of these breaks a graph-reachable path without changing a
single ingress rule:

- **No live host.** An SG with no running instance is a path to nothing. The closure
  reaches the SG; the breach reaches an empty tier. Confirm membership before treating P1
  as live.
- **Unrouted subnets.** Two SGs whose subnets have no route to each other are not on a
  routable path. The SG edge is real; the route is absent.
- **A denying NACL.** Network ACLs are a stateless layer below security groups and can
  deny what the SG graph allows. The skill does not read them.
- **App-layer auth.** A database password, an mTLS handshake, or an app token can stop a
  network-reachable hop from becoming access.

The boundary section of every audit names these. A P1 path is a hypothesis to confirm
against the live estate, not a proven breach.

## 2. The entry point and crown jewel are caller-supplied

The path is computed *from* the named entry (`internet` or a compromised instance id)
*to* the named crown-jewel tier. A wrong entry, a mislabelled crown jewel, or a crown
jewel that resolves to no SG changes or empties the result. The skill resolves the crown
jewel by `tier`/`Name` tag, then `GroupName`, then `GroupId`; an untagged or misnamed
tier will not match.

## 3. Only SG references and the internet edge are in the graph

The graph has exactly two edge sources: SG-to-SG `UserIdGroupPairs` and `0.0.0.0/0` /
`::/0` ingress. A route that exists via a **VPC peering connection, a transit gateway, a
VPC endpoint, a load balancer target group, or a CIDR-based rule naming a specific
internal range** does not appear as an SG reference and is outside this graph. A fleet
that looks segmented to this skill may be connected by one of those.

## 4. The hub (H1) is structural, not behavioural

H1 fires when removing a node disconnects two or more isolated regions of the blast
radius. That is a property of the *graph*, not of how the SG is used. A shared-services
SG that is referenced widely but whose host runs nothing exploitable is still reported as
a hub. The finding says "this is the chokepoint if the path is live," which inherits the
caveat in section 1.

## 5. Clean is "no path in this graph," not "safe"

A clean verdict (no P1, no lateral B1, no H1) means the SG graph composes no path from the
entry to the crown jewel. It does **not** prove the fleet is safe: a peering edge
(section 3) may connect it, or the segmentation may rely on a NACL or route table this
skill cannot see and therefore cannot confirm. The clean verdict always ships with the
boundary, for exactly this reason. Do not read "clean" as "audited and proven isolated."

## 6. Direction matters, and it is easy to invert

The edge is `A -> B` when **B accepts A** (B's ingress names A). Reading the rule as "A
accepts B" inverts every edge and produces a mirror-image path that does not exist. The
reference engine encodes the direction once (`adjacency[A].add(B)` when B's ingress names
A); a hand audit that gets it backwards will fabricate paths and miss real ones.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 196kUpdated Claude CodeCodexVerifiedInstall