add: admin config

This commit is contained in:
Fouad Matin
2025-09-04 10:37:31 -07:00
parent db5276f8e6
commit dd2c9ed676
10 changed files with 468 additions and 24 deletions

View File

@@ -1,8 +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::exec_env::create_env;
use codex_core::landlock::spawn_command_under_linux_sandbox;
use codex_core::seatbelt::spawn_command_under_seatbelt;
@@ -75,6 +77,14 @@ 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;
let stdio_policy = StdioPolicy::Inherit;
let env = create_env(&config.shell_environment_policy);