Skip to content

feat(security): arm the lab tripwire's Loki rule, and name the alias trap (#234) - #393

Merged
Gerrrt merged 1 commit into
mainfrom
gerrrt/lab-tripwire-234
Sep 8, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
gerrrt/lab-tripwire-234

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 8, 2026

Copy link
Copy Markdown
Owner

ADR-0014's tripwire on ImaginationLAN — the repository half, and the firewall finding that goes with it.

Found: the firewall rule already exists (tracker 1788730111, created 2026-09-06 with the untagged-LAN blocks, placed correctly). It points at Internal_Segments, which names the lab's own subnet, so it has logged 1,239 DNS queries to 10.0.30.1 in three days and nothing else — the exact trap item 2 of #234 predicted. The docs and runbook here describe the rule pointing at a House_Segments alias (every segment but 30); the alias change is a firewall edit by hand and is what closes the issue. Steps are on the issue.

Landed:

  • LabSegmentReachedInternalNetwork beside TerminalSegmentReachedInternalNetwork — source 30, destination every other segment including 10.7.7.0/24, 30 excluded, so it is right even while the alias is wrong. The sibling's destination class also gains 10.7.7, which the alias gained on 2026-09-06 without the rule following.
  • Security dashboard: a Lab segment → house, by action panel, both directions in the violations log, the new rule in the alert table, four-tripwire text.
  • restore-the-firewall.md §4 step 5: four tripwires on igc0.(10|20|30|40), either alias name accepted, plus a check that the lab's rule points at House_Segments.
  • docs/security.md, docs/observability.md: four tripwires and why the fourth uses a different alias.
  • Counted claims: 94 rules, 17 log-based, 141 panels.

Checks: ./scripts/validate.sh green (3 worktree-only skips), make check-docs, make check-loki-rules (17 rules + 30 dashboard expressions, 47 evaluated by the ruler), dashboard round-trip through the pinned Grafana.

After merge: make reload from the main checkout, then curl -s localhost:3100/loki/api/v1/rules | grep -c 'alert:' should say 17.

Closes nothing by itself — #234 closes when the alias is changed and verified.

🤖 Generated with Claude Code

…trap (#234)

ADR-0014 decided one log-only tripwire on the ImaginationLAN interface, in
#223's shape, and a sibling Loki rule because TerminalSegmentReachedInternal-
Network hard-codes its sources as 10, 20 and 40. The firewall rule arrived on
2026-09-06 with the untagged-LAN blocks. This is the repository half.

WHAT THE RULE FOUND BEFORE IT HAD A RULE. The tripwire points at
Internal_Segments, which is 30/50/99 and the switch LAN — it names the lab's
own subnet. So every DNS query from the lab to its gateway that no block above
catches falls onto the tripwire and is logged as a pass: 1,239 lines in the
rule's first three days, every one udp -> 10.0.30.1:53, none a crossing. Item
2 of #234 predicted exactly this and said the rule needs its own alias. The
docs and the restore runbook now say the lab's rule points at House_Segments
(every segment but 30) and check for it; the alias change itself is a
firewall edit by hand and is what closes the issue.

LabSegmentReachedInternalNetwork reads VLAN 30 as a source and every other
segment as a destination, 30 excluded — so it is correct even while the alias
is wrong, which is why it has fired on none of those lines. Both rules'
destination class gains 10.7.7.0/24, which Internal_Segments gained on
2026-09-06 without the Loki rule following. Backticks, per the file header;
make check-loki-rules boots the pinned Loki: 17 rules and 30 dashboard
expressions parsed, 47 evaluated by the ruler.

The security dashboard gains a lab sibling to the terminal panel, the
violations log shows both directions, and the alert table lists the rule.
restore-the-firewall.md expects four tripwires on igc0.(10|20|30|40) and adds
a check that the lab's points at House_Segments. Counted claims: 94 rules,
17 log-based, 141 panels.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit c7c94db into main Sep 8, 2026
3 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/lab-tripwire-234 branch September 8, 2026 06:22
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.

1 participant