mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Add executor-context filesystem permission helpers (#43939)
## Why Filesystem policies for remote execution need to interpret paths, home directories, and temporary directories using the execution host's context. ## What changed - Add context-based read-denial matching, read-access checks, glob resolution, and `PathUri` workspace-write constructors without consulting local paths or environment variables. - Share managed read-denial validation through `DenyReadValidator` and use it in core configuration, preserving required-entry checks, concrete grant validation, and constraint diagnostics. - Reject invalid or unresolvable denial paths when constructing a context-based matcher, and apply `/tmp` denials according to the execution host's path convention. - Preserve workspace-root symbols and protected metadata entries when materializing URI-based writable roots. ## Testing Add regression tests for POSIX, Windows, and UNC path matching; conflicting read and write grants; malformed or unresolvable denials; `/tmp` handling; and workspace metadata protection. GitOrigin-RevId: aa2b174288d1172ab52ff485f58d306236d27652
This commit is contained in:
1 parent
1032738aa0
commit
c53f342fec
7 files changed
+596
-35
No files matched your search
@@ -24,8 +24,12 @@ use crate::protocol::NetworkAccess;
|
||||
use crate::protocol::SandboxPolicy;
|
||||
use crate::protocol::WritableRoot;
|
||||
|
||||
mod deny_read_validator;
|
||||
mod target;
|
||||
mod windows_glob;
|
||||
|
||||
pub use deny_read_validator::DenyReadValidator;
|
||||
pub use deny_read_validator::DenyReadViolation;
|
||||
pub use windows_glob::WindowsDenyReadGlobScan;
|
||||
pub use windows_glob::windows_deny_read_glob_scan;
|
||||
|
||||
|
||||
Reference in new issue
Block a user