mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Review terminal input against retained permissions (#41328)
## Why An existing terminal keeps the sandbox, network settings, and grants it had at launch. Later `write_stdin` calls must account for that retained authority, including when permissions change between turns. ## What changed - Capture each terminal's effective launch permissions and compare them with the current environment before accepting non-empty input. - Request approval when the terminal bypassed the sandbox, retains additional grants, strict auto-review is active, or its sandbox or network settings differ from the current policy. - Reject input when current denied-read or environment-owned network restrictions cannot be enforced by the existing terminal, while keeping empty polls and non-TTY interrupts available without review. - Include the effective sandbox mode and user-visible additional grants in `write_stdin` approval actions without exposing host-owned grant paths. ## Testing Added unit and end-to-end coverage for retained cross-turn grants, strict auto-review, sandbox and network policy changes, denied reads, Windows sandbox backends, and private grant redaction. GitOrigin-RevId: e2d71daf9358474c885998786c4928069100711c
This commit is contained in:
1 parent
31d338a1ea
commit
5eea8d0dd3
17 files changed
+959
-61
No files matched your search
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: core/src/unified_exec/stdin_approval_tests.rs
|
||||
expression: reason
|
||||
---
|
||||
Send input to an existing terminal. This terminal retains additional permissions. It also has an internal plugin metrics write grant. The cwd is its launch directory; the terminal's current directory and state may have changed.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: core/src/unified_exec/stdin_approval_tests.rs
|
||||
expression: reason
|
||||
---
|
||||
Send input to an existing terminal. This terminal retains sandbox or network settings that differ from the current permissions. The cwd is its launch directory; the terminal's current directory and state may have changed.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: core/src/unified_exec/stdin_approval_tests.rs
|
||||
expression: reason
|
||||
---
|
||||
Send input to an existing terminal. This terminal was launched outside the sandbox, bypassing any managed network proxy. The cwd is its launch directory; the terminal's current directory and state may have changed.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: core/src/unified_exec/stdin_approval_tests.rs
|
||||
expression: permissions.approval_reason(expected)?
|
||||
---
|
||||
Send input to an existing terminal. This terminal runs without a filesystem sandbox. The cwd is its launch directory; the terminal's current directory and state may have changed.
|
||||
Reference in new issue
Block a user