docs: record the /etc files a confined worker's programs need on each distro

Merged
KI
23d ago
+40-4

Problem

#95 measured which files in /etc common programs need as a confined worker, but only on CI's Ubuntu 26.04 with the runner image's own Node.js. It listed other systems and distribution packages as not verified. That gap matters for deciding whether Node's OpenSSL configuration should join the default rules, because the file's path could differ by system.

Change

Docs only. The default rules are unchanged.

  • RFC 0008: "Programs that read files in /etc" gains "On other systems", with the results below. Its "Not measured" line now names only Nix and arm64 for these programs.
  • README: the paragraph on confinement now gives each system's OpenSSL configuration for Node.js, the name-lookup files with glibc and musl, and the CA certificates for HTTPS. It no longer says "on Ubuntu 26.04" for findings that hold on all five systems.
  • Roadmap: the M10 evidence line adds the third run.

Measurement

Probe run 43495976575 ran on the throwaway branch test/worker-runtime-probe, at 5b0970d. That commit is aa45c21 plus only .github/probe/ and a probe workflow (git diff --stat aa45c21 5b0970d shows those three files).

  • Containers: the distros job's pinned Debian 13, Fedora 45, Arch, and Alpine 3.24 images, on Linux 7.0. Each built fsgate-broker with the system's own toolchain, installed the system's own nodejs, git, curl, python3, and strace, and ran the probe as an unprivileged user created in the container.
  • The runner: the probe also ran on the runner itself, as its own user.

For each program, the probe first ran fsgate-broker --unconfined, as the control. It then ran the program confined with the default rules. While the program failed, it reran it with --direct for every path the trace showed refused with EACCES whose name or target is under /etc. Each rerun added r for a file and rl for a directory, and the reruns stopped when the program passed or nothing new was refused. The control and every program passed on all five systems.

SystemNode.jsExit under the defaultsStarts with
Ubuntu 26.04, the runner image's build24.22.213/etc/ssl/openssl.cnf
Debian 1320.19.213/usr/lib/ssl/openssl.cnf (links to /etc/ssl/openssl.cnf)
Fedora 4522.23.113/etc/pki/tls/openssl3.cnf
Arch26.13.113/etc/ssl/openssl.cnf
Alpine 3.2424.22.313/etc/ssl/openssl.cnf

In each case that one file was the only one added, and Node then exited 0. The other programs:

  • getent hosts github.com (exit 2): passed once given /etc/resolv.conf, /etc/hosts, /etc/nsswitch.conf, and /etc/host.conf with glibc, and once given only /etc/resolv.conf and /etc/hosts on Alpine. #95's runs showed /etc/host.conf is not needed.
  • curl over HTTPS (exit 6): after the name files it exited 77, and passed once the CA bundle was added, on all five. That bundle is /etc/ssl/certs/ca-certificates.crt, or /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem on Fedora. On Alpine it still exited 6 until /etc/nsswitch.conf was added. That curl is built with c-ares.
  • git ls-remote over HTTPS (exit 128): same pattern. It failed again after the name files and passed with the CA bundle. The containers have no /etc/gitconfig; the runner does, and there it was added first, as in #95.
  • Node's fetch:
    • The runner's build and Arch's package passed with the OpenSSL configuration and the name files, without a CA file.
    • Fedora's failed until its CA files were added.
    • On Debian and Alpine the CA files arrived in the same rerun as the name files, so the run cannot say whether Node needed them.
  • Python urllib over HTTPS: passed on Fedora only after its CA files. On the other four, they arrived in the same rerun as the name files.
  • date +%Z: passed under the defaults on all five.
  • id -un: passed with /etc/passwd and /etc/nsswitch.conf, or only /etc/passwd on Alpine.

The step-by-step results, one line per rerun with its exit code, are in the run's logs.

Verification

  • Every number and path above was checked against the five job logs, after writing.
  • Locally, on macOS 26.2 with Rust 1.99.1:
    • cargo fmt --all --check and cargo clippy --all-targets --locked -- -D warnings: clean.
    • cargo test --locked: 121 passed, the README doctest included.
    • RUSTDOCFLAGS='-D warnings' cargo doc --locked --no-deps: clean.

Not verified:

  • Nix and arm64. The probe ran on x86_64 in four containers and on the runner.
  • A minimal set for each program. A rerun adds every refused path, so the sets are enough to pass, not each one required on its own.

Documentation and release

No changelog entry: no behavior changes. This informs a decision left to the maintainer: whether Node's OpenSSL configuration should join the default rules. A default would need both /etc/ssl/openssl.cnf and /etc/pki/tls/openssl3.cnf to cover these five systems.


Summary by cubic

Records which /etc files a confined worker's programs need on Debian 13, Fedora 45, Arch, and Alpine 3.24, found by a third probe run. Docs only; the default rules are unchanged.

  • RFC 0008 gains an "On other systems" section with per-system OpenSSL configurations, name-lookup files, and CA certificates for Node.js, git, curl, and Python.
  • The README no longer limits findings to Ubuntu 26.04, and the roadmap cites the new run.
  • Node.js needs its OpenSSL configuration on all five systems — /etc/pki/tls/openssl3.cnf on Fedora, /etc/ssl/openssl.cnf elsewhere — and name lookups need /etc/nsswitch.conf only with glibc.