Review saved exec escalations when read denials apply (#63743)

## Why

A saved command allow rule can skip review, but it cannot authorize
broader filesystem access when the sandbox enforces read denials. This
left explicit escalation requests running with baseline permissions even
when Guardian could review the request and the executor could preserve
the denials.

## What changed

Route those explicit `exec_command` escalation requests through Guardian
when auto-review is configured and the executor supports widening access
while preserving read denials. Tell Guardian that approval can broaden
filesystem access outside the denied paths and globs.

Evaluate read denials and sandbox selection using the target executor's
path conventions. A `:slash_tmp` denial applies on Linux and has no
effect on Windows.

## Testing

Cover Guardian approval and rejection for commands with saved allow
rules, plus `:slash_tmp` handling on current and legacy Linux and Windows
executors.

GitOrigin-RevId: abfe9888a1e168cfebb64e3faf12546e1f626aa2
This commit is contained in:
viyatb-oai
2026-11-24 21:27:17 +00:00
committed by copyberry
parent 20c7f26cd2
commit f22cc03b04
18 changed files with 310 additions and 94 deletions
+1 -1
View File
@@ -695,7 +695,7 @@ impl FileSystemSandboxPolicy {
}
/// Returns whether this policy denies reads on the selected executor.
fn has_denied_read_restrictions_for_convention(
pub fn has_denied_read_restrictions_for_convention(
&self,
convention: Option<PathConvention>,
) -> bool {