Repository navigation
feat(analyst): OpenVAS on garuda, on demand, fenced to the domain's six (ADR-0093) - #1166
Merged
Merged
Conversation
…ix (ADR-0093) Phase 3 of the analyst workstation. - ADR-0093: Kali's gvm packages, run on demand (Kali ships every GVM unit disabled at boot); the scope is 10.0.30.50-55; no estate silence, because a scan of the six crosses no router and no estate alert sees it, while LabSegmentReachedInternalNetwork would mean the fence failed. - stacks/analyst/gvm/gvm-scope.nft: an nftables table matching ospd-openvas.service's cgroup. The scanner runs as root through sudo, so no user match would hold it; the cgroup does, since Debian's sudo opens no systemd session. It allows the six, loopback and DNS to morpheus, and counts, logs and drops the rest. No flush ruleset. - stacks/analyst/gvm/ospd-openvas-scope.conf: loads that table as the scanner's ExecStartPre, inside its cgroup, which nftables needs to exist at load; a failed load fails the start. - docs/runbooks/scan-the-lab-with-openvas.md: setup, the fence, its proof by a GVM scan of an out-of-scope host, a scan, upgrades, removal. - ADR-0091 note, roadmap, network, architecture, the analyst README and garuda's runbook point at it. Refs #921. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The fence misses OpenVAS raw Ethernet traffic, its loader lacks required privileges, and the promised deployment proof remains unrecorded.
4 open findings
What changed in this PR
Adds on-demand OpenVAS scanning on garuda, intended to restrict scans to the six lab-domain hosts.
Changes:
- Adds an nftables cgroup fence and systemd drop-in.
- Adds ADR-0093 and an operational runbook.
- Updates architecture, network, roadmap, and stack documentation.
| File | Description |
|---|---|
README.md |
Updates ADR and runbook counts. |
docs/adr/0091-put-a-kali-purple-analyst-workstation-on-saruman.md |
Links the deferred OpenVAS decision. |
docs/adr/0093-run-openvas-on-garuda-on-demand-scoped-to-the-domain-by-nftables.md |
Records the OpenVAS architecture decision. |
docs/architecture.md |
Documents garuda’s scanner role. |
docs/network.md |
Documents intended scan boundaries. |
docs/roadmap.md |
Records completion of phase 3’s design. |
docs/runbooks/build-the-analyst-workstation.md |
Links the OpenVAS procedure. |
docs/runbooks/scan-the-lab-with-openvas.md |
Adds setup, verification, scanning, and removal steps. |
stacks/analyst/README.md |
Describes the host-level GVM files. |
stacks/analyst/gvm/gvm-scope.nft |
Implements the nftables scope rules. |
stacks/analyst/gvm/ospd-openvas-scope.conf |
Loads the fence before scanner startup. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ospd-openvas runs as _gvm, so its ExecStartPre ran nft as _gvm and the first start on garuda failed with "Operation not permitted" (failing closed, as designed). The + prefix lifts the user for that one command; it still runs in the service's cgroup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runbook section 7: setup (feed import over an hour after gvm-setup), the fence's first start failing closed until ExecStartPre=+, and the proof: a GVM Discovery scan of out-of-scope 10.0.30.40 dropped 11,681 times with 0 open ports. The drop log is now rate-limited (5/s) while the counter still counts every packet; re-checked from inside the scanner's cgroup, with the in-scope .50 reachable. GVM stopped afterwards. Changelog entry. Refs #921. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gvm-start only starts the services, so the runbook's scan and upgrade steps and ADR-0093 now run greenbone-feed-sync --type all first, as gvm-setup does, and wait for gvmd's import before scanning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed and accepted A review noted that OpenVAS's NASL send_frame and send_arp_request use AF_PACKET, below the nftables output hook, so the cgroup fence is IP only. Measured on garuda: an arping from a test netns to the out-of-scope .40 put no frame on eth0, which is what strict L2 containment would buy. But the clean netns form (veth + NAT) collides with Docker's FORWARD policy here, so it would need the scanner's own NIC. On VLAN 30, one broadcast domain where every host already reaches every other at L2 and ARP spoofing is assumed (ADR-0068), that gain is immaterial. So the cgroup IP fence stands, alive tests are kept off ARP (ICMP/TCP or Consider Alive), and the L2 residual is written into ADR-0093 decision 4, security.md and the runbook, with the dedicated-NIC netns design recorded as the upgrade for the day garuda scans across a routed boundary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…0093)
Replaces the cgroup IP fence, which a review showed was IP-only: NASL's
send_frame and send_arp_request go through AF_PACKET, below an IP hook.
The scanner (ospd-openvas and the openvas it spawns) now runs in a gvmscan
network namespace whose only route to the segment is scan0, a macvlan at
10.0.30.63, behind an nftables netdev egress filter that drops every frame
-- IP, ARP, raw -- to anything but the six. A macvlan, not a second NIC: no
tofu or Proxmox change, on-link so Docker's FORWARD=DROP (which blocked a
veth+NAT form) never sees it. A veth carries only MQTT to the host broker.
- stacks/analyst/gvm/: gvm-scan-netns.{sh,service} build the namespace;
scan0-egress.nft is the netdev filter; ospd-openvas-netns.conf joins the
namespace; mosquitto-gvm.conf + the order drop-in add the veth listener.
The cgroup files are removed.
- Proved on garuda: ospd in gvmscan; arping/TCP/ICMP to out-of-scope .40
dropped (counter rising); in-scope .50:445 connected.
- ADR-0093 decision 4, the runbook (install/proof/upgrade/teardown/§7),
security.md, network.md (.63) and the analyst README rewritten.
Refs #921.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-921 # Conflicts: # docs/changelog.md
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.



Refs #921 (phase 3).
OpenVAS on
garuda, as decided on 2026-10-10:gvmpackages, run on demand;10.0.30.50–.55;garuda, not only by GVM's target list.The decision is ADR-0093, and the procedure is
scan-the-lab-with-openvas.md.The fence
The scanner,
openvas, runs as root, started byospd-openvasthroughsudo. A rule keyed to the_gvmuser would therefore miss every scan packet. The rule matches the cgroup ofospd-openvas.serviceinstead./etc/pam.d/sudoincludes onlycommon-session-noninteractive, which has nopam_systemd. Sosudoopens no systemd session, andopenvasstays in that cgroup.morpheus. Everything else is counted, logged and dropped. There is noflush ruleset, so Docker's rules are untouched.nft -con Saruman confirmed ("cgroupv2 path fails"). So a drop-in loads the table as the service'sExecStartPre, inside its cgroup. If the load fails, the start fails.No estate silence
ADR-0091 expected a silence owned by #921. A scan of the six never crosses a router, and nothing estate-side sees inside VLAN 30, so there is nothing to silence.
LabSegmentReachedInternalNetworkwould fire only if the fence failed, and must page then.State
garuda:gvmis installed (Kali's units ship disabled at boot), andgvm-setupwith its feed sync is running now.10.0.30.40that must reach nothing and must raise the drop counter;Local checks:
check_docs.py, markdownlint 0.23.3 (0 issues) and lint pass.🤖 Generated with Claude Code