mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Make permission transforms aware of executor path context (#41909)
## What changed - Add context-aware normalization, materialization, and intersection helpers for additional filesystem permissions. - Resolve project roots, home-relative deny globs, temporary directories, and filesystem roots from the executor's `FileSystemSandboxPolicyContext` while preserving URI path conventions and symlinked paths. - Keep deny constraints when intersecting grants across POSIX, Windows, and UNC paths, and reject incompatible path conventions when executor context is available. ## Testing - Cover cross-convention validation, empty temporary-directory contexts, home-relative deny globs, and rooted deny globs for POSIX, Windows, and UNC paths. GitOrigin-RevId: 14fd866a17a0ac4a595aa4f0e2fb82bfae1a8838
This commit is contained in:
1 parent
2f0a5d5516
commit
b51b07785b
6 files changed
+534
-246
No files matched your search
@@ -303,8 +303,7 @@ fn write_permissions_for_paths_keep_dirs_outside_workspace_root() {
|
||||
);
|
||||
|
||||
let permissions = write_permissions_for_paths(&[file_path], &sandbox_policy, &cwd_abs);
|
||||
let expected_outside =
|
||||
dunce::simplified(&outside.canonicalize().expect("canonicalize outside dir")).abs();
|
||||
let expected_outside = outside.abs();
|
||||
|
||||
assert_eq!(
|
||||
permissions
|
||||
|
||||
Reference in new issue
Block a user