feat: allow limited git writes in workspace sandbox

Co-authored-by: Codex noreply@openai.com
This commit is contained in:
viyatb-oai
2026-04-24 09:29:42 -07:00
committed by David Wiesen
co-authored by Codex noreply@openai.com
parent a9c111da54
commit 5efa14eaa3
54 changed files with 686 additions and 228 deletions
@@ -485,6 +485,7 @@ fn summarize_sandbox_policy(sandbox_policy: &SandboxPolicy) -> String {
exclude_tmpdir_env_var,
exclude_slash_tmp,
read_only_access: _,
allow_limited_git_writes: _,
} => {
let mut summary = "workspace-write".to_string();
let mut writable_entries = vec!["workdir".to_string()];
+1
View File
@@ -424,6 +424,7 @@ fn session_configured_from_thread_response_uses_review_policy_from_response() {
writable_roots: vec![],
read_only_access: codex_app_server_protocol::ReadOnlyAccess::FullAccess,
network_access: false,
allow_limited_git_writes: false,
exclude_tmpdir_env_var: false,
exclude_slash_tmp: false,
},
+3
View File
@@ -184,6 +184,7 @@ async fn python_multiprocessing_lock_works_under_sandbox() {
writable_roots,
read_only_access: Default::default(),
network_access: false,
allow_limited_git_writes: false,
exclude_tmpdir_env_var: false,
exclude_slash_tmp: false,
};
@@ -299,6 +300,7 @@ async fn sandbox_distinguishes_command_and_policy_cwds() {
writable_roots: vec![],
read_only_access: Default::default(),
network_access: false,
allow_limited_git_writes: false,
exclude_tmpdir_env_var: true,
exclude_slash_tmp: true,
};
@@ -381,6 +383,7 @@ async fn sandbox_blocks_first_time_dot_codex_creation() {
writable_roots: vec![],
read_only_access: Default::default(),
network_access: false,
allow_limited_git_writes: false,
exclude_tmpdir_env_var: true,
exclude_slash_tmp: true,
};