Repository navigation
feat(security): arm the lab tripwire's Loki rule, and name the alias trap (#234) - #393
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 atInternal_Segments, which names the lab's own subnet, so it has logged 1,239 DNS queries to10.0.30.1in three days and nothing else — the exact trap item 2 of #234 predicted. The docs and runbook here describe the rule pointing at aHouse_Segmentsalias (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:
LabSegmentReachedInternalNetworkbesideTerminalSegmentReachedInternalNetwork— source 30, destination every other segment including10.7.7.0/24, 30 excluded, so it is right even while the alias is wrong. The sibling's destination class also gains10.7.7, which the alias gained on 2026-09-06 without the rule following.restore-the-firewall.md§4 step 5: four tripwires onigc0.(10|20|30|40), either alias name accepted, plus a check that the lab's rule points atHouse_Segments.docs/security.md,docs/observability.md: four tripwires and why the fourth uses a different alias.Checks:
./scripts/validate.shgreen (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 reloadfrom the main checkout, thencurl -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