Skip to content

Check that fenrir stays an appliance #1577

Closed

Description

@Gerrrt

What and why

fenrir is an appliance (build-the-sensor-guest.md §0), and nothing checks that it stays one. docs/security.md's row "Someone who takes the sensor reaching beyond its traffic" ends: "Nothing re-checks this; a tool installed on fenrir again would be found only by the next audit." The audit of 2026-11-13 found the guest used as a workstation for weeks before anyone looked. Its next steps asked for a drift check or a converge. Every other next step is now done (#1571, #1574, #1575, #1576), so this is the one left.

Wanted: a collector on fenrir that reads the appliance's state against what the runbook leaves, writes one gauge per check to the textfile directory, and a rule in stacks/lab/prometheus/rules/lab.rules.yaml that fires when any check fails or the file goes stale.

What it reads. Each check is pass or fail against the runbook. Nothing it reads is published as a value: no key, fingerprint, path or package name leaves the guest, only check="<name>" and 0 or 1.

  • sshd -T: permitrootlogin, passwordauthentication, kbdinteractiveauthentication and x11forwarding read no, and allowusers is atreus (§3).
  • atreus's authorized_keys holds only the keys the runbook allows. The allowed fingerprints live on the guest, not in this repository.
  • root has no authorized_keys, and /etc/sudoers.d holds only README.
  • atreus is in no group beyond the runbook's (no lxd), and its login shell is /bin/bash.
  • No user systemd units beyond the distribution's, ~/.config/systemd/user is empty, and linger is off.
  • snap list is core24 and snapd only.
  • The apt sources are the distribution's and Docker's only.
  • Listening sockets in the host's network namespace are sshd only. The sensor's containers are a different namespace and are not this check.
  • $HOME is under a bound, set at about twice the checkout.

Design choices this issue leaves to the PR.

  1. Where it runs. On fenrir, as a row in install-agent-collectors.sh with its unit under systemd/agent/, the way zeek-archive-prune is. It needs root for sshd -T and root's home, so it runs as the other collectors do.
  2. What it cannot catch. The row's threat is someone who takes the sensor. A collector on the guest reports what the guest says, and whoever has root there can make it say anything. This check is for drift by accident, the kind the audit found. Reading the same facts from outside, through qm guest exec as ADR-0088 does, would only move the trust to the guest agent, which the same attacker controls. The PR should say that in the collector's header and in the security.md row, not imply more.
  3. Who sees it. The lab's Prometheus pages no one (ADR-0020). A firing rule shows in /alerts and Grafana only. That is enough for drift by accident only if someone looks. Whether one bit, "fenrir's appliance check passes", should cross to the estate the way a named service's health does under ADR-0088 is a decision for an ADR, and the PR should either write it or say it was not taken.

Done when

  • The collector, its unit, its row and the lab rule land, with a promtool test for a failing check and a stale file.
  • install-agent-collectors has run on fenrir, and every check reads 1.
  • One check has been made to fail on purpose (e.g. a test key appended, then removed) and the rule fired.
  • security.md's row and build-the-sensor-guest.md say what checks the guest now, and what it does not catch. The lab rule count goes up with the rule.

Refs #1489, #1550.

Which VLAN does this touch

🟢 30 — ImaginationLAN (lab)

Security review

  • Does not weaken the default-deny posture between VLANs
  • Any new credential goes in secrets/*.sops.yaml (none is expected)
  • Any new device is added to docs/network.md with an OUI-truncated MAC (no new device)

Activity

  1. added
    feature
    security
    sensor
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featuresecuritysensor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions