shell-escalation: carry resolved permission profiles

This commit is contained in:
Michael Bolin
2026-04-22 17:00:49 -07:00
parent 9a5c6fd46d
commit dfd66aa244
6 changed files with 52 additions and 37 deletions
+2 -2
View File
@@ -22,10 +22,10 @@ pub use unix::ExecParams;
#[cfg(unix)]
pub use unix::ExecResult;
#[cfg(unix)]
pub use unix::Permissions;
#[cfg(unix)]
pub use unix::PreparedExec;
#[cfg(unix)]
pub use unix::ResolvedPermissionProfile;
#[cfg(unix)]
pub use unix::ShellCommandExecutor;
#[cfg(unix)]
pub use unix::Stopwatch;
@@ -922,7 +922,7 @@ mod tests {
server,
Arc::new(DeterministicEscalationPolicy {
decision: EscalationDecision::escalate(EscalationExecution::Permissions(
EscalationPermissions::PermissionProfile(PermissionProfile {
EscalationPermissions::AdditionalPermissionProfile(PermissionProfile {
network: Some(NetworkPermissions {
enabled: Some(true),
}),
@@ -931,12 +931,14 @@ mod tests {
)),
}),
Arc::new(PermissionAssertingShellCommandExecutor {
expected_permissions: EscalationPermissions::PermissionProfile(PermissionProfile {
network: Some(NetworkPermissions {
enabled: Some(true),
}),
..Default::default()
}),
expected_permissions: EscalationPermissions::AdditionalPermissionProfile(
PermissionProfile {
network: Some(NetworkPermissions {
enabled: Some(true),
}),
..Default::default()
},
),
}),
CancellationToken::new(),
CancellationToken::new(),
+1 -1
View File
@@ -76,4 +76,4 @@ pub use self::escalation_policy::EscalationPolicy;
pub use self::execve_wrapper::main_execve_wrapper;
pub use self::stopwatch::Stopwatch;
pub use codex_protocol::approvals::EscalationPermissions;
pub use codex_protocol::approvals::Permissions;
pub use codex_protocol::approvals::ResolvedPermissionProfile;