Skip to content

Reject sandbox-writable bubblewrap executables from PATH - #51211

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/188c9f45e727eaace062f5abb1205dc23fdf3c51
Oct 6, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/188c9f45e727eaace062f5abb1205dc23fdf3c51

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Reject sandbox-writable bubblewrap executables from PATH

Why

Bubblewrap discovery probes executables before confinement. Excluding only the command's current directory leaves candidates in other writable roots eligible to run outside the sandbox.

What changed

  • Filter canonical PATH candidates using the filesystem policy and effective user permissions, including writable ancestors, symlinked roots, and full-disk write access. Preserve protected system installations while rejecting replaceable paths.
  • Select the launcher with the command's permissions before the proc-mount preflight, retaining the bundled bubblewrap fallback.
  • Use the effective permission profile and policy working directory for startup warning probes.

Testing

Add unit coverage for writable roots, symlinks, read-only carveouts, replaceable parents, and full-disk policies. Add Linux integration tests showing writable bwrap candidates are neither probed nor launched, including when the command runs in a workspace subdirectory or uses managed networking with full-disk write access.

## Why

Bubblewrap discovery probes executables before confinement. Excluding only the command's current directory leaves candidates in other writable roots eligible to run outside the sandbox.

## What changed

- Filter canonical `PATH` candidates using the filesystem policy and effective user permissions, including writable ancestors, symlinked roots, and full-disk write access. Preserve protected system installations while rejecting replaceable paths.
- Select the launcher with the command's permissions before the proc-mount preflight, retaining the bundled bubblewrap fallback.
- Use the effective permission profile and policy working directory for startup warning probes.

## Testing

Add unit coverage for writable roots, symlinks, read-only carveouts, replaceable parents, and full-disk policies. Add Linux integration tests showing writable `bwrap` candidates are neither probed nor launched, including when the command runs in a workspace subdirectory or uses managed networking with full-disk write access.

GitOrigin-RevId: 188c9f45e727eaace062f5abb1205dc23fdf3c51
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/188c9f45e727eaace062f5abb1205dc23fdf3c51 branch from b1a3e3a to 7aa8f51 Compare October 6, 2026 00:58
@copyberry
copyberry Bot merged commit 7aa8f51 into main Oct 6, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/188c9f45e727eaace062f5abb1205dc23fdf3c51 branch October 6, 2026 00:58
@victorocvme
victorocvme deployed to issue-triage October 6, 2026 01:00 — with GitHub Actions Active
@victorocvme
victorocvme deployed to issue-triage October 6, 2026 01:00 — with GitHub Actions Active
@victorocvme
victorocvme deployed to issue-triage October 6, 2026 01:00 — with GitHub Actions Active
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 2026
@M4rkzzz
M4rkzzz deployed to issue-triage October 6, 2026 01:08 — with GitHub Actions Active
@M4rkzzz
M4rkzzz deployed to issue-triage October 6, 2026 01:08 — with GitHub Actions Active
@M4rkzzz
M4rkzzz deployed to issue-triage October 6, 2026 01:08 — with GitHub Actions Active
@ANTVirGEO
ANTVirGEO deployed to issue-triage October 6, 2026 01:13 — with GitHub Actions Active
@ANTVirGEO
ANTVirGEO deployed to issue-triage October 6, 2026 01:13 — with GitHub Actions Active
@ANTVirGEO
ANTVirGEO deployed to issue-triage October 6, 2026 01:13 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 7aa8f510 Deployed Oct 6, 2026 by ANTVirGEO via Identify potential duplicates (all issues) #52104
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.

4 participants