feat(registry): run the documentation worker's renders in bubblewrap #500
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/497-registry-bubblewrap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Step 1 of #233.
Every
torbrun of the documentation worker (sandboxed, including the--versionprobe ofstarted) runs inside bubblewrap:REGISTRY_DOC_ISOLATION(bwrapdefault,nonefor the tests' stand-in toolchain and development).bwrapsits betweenprlimitandenv -iwith--unshare-all --die-with-parent --new-session, uid/gid 65534, read-only/usr, system links and toolchain directory,/proc,/dev, an empty/tmp, and the scratch directory as the only writable path. The worker refuses to start when the probe fails inside bubblewrap and when its scratch directory lies inside the storage or database path.Dockerfile.registryinstallsbubblewrap; README,documentation.trbcomment, compose comments and RELEASE.md 7.7 say what is isolated and that the container's namespace permission is step 2.Tests (
tools/registry/tests/documentation-isolation.test.trb): argument list, stand-in run (environ, file beside the scratch, network, uid, writable work dir; skipped with a printed note where bwrap does not work), probe failure message, unknown mode, scratch inside storage/database. Checked locally with the nightly toolchain:torb check,torb format, and this test file (bwrap is not available on this host, so the isolation run itself is exercised in CI only if the runner allows user namespaces).Part of #233
Closes #497
cd352aa846584a9d3c1bChecklist on
584a9d3:documentation-isolation.test.trbcovers the exact argument list (order prlimit < bwrap < env), a stand-in run (environ, file beside scratch, write beside, network, uid, writable work dir, probe-gated with a printed skip note), probe failure message, unknown mode, scratch inside storage/database, andnoneunchanged. Existing documentation tests pinned tonone. CI green for this head (tier A/B, registry tools, gates, pdisc).env -i;/tmptmpfs is mounted before the toolchain and scratch binds, so a toolchain or scratch below/tmpstays visible; fail-closed probe instarted; unknown mode refused; scratch-inside-storage/database check handlesfile://and trailing slash.--die-with-parent,--new-session,--clearenv; no secrets in the diff;bubblewrapis a Debian package in the existing apt line.Non-blocking: the isolation run itself is only exercised where the runner allows user namespaces; step 2 should add the live check that the worker starts in the deployed container.