core-agent-ide/codex-rs/utils
Michael Bolin abbd74e2be
feat: make sandbox read access configurable with ReadOnlyAccess (#11387)
`SandboxPolicy::ReadOnly` previously implied broad read access and could
not express a narrower read surface.
This change introduces an explicit read-access model so we can support
user-configurable read restrictions in follow-up work, while preserving
current behavior today.

It also ensures unsupported backends fail closed for restricted-read
policies instead of silently granting broader access than intended.

## What

- Added `ReadOnlyAccess` in protocol with:
  - `Restricted { include_platform_defaults, readable_roots }`
  - `FullAccess`
- Updated `SandboxPolicy` to carry read-access configuration:
  - `ReadOnly { access: ReadOnlyAccess }`
  - `WorkspaceWrite { ..., read_only_access: ReadOnlyAccess }`
- Preserved existing behavior by defaulting current construction paths
to `ReadOnlyAccess::FullAccess`.
- Threaded the new fields through sandbox policy consumers and call
sites across `core`, `tui`, `linux-sandbox`, `windows-sandbox`, and
related tests.
- Updated Seatbelt policy generation to honor restricted read roots by
emitting scoped read rules when full read access is not granted.
- Added fail-closed behavior on Linux and Windows backends when
restricted read access is requested but not yet implemented there
(`UnsupportedOperation`).
- Regenerated app-server protocol schema and TypeScript artifacts,
including `ReadOnlyAccess`.

## Compatibility / rollout

- Runtime behavior remains unchanged by default (`FullAccess`).
- API/schema changes are in place so future config wiring can enable
restricted read access without another policy-shape migration.
2026-02-11 18:31:14 -08:00
..
absolute-path fix: Fix tilde expansion to avoid absolute-path escape (#9621) 2026-01-21 10:43:10 -08:00
approval-presets feat: make sandbox read access configurable with ReadOnlyAccess (#11387) 2026-02-11 18:31:14 -08:00
cache feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
cargo-bin feat: experimental flags (#10231) 2026-02-02 11:06:50 +00:00
cli feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
elapsed feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
fuzzy-match feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
git feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
home-dir Validate CODEX_HOME before resolving (#10249) 2026-01-30 15:46:33 -08:00
image adding image support for gif and webp (#11237) 2026-02-09 14:47:22 -08:00
json-to-toml feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
oss feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
pty Fix flaky windows CI test (#10993) 2026-02-07 08:55:42 -08:00
readiness feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
rustls-provider chore: put crypto provider logic in a shared crate (#11294) 2026-02-10 01:04:31 -08:00
sandbox-summary feat: make sandbox read access configurable with ReadOnlyAccess (#11387) 2026-02-11 18:31:14 -08:00
string Include real OS info in metrics. (#10425) 2026-02-05 06:30:31 -08:00