refactor: make Linux bootstrap independent of shell utilities - #203
Conversation
|
We've triggered an ultrareview automatically — This is a significant refactor of the core Linux sandbox initialization path, replacing shell-based bootstrapping with a Go initializer. It touches security-critical components like Landlock enforcement, network relay logic, and the process execution chain.... I'll post findings when complete. An ultrareview is cubic's deepest review, catching hard-to-find bugs in the most critical PRs. It runs a longer, multi-pass analysis using cubic's most capable review models, and typically takes around 30 minutes. It consumes your team's reviewed-lines allowance at 3× the standard rate. Automated ultrareviews are disabled by default. We triggered this run as part of your trial. Want cubic to do this for every high-risk PR? Enable auto-ultrareview in your settings. |
There was a problem hiding this comment.
Ultrareview completed in 30m 30s
All reported issues were addressed across 32 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 16 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
If I read those tests correctly, they only trigger if I am currently experimenting with adding a nixos-vm test to the nixpkgs build definition that actually creates a nixos-vm, and checks the behavior of fence inside of it. Would you be interested to extend the nix code in this repo to customize said test with a locally built binary so this test is also runnable from this repo? |
Preserve main's IPv6 localhost bridges and Linux path-policy fixes while keeping the Go bootstrap implementation.
|
@dwt I'll look into generalizing the multicall regression test. And yes, happy to include a NixOS VM test in this repo. |
Summary
Replace the generated shell-based Linux bootstrap with a short-lived Go initializer and dedicated bridge helper. Fence initialization no longer depends on shell utilities that can be collaterally masked when runtime-denied commands share a multicall binary, fixing the Nix/BusyBox failure behind #90.
Changes
/tmpmount even when/tmpis explicitly allowlisted for writesCompatibility
Linux library callers must now configure a compatible helper with
Manager.SetLinuxHelperPath. Applications using their own executable as the helper must dispatch private modes throughfence.DispatchInternalHelper. The Fence CLI configures this automatically.