Files
codex/codex-rs/sandboxing/BUILD.bazel
Jeremy Rose 21facf2273 Restrict macOS preference reads to full-disk policies (#39811)
## Why

The macOS preferences service can expose data outside a sandbox's allowed
filesystem read roots.

## What changed

- Move the Seatbelt preference and `cfprefsd` grants into a separate policy
  section that is included only when filesystem reads are unrestricted.
- Remove the equivalent grants from the restricted platform defaults.

## Testing

- Verify both Seatbelt profiles include preference grants only for full-disk
  read policies, including policies with denied paths or globs.
- Verify a restricted sandbox cannot retrieve a preference whose plist is
  denied, while an unrestricted read policy can.

GitOrigin-RevId: 90388366a7302bca1830ad0439544be8babc7321
2026-08-20 23:18:55 +00:00

14 lines
375 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",
"src/seatbelt_preferences_policy.sbpl",
],
crate_name = "codex_sandboxing",
test_tags = ["no-sandbox"],
)