mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user