mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Route filesystem reads and writes by their own sandbox permissions (#46122)
## Why Filesystem reads previously required a sandbox whenever writes were restricted, even with full-disk read permission. This made permitted reads depend on sandbox availability. ## What changed - Select sandboxing independently for reads and writes, allowing full-disk reads directly while keeping restricted operations sandboxed. - Use the executor's path convention when evaluating full-disk access, including `:slash_tmp` denials. - Apply read-specific checks to capability discovery and skill resource reads, allowing unrestricted reads on executors without sandboxed discovery support. ## Testing Add regression tests for direct read APIs, restricted writes and reads, executor-specific permission rules, and capability discovery without sandbox support. Update Windows tests to verify sandbox enforcement through writes. GitOrigin-RevId: a03844bd1f0ea583bb54326683cddbfdd050119f
This commit is contained in:
committed by
copyberry
parent
70e8fe1be3
commit
a4ee536f01
@@ -82,7 +82,7 @@ impl FileSystemHandler {
|
||||
sandbox
|
||||
.validate_file_system_paths_for_current_host()
|
||||
.is_ok()
|
||||
&& sandbox.should_run_in_sandbox()
|
||||
&& sandbox.should_read_from_sandbox()
|
||||
&& (!cfg!(target_os = "windows") || sandbox.windows_sandbox_is_requested())
|
||||
&& params
|
||||
.roots
|
||||
|
||||
Reference in New Issue
Block a user