Skip to content

feat(range): RangeSubnetLeaked, and §8 ran on gandalf before any target (#421) - #1342

Merged
Gerrrt merged 4 commits into
mainfrom
range-leak-alert
Nov 9, 2026
Merged

Gerrrt merged 4 commits into
mainfrom
range-leak-alert

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 9, 2026

Copy link
Copy Markdown
Owner

What changed

Adds RangeSubnetLeaked, ADR-0014's optional Loki rule. It fires critical on
any filterlog line, block or pass, whose source is in 172.30.30.0/24. Also
records build-the-playground.md §8 as run on gandalf, before any target.

Why

Step 3 of #421 is the rule, "once the subnet is real". It is real now:
ragnarok sits on 172.30.30.10. §9's leak proof has to run before any
vulnerable image exists on the machine, so §8 and §9 come before §6. The
roadmap's "§6, then §7–§9" is corrected. Landing the rule first lets §9 prove
the alert as well as the query.

§8 check four failed first, on a throwaway static clone of tpl-kali on
vmbr1. The template's build-time interfaces.d/eth0 DHCP stanza let dhcpcd
fall back to link-local and add default dev eth0 scope link. With the stanza
removed, the check passed. The fix to the template is separate work.

Refs #421.

Blast radius

One new Loki rule on prometheus, plus docs. It routes like the other
critical security alerts. While the range holds, nothing on the estate sends
from 172.30.30.0/24, so it should be silent until §9 causes a leak on
purpose.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

  • make validate on gandalf passed with 43 skips, because there is no
    Docker there. These skips matter for this change:

    • the LogQL parse and the Loki behaviour tests, including the two new
      cases;
    • markdownlint, yamllint and gitleaks.

    CI runs all of them. check_docs.py passes: 159 Prometheus + 21 Loki
    rules.

  • §8 ran live on gandalf 2026-11-09:

    • Check one: vmbr1 holds only tap130i1 and has 0 addresses.
    • Check two: 0.
    • Check four: on VMID 199 leaktest at 172.30.30.199, after the stanza
      fix, it showed no default route and both pings gave
      Network is unreachable.
  • make validate passes (with the skips above)

  • Deployed to the lab and confirmed working. Comes after merge, then §9.

  • Docs updated

🤖 Generated with Claude Code

…et (#421)

ADR-0014's optional Loki rule: any filterlog line whose source is in
172.30.30.0/24, block or pass, fires critical at once. Tests cover a
block, a pass, and a range address as destination that must not fire.
Runbook section, the observability note, and counts (21 Loki, 180 in
all) updated.

build-the-playground.md §8 ran on gandalf ahead of §6, because §9 must
run before any vulnerable image exists. Check four failed first on a
throwaway tpl-kali clone: the template's build-time interfaces.d/eth0
DHCP stanza let dhcpcd add a link-local default route. With the stanza
removed, it passed. The roadmap now says §9 is next.

Refs #421.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 20:49
@Gerrrt
Gerrrt enabled auto-merge (squash) November 9, 2026 20:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The runbook directs verification of RangeSubnetLeaked to the urgent channel instead of its actual security receiver, so the check would miss a correctly delivered notification.

1 open issue
What changed in this PR

Adds Loki detection for traffic escaping the range subnet and documents isolation checks on gandalf, supporting the leak proof required before vulnerable targets are installed.

Changes:

  • Adds the critical RangeSubnetLeaked alert with positive and negative test cases.
  • Documents incident response, isolation-check results, and the corrected build order.
  • Updates alert totals to 180: 159 Prometheus and 21 Loki rules.
File Description
stacks/​observability/​README.md Updates the Loki rule count.
stacks/​observability/​loki/​tests/​security.test.yaml Tests leaked sources and nonmatching traffic.
stacks/​observability/​loki/​rules/​security.rules.yaml Adds the range-subnet leak alert.
README.md Updates overall and Loki alert counts.
docs/​security.md Updates the total alert count.
docs/​runbooks/​respond-to-a-security-alert.md Adds range-leak containment and diagnosis guidance.
docs/​runbooks/​build-the-playground.md Records isolation checks and adds alert verification.
docs/​roadmap.md Places leak verification before target installation.
docs/​observability.md Explains the new detection and updates counts.
docs/​changelog.md Records the rule addition and isolation-check results.

Review effort: Balanced

Comment thread docs/runbooks/build-the-playground.md Resolved
Gerrrt and others added 3 commits November 9, 2026 12:53
…re it routes (#421)

Refs #421.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit fff55b4 into main Nov 9, 2026
8 checks passed
@Gerrrt
Gerrrt deleted the range-leak-alert branch November 9, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants