Skip to content

fix: preserve minimal /dev mounts in linux sandboxes#83

Merged
jy-tan merged 1 commit intomainfrom
dev-rebind
Mar 19, 2026
Merged

fix: preserve minimal /dev mounts in linux sandboxes#83
jy-tan merged 1 commit intomainfrom
dev-rebind

Conversation

@jy-tan
Copy link
Contributor

@jy-tan jy-tan commented Mar 19, 2026

Summary

Fix Linux minimal /dev setup so core device nodes remain usable in containerized sandboxes, even when the sandbox later makes / writable.

This addresses Tusk CLI replay failures where /dev/null and /dev/urandom existed but returned EACCES because a later root bind could effectively override the earlier /dev mount setup.

Changes

  • Explicitly re-bind the core device nodes needed by common runtimes in Linux minimal mode
  • Dedupe core and user-provided devices.allow passthroughs through a shared helper
  • If the config has allowWrite: ["/"], insert a writable --bind / / before special /dev and /proc mounts so broad write access cannot clobber the sandbox device configuration
  • Add regression coverage for core device passthroughs, duplicate passthrough requests, and the root-bind ordering case

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@jy-tan jy-tan merged commit 8d96d46 into main Mar 19, 2026
5 checks passed
@jy-tan jy-tan deleted the dev-rebind branch March 19, 2026 23: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