From 6b1c2892d65472bc5737c666c54e3adbcd934185 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Mon, 29 Jun 2026 19:46:17 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20controller-swap=20narrow-grant=20Option?= =?UTF-8?q?=20A=20IMPLEMENTED=20(agent=20v0.45.0)=20=E2=80=94=20spike=20+?= =?UTF-8?q?=20multidrive=20pointers=20resolved?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01EPZ4GJ8L5Jqf8UiPwbn1kt --- .../SPIKE-controllerswap-narrow-grants-2026-06-29.md | 11 +++++++++++ .../SPIKE-multidrive-mutual-exclusion-2026-06-29.md | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/documentation/audits/SPIKE-controllerswap-narrow-grants-2026-06-29.md b/documentation/audits/SPIKE-controllerswap-narrow-grants-2026-06-29.md index 3e365a3..053bac2 100644 --- a/documentation/audits/SPIKE-controllerswap-narrow-grants-2026-06-29.md +++ b/documentation/audits/SPIKE-controllerswap-narrow-grants-2026-06-29.md @@ -118,3 +118,14 @@ spike): /etc/sudoers` parses OK; remaining drop-ins `felhom-agent`, `README`, `zfs`; the real `felhom-agent` grant is untouched (lxc-info grant still present). No secrets recorded (the image ref is not a secret; no tokens were handled). + +--- + +## IMPLEMENTED 2026-06-29 — felhom-agent v0.45.0 + +Option A shipped per this spike's GO. `writeImage` now pipes the image on stdin into an in-guest +`tee` (no `bash -c`); the 5 narrow grants live in the `FELHOM_CONTROLLERSWAP` sudoers alias + the +capability manifest (Critical). Live: agent reports `capabilities self-check ok=45/45`; all 5 grants +match (`sudo -n -l` exit 0) and the negative controls (`bash -c`, `tee /etc/passwd`, `docker rm -f`, +`rm -rf`) are denied on the live host. **Live swap (Scenario D) awaiting supervised run** (restarts the +controller). See `felhom-agent/REPORT.md` + CHANGELOG v0.45.0. diff --git a/documentation/audits/SPIKE-multidrive-mutual-exclusion-2026-06-29.md b/documentation/audits/SPIKE-multidrive-mutual-exclusion-2026-06-29.md index 7a9d1f2..8a1feca 100644 --- a/documentation/audits/SPIKE-multidrive-mutual-exclusion-2026-06-29.md +++ b/documentation/audits/SPIKE-multidrive-mutual-exclusion-2026-06-29.md @@ -201,9 +201,13 @@ reports `bound_under_parent=true` for **both** felhom-usb + felhom-flash; the co zero `drive ABSENT` after); the real UI (`/settings`) shows **both drives Aktív concurrently**. Symptom gone. -**Surfaced, NOT fixed (operator decision):** `GuestExec`'s general `pct exec -- …` -(controller-swap / managed auto-update) needs arbitrary root-in-guest — **not granted; controller-swap -is broken under the non-root agent** until a narrow trust path is decided. **Deferred:** `sensors -j` +**Surfaced, then RESOLVED (2026-06-29, agent v0.45.0):** `GuestExec`'s general `pct exec -- …` +(controller-swap / managed auto-update) needed arbitrary root-in-guest. Rather than grant it, +controller-swap's only shell vector (`writeImage`'s `bash -c "printf … >"`) was replaced by a +stdin-fed `tee`, making all 5 swap vectors fixed/read-only and allowlistable as `FELHOM_CONTROLLERSWAP` +(no `bash -c`, no general `pct exec`). Spike-proven (`SPIKE-controllerswap-narrow-grants-2026-06-29.md`) ++ shipped; controller-swap works under the non-root agent again (live: 45/45 capability ok, negative +controls denied). **Deferred:** `sensors -j` (no caller + lm-sensors not installed). **Left as-is:** the §4 host-side doubling (re-isolating the live parent would orphan the working guest slave — fixed grant takes effect on the next clean host boot). The §7 "guest_attached / pct config" note is **resolved**: `GuestConfig` is a Proxmox **API**