Skip to content

Commit bef36f4

Browse files
authored
feat: if .codex is a sub-folder of a writable root, then make it read-only to the sandbox (openai#8088)
In preparation for in-repo configuration support, this updates `WritableRoot::get_writable_roots_with_cwd()` to include the `.codex` subfolder in `WritableRoot.read_only_subpaths`, if it exists, as we already do for `.git`. As noted, currently, like `.git`, `.codex` will only be read-only under macOS Seatbelt, but we plan to bring support to other OSes, as well. Updated the integration test in `seatbelt.rs` so that it actually attempts to run the generated Seatbelt commands, verifying that: - trying to write to `.codex/config.toml` in a writable root fails - trying to write to `.git/hooks/pre-commit` in a writable root fails - trying to write to the writable root containing the `.codex` and `.git` subfolders succeeds
1 parent f074e57 commit bef36f4

File tree

3 files changed

+228
-66
lines changed

3 files changed

+228
-66
lines changed

0 commit comments

Comments
 (0)