Skip to content

fix(sandbox): restrict provider file mode - #4093

Merged
drew merged 2 commits into
mainfrom
codex/fix/4091-provider-file-mode/drew
Oct 2, 2026
Merged

drew merged 2 commits into
mainfrom
codex/fix/4091-provider-file-mode/drew

Conversation

@drew

@drew drew commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Provider-managed files are delivered through sealed, read-only memfds, but the descriptors report mode 777 by default. Set their mode to 600 so sandbox workloads inspecting file metadata see private permissions.

Related Issue

Closes #4091

Changes

  • Set mode 600 on each provider memfd before serving it.
  • Assert the mode in a unit test and from inside a Docker sandbox using the provider profile file path.

Testing

  • Checks appropriate to the affected code and behavior pass (commit hook, including Rust format and lint)
  • Unit tests added/updated: cargo test -p openshell-sandbox provider_files --lib (3 passed)
  • E2E tests added/updated: Docker provider_files test (1 passed)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (not applicable)

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew
drew requested review from a team, derekwaynecarr, mrunalp and sjenning as code owners October 2, 2026 00:22
johntmyers
johntmyers previously approved these changes Oct 2, 2026
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew drew added the test:e2e Requires end-to-end coverage label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Label test:e2e applied for f68d7e7. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@drew
drew added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 8719fc9 Oct 2, 2026
162 checks passed
@drew
drew deleted the codex/fix/4091-provider-file-mode/drew branch October 2, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: provider-managed files report mode 777 to sandbox workloads

3 participants