mirror of
https://github.com/openai/codex.git
synced 2026-09-17 12:23:33 +00:00
## Why Resolving attacker-mutable path components while preparing a Seatbelt profile can let a writable root be rebound to a different location before the sandbox is applied. File roots also need to remain confined to the file itself rather than granting access to descendants after replacement. ## What changed - Preserve mutable components of writable-root paths until Seatbelt binds them, while still normalizing trusted top-level aliases such as `/tmp`. - Use literal grants for existing file and device roots, and subpath grants for directories and missing roots. - Exclude both logical and resolved forms of protected subpaths so symlinked metadata directories remain read-only. ## Testing Add coverage for ancestor rebinding, file-root symlink and directory replacement, missing directory roots, top-level aliases, and symlinked metadata carveouts. GitOrigin-RevId: 63c00e44dd30766e873b8acdad09d6657657fad9