Skip to content

feat(linux-sandbox): support restricted ReadOnlyAccess in bwrap#12369

Merged
viyatb-oai merged 2 commits intomainfrom
codex/viyatb/linux-bwrap-restricted-readonly-access
Feb 27, 2026
Merged

feat(linux-sandbox): support restricted ReadOnlyAccess in bwrap#12369
viyatb-oai merged 2 commits intomainfrom
codex/viyatb/linux-bwrap-restricted-readonly-access

Conversation

@viyatb-oai
Copy link
Collaborator

@viyatb-oai viyatb-oai commented Feb 20, 2026

Summary

Implements Linux bubblewrap support for restricted ReadOnlyAccess (introduced in #11387) by honoring readable_roots and include_platform_defaults instead of failing closed.

What changed

  • Added a Linux platform-default read allowlist for common system/runtime paths (e.g. /usr, /etc, /lib*, Nix store roots).
  • Updated the bwrap filesystem mount builder to support restricted read access:
    • Full-read policies still use --ro-bind / /
    • Restricted-read policies now start from--tmpfs/ and add scoped --ro-bind mounts
  • Preserved existing writable-root and protected-subpath behavior (.git, .codex, etc.).

ReadOnlyAccess::Restricted was already modeled in protocol, but Linux bwrap still returned UnsupportedOperation for restricted read access. This closes that gap for the active Linux filesystem backend.

Notes

Legacy Linux Landlock fallback still fail-closes for restricted read access (unchanged).

@viyatb-oai viyatb-oai marked this pull request as ready for review February 20, 2026 23:06
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/linux-bwrap-restricted-readonly-access branch from 3460468 to 32bb804 Compare February 22, 2026 17:44
@viyatb-oai viyatb-oai requested a review from bolinfest February 25, 2026 08:20
@viyatb-oai viyatb-oai merged commit a39d76d into main Feb 27, 2026
73 of 77 checks passed
@viyatb-oai viyatb-oai deleted the codex/viyatb/linux-bwrap-restricted-readonly-access branch February 27, 2026 23:25
@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants