Files
codex/codex-rs/sandboxing/BUILD.bazel
T
jif f6950546e5 Protect macOS Seatbelt writable root anchors (#39599)
## Why

A sandboxed process could replace a writable directory root, changing the
authority boundary used to construct a later sandbox policy.

## What changed

- Deny unlinking or renaming directory roots granted write access by Seatbelt,
  while preserving replacement and deletion behavior for writable files.
- Reject writable roots with nested symlink components and report these as
  Seatbelt preparation errors instead of network proxy failures.
- Normalize writable roots before adding them to the generated Seatbelt policy.

## Testing

Add coverage for symlink rejection, error classification, directory-root
replacement and rename protection, newly created roots, and writable file
replacement.

GitOrigin-RevId: ab1ed4e55f20034bc43e028e6529d3d1f0d8181c
2026-08-20 05:36:23 +00:00

13 lines
327 B
Python

load("//:defs.bzl", "codex_rust_crate")
codex_rust_crate(
name = "sandboxing",
compile_data = [
"src/restricted_read_only_platform_defaults.sbpl",
"src/seatbelt_base_policy.sbpl",
"src/seatbelt_network_policy.sbpl",
],
crate_name = "codex_sandboxing",
test_tags = ["no-sandbox"],
)