mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +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:
1 parent
70e8fe1be3
commit
a4ee536f01
15 files changed
+635
-151
No files matched your search
@@ -85,7 +85,7 @@ async fn discover_root(
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
if sandbox.is_some_and(|context| {
|
||||
context.should_run_in_sandbox() && !context.windows_sandbox_is_requested()
|
||||
context.should_read_from_sandbox() && !context.windows_sandbox_is_requested()
|
||||
}) {
|
||||
discovery.error = Some("filesystem sandbox is unavailable on this executor".to_string());
|
||||
return discovery;
|
||||
|
||||
Reference in new issue
Block a user