permissions: migrate approval and sandbox consumers to profiles

This commit is contained in:
Michael Bolin
2026-04-26 01:27:42 -07:00
parent 3b05121247
commit f2a6946aa7
25 changed files with 367 additions and 165 deletions
+4 -1
View File
@@ -89,13 +89,16 @@ async fn spawn_command_under_sandbox(
env: HashMap<String, String>,
) -> std::io::Result<Child> {
use codex_core::spawn_command_under_linux_sandbox;
use codex_protocol::models::PermissionProfile;
let codex_linux_sandbox_exe = core_test_support::find_codex_linux_sandbox_exe()
.map_err(|err| io::Error::new(io::ErrorKind::NotFound, err))?;
let permission_profile = PermissionProfile::from_legacy_sandbox_policy(sandbox_policy);
spawn_command_under_linux_sandbox(
codex_linux_sandbox_exe,
command,
command_cwd,
sandbox_policy,
&permission_profile,
sandbox_cwd,
/*use_legacy_landlock*/ false,
stdio_policy,