Skip to content

Enforce workspace metadata protections in Seatbelt#19847

Draft
evawong-oai wants to merge 1 commit intocodex/bugb15632-policy-primitivefrom
codex/bugb15632-seatbelt-preserved-paths
Draft

Enforce workspace metadata protections in Seatbelt#19847
evawong-oai wants to merge 1 commit intocodex/bugb15632-policy-primitivefrom
codex/bugb15632-seatbelt-preserved-paths

Conversation

@evawong-oai
Copy link
Copy Markdown
Contributor

@evawong-oai evawong-oai commented Apr 27, 2026

Summary

Teach the macOS Seatbelt sandbox to enforce protected workspace metadata names supplied by the shared policy primitive.

Scope

  1. Thread protected_metadata_names into Seatbelt access roots.
  2. Emit sandbox rules that deny creating or replacing protected metadata path names under writable roots.
  3. Add coverage for first time metadata path creation attempts and read only carveouts.

Reviewer Focus

  1. This PR only covers the macOS sandbox path.
  2. Metadata names are supplied by policy rather than hard coded in command preflight.
  3. Read only subpath carveouts and metadata protection checks should compose cleanly.

Stack

  1. Policy primitive: Add workspace metadata protection policy primitive #19846
  2. macOS Seatbelt enforcement: this PR
  3. Shell preflight UX: Add workspace metadata shell preflight #19848
  4. Runtime permission propagation: Propagate runtime permission profiles #19849
  5. Linux bubblewrap enforcement: Enforce workspace metadata protections in Linux sandbox #19852

Validation

  1. cargo test --manifest-path codex-rs/Cargo.toml -p codex-sandboxing seatbelt
  2. cargo fmt --manifest-path codex-rs/Cargo.toml --package codex-sandboxing

@evawong-oai evawong-oai force-pushed the codex/bugb15632-policy-primitive branch from 82c9632 to 1bbee67 Compare April 27, 2026 18:31
@evawong-oai evawong-oai force-pushed the codex/bugb15632-seatbelt-preserved-paths branch 2 times, most recently from fe774aa to 017761a Compare April 27, 2026 18:40
@evawong-oai evawong-oai force-pushed the codex/bugb15632-policy-primitive branch from 1bbee67 to 3353479 Compare April 27, 2026 18:40
@evawong-oai evawong-oai force-pushed the codex/bugb15632-seatbelt-preserved-paths branch from 017761a to 613fe13 Compare April 27, 2026 18:55
@evawong-oai evawong-oai force-pushed the codex/bugb15632-policy-primitive branch from 0cfa95f to a99da8c Compare April 27, 2026 19:07
@evawong-oai evawong-oai force-pushed the codex/bugb15632-seatbelt-preserved-paths branch from 613fe13 to 6e4de4c Compare April 27, 2026 19:07
@evawong-oai evawong-oai force-pushed the codex/bugb15632-policy-primitive branch from a99da8c to 5b59ee3 Compare April 27, 2026 19:48
@evawong-oai evawong-oai force-pushed the codex/bugb15632-seatbelt-preserved-paths branch 2 times, most recently from 0b8c428 to 6541b90 Compare April 27, 2026 20:52
@evawong-oai evawong-oai force-pushed the codex/bugb15632-policy-primitive branch 2 times, most recently from 01771db to 11fa852 Compare April 27, 2026 21:14
@evawong-oai evawong-oai force-pushed the codex/bugb15632-seatbelt-preserved-paths branch from 6541b90 to c2bf30f Compare April 27, 2026 21:14
@evawong-oai evawong-oai force-pushed the codex/bugb15632-policy-primitive branch from 11fa852 to ab4b378 Compare April 27, 2026 22:21
@evawong-oai evawong-oai force-pushed the codex/bugb15632-seatbelt-preserved-paths branch from c2bf30f to 5e3f0d4 Compare April 27, 2026 22:21
@evawong-oai evawong-oai force-pushed the codex/bugb15632-policy-primitive branch from ab4b378 to 8e60a50 Compare April 28, 2026 00:10
@evawong-oai evawong-oai force-pushed the codex/bugb15632-seatbelt-preserved-paths branch from 5e3f0d4 to ea88850 Compare April 28, 2026 00:10
@evawong-oai evawong-oai force-pushed the codex/bugb15632-seatbelt-preserved-paths branch from ea88850 to c008a8f Compare April 28, 2026 01:10
@evawong-oai evawong-oai force-pushed the codex/bugb15632-policy-primitive branch from 8e60a50 to 0b263d0 Compare April 28, 2026 01:10
@evawong-oai evawong-oai changed the title Enforce preserved path names in Seatbelt Enforce workspace metadata protections in Seatbelt Apr 28, 2026
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