Skip to content

feat(node-installer): qualify daemon units on a disposable Linux systemd fixture (OSS-379) - #539

Merged
athNdev merged 2 commits into
mainfrom
codex/node-installer
Nov 18, 2026
Merged

athNdev merged 2 commits into
mainfrom
codex/node-installer

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Follow-up to merged PR #529. Real systemd fixture evidence (owned WSL Ubuntu 24.04, PID 1 systemd): rootless per-user unit and rootful unit both START/RESTART active with Result=success and fresh boot records; config survives XDG_RUNTIME_DIR reset; private socket/state roots distinct, owned, canonical and contained; 6/6 defensive refusals (shared socket/data/containerd root, traversal, world-writable parent, symlink escape) using temporary paths only. One-source DaemonOptions renderer + SetDaemonRenderer seam intact; ValidateDaemonPaths rejects unsafe paths before rendering.

Honest limits: no-op fixture daemon replaces dockerd (Type=notify→simple, ReadWritePaths added); rootless ran in existing user manager with a non-root path UID; service RESTART only, not OS reboot; no shipped-unit boot or live-host claim. Pinned Go 1.26.11 build/vet/test, golangci-lint new-issues 0, Python 6/6, knowledge-lint 38/38. No merge, release, deployment or registry write.

…ture (OSS-379)

- Add fail-closed ValidateDaemonPaths to render-daemon: shared daemon paths,
  traversal, overlapping/escaping roots, symlink escapes, world-writable
  ancestors and daemon collisions are refused before any rendering.
- Spec now requires distinct RuntimeRoot/StateRoot containment boundaries and
  supports fixture-only binary overrides so no real dockerd is started.
- Add disposable Linux systemd qualification fixture: real START/RESTART of
  the rendered rootless and rootful units, XDG_RUNTIME_DIR reset, canonical
  root checks and six temporary-path refusal cases, all in owned /tmp and /run
  dirs with a no-op daemon and no /etc, network or host config change.
- Extend Go and Python offline fixtures for the defensive refusal cases.

Evidence: owned WSL Ubuntu with PID1=systemd, rootless/rootful active with
ExecMainStatus=0 and fresh reboot records, XDG state survival, canonical roots,
6/6 refusals; pinned Go 1.26.11 build/vet/test, golangci-lint new-issues 0,
6/6 Python fixtures, knowledge-lint clean. No live host, release or merge.
The defensive path fixture hardcoded UID 1000, so its clean rootless spec was
refused on runners whose actual user/runtime dir differs. Fixture-only fix:
derive the rootless runtime root from the caller's real UID and a temporary
subdirectory under /run/user/<uid>, with a rootful temp-path fallback when no
non-root user runtime dir exists (e.g. root runners). Also create the data root
before the world-writable-parent case so the existing guard is actually tested.

Production ValidateDaemonPaths containment, canonical-root and refusal rules
are unchanged.

Verified on real Linux at UID 0 (fallback) and UID 12345 with /run/user/12345
(rootless derivation): all defensive subtests PASS. Pinned Go 1.26.11
go test ./... -count=1 and go vet exit 0, golangci-lint new-issues 0, Python
6/6, knowledge-lint clean, gofmt clean.
@athNdev
athNdev merged commit 6f43539 into main Nov 18, 2026
12 checks passed
@athNdev
athNdev deleted the codex/node-installer branch November 18, 2026 10:41
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