This commit is contained in:
Fouad Matin
2025-09-04 13:13:42 -07:00
parent dd2c9ed676
commit 609d69d3ba
9 changed files with 248 additions and 101 deletions

View File

@@ -1,10 +1,10 @@
use std::path::PathBuf;
use codex_common::CliConfigOverrides;
use codex_core::config::AdminAuditContext;
use codex_core::config::Config;
use codex_core::config::ConfigOverrides;
use codex_core::config::maybe_post_admin_audit_events;
use codex_core::config::audit_admin_run_with_prompt;
use codex_core::config::prompt_for_admin_danger_reason;
use codex_core::exec_env::create_env;
use codex_core::landlock::spawn_command_under_linux_sandbox;
use codex_core::seatbelt::spawn_command_under_seatbelt;
@@ -77,14 +77,7 @@ async fn run_command_under_sandbox(
..Default::default()
},
)?;
maybe_post_admin_audit_events(
&config,
AdminAuditContext {
sandbox_policy: &config.sandbox_policy,
dangerously_bypass_requested: false,
},
)
.await;
audit_admin_run_with_prompt(&config, prompt_for_admin_danger_reason(&config), false).await?;
let stdio_policy = StdioPolicy::Inherit;
let env = create_env(&config.shell_environment_policy);