mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
feat: allow limited git writes in workspace sandbox
Co-authored-by: Codex noreply@openai.com
This commit is contained in:
committed by
David Wiesen
co-authored by
Codex noreply@openai.com
parent
a9c111da54
commit
5efa14eaa3
@@ -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()];
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user