permissions: support workspace roots in profiles

This commit is contained in:
Michael Bolin
2026-05-14 10:24:07 -07:00
parent 01d93fd9fc
commit 9ccddb30a7
40 changed files with 1011 additions and 537 deletions
+3 -3
View File
@@ -588,9 +588,9 @@ pub async fn run_main_with_transport_options(
range: None,
});
}
if let Some(warning) =
codex_core::config::system_bwrap_warning(config.permissions.permission_profile.get())
{
if let Some(warning) = codex_core::config::system_bwrap_warning(
config.permissions.permission_profile_constraint().get(),
) {
config_warnings.push(ConfigWarningNotification {
summary: warning,
details: None,
@@ -164,7 +164,10 @@ impl CommandExecRequestProcessor {
let started_network_proxy = match self.config.permissions.network.as_ref() {
Some(spec) => match spec
.start_proxy(
self.config.permissions.permission_profile.get(),
self.config
.permissions
.permission_profile_constraint()
.get(),
/*policy_decider*/ None,
/*blocked_request_observer*/ None,
managed_network_requirements_enabled,
@@ -243,7 +246,7 @@ impl CommandExecRequestProcessor {
);
self.config
.permissions
.permission_profile
.permission_profile_constraint()
.can_set(&effective_permission_profile)
.map_err(|err| invalid_request(format!("invalid permission profile: {err}")))?;
effective_permission_profile
@@ -264,7 +267,7 @@ impl CommandExecRequestProcessor {
);
self.config
.permissions
.permission_profile
.permission_profile_constraint()
.can_set(&permission_profile)
.map_err(|err| invalid_request(format!("invalid sandbox policy: {err}")))?;
permission_profile