From 8aaf839774b90387b885f623efce95ec1bed8092 Mon Sep 17 00:00:00 2001 From: Dylan Hurd Date: Thu, 20 Aug 2026 00:43:04 +0000 Subject: [PATCH] Exercise restricted-token sandboxing in cyber policy tests (#39646) ## What changed Run both branches of the heuristically safe command policy test with the Windows sandbox level set to `RestrictedToken`. GitOrigin-RevId: ae5d754ec4a51d73a8e5f9d844f94a91f795fb72 --- codex-rs/core/src/exec_policy/model_policy_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/exec_policy/model_policy_tests.rs b/codex-rs/core/src/exec_policy/model_policy_tests.rs index 9541513435..b094db40e5 100644 --- a/codex-rs/core/src/exec_policy/model_policy_tests.rs +++ b/codex-rs/core/src/exec_policy/model_policy_tests.rs @@ -174,7 +174,7 @@ async fn cyber_policy_keeps_heuristically_safe_commands_inside_the_sandbox() { approval_policy: AskForApproval::OnRequest, permission_profile: PermissionProfile::read_only(), environment_policy: None, - windows_sandbox_level: WindowsSandboxLevel::Disabled, + windows_sandbox_level: WindowsSandboxLevel::RestrictedToken, sandbox_permissions: SandboxPermissions::UseDefault, prefix_rule: None, allow_prefix_rules: AllowPrefixRules::IgnoreForCyberModel, @@ -194,7 +194,7 @@ async fn cyber_policy_keeps_heuristically_safe_commands_inside_the_sandbox() { approval_policy: AskForApproval::OnRequest, permission_profile: PermissionProfile::read_only(), environment_policy: None, - windows_sandbox_level: WindowsSandboxLevel::Disabled, + windows_sandbox_level: WindowsSandboxLevel::RestrictedToken, sandbox_permissions: SandboxPermissions::UseDefault, prefix_rule: None, allow_prefix_rules: AllowPrefixRules::Honor,