Files
codex/codex-rs/sandboxing
viyatb-oai 8cae463a69 Honor declared filesystem permissions in Windows sandboxes (#64416)
## Why

MXC volume expansion can generate child grants that override restrictions on
directory aliases. The restricted-token backend can also reject valid workspace
policies because its compatibility check assumes the working directory is
writable.

## What changed

- Check directory identity before MXC expands writable volume roots. Suppress
  generated write grants that conflict with read-only aliases, including through
  junctions on other volumes, while preserving narrower explicit grants.
  Reject launch if a writable volume is also denied or its relationship to a
  restricted directory cannot be determined.
- Let the restricted-token backend accept the supplied workspace roots when
  the working directory has no explicit write grant, while retaining exact
  root matching for filesystem-root write grants.

## Testing

Add regression coverage for restricted volume aliases, junctions across
writable roots, explicit drive-root denials, and restricted-token workspace
roots with nested or read-only working directories or an empty root list.

GitOrigin-RevId: 0cd880b52185d0a38c479df17ae48aa68d45eeb1
2026-11-28 03:18:17 +00:00
..