mirror of
https://github.com/openai/codex.git
synced 2026-11-16 06:54:36 +00:00
Reject oversized reviewed terminal input (#41159)
## Why Reviewing a shortened `write_stdin` action while sending the complete input could allow unreviewed bytes to reach an escalated terminal. ## What changed - Require the fully formatted action and approval reason to fit within 8,000 bytes. - Reject truncated or oversized actions before requesting approval or writing any bytes to the terminal. - Document the reviewed stdin size limit in the app-server protocol. ## Testing Add an integration test that uses JSON escaping to push a formatted action over the limit and verifies that it is neither offered for approval nor executed, while a subsequent valid write still succeeds. GitOrigin-RevId: f6c96a78a65a136366c8119a7d242dfc2ec05fe6
This commit is contained in:
1 parent
453a9bcc69
commit
bce96bcb43
6 files changed
+147
-4
No files matched your search
@@ -244,8 +244,7 @@ impl GuardianRejectionCircuitBreaker {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
use approval_request::format_guardian_action_pretty;
|
||||
pub(crate) use approval_request::format_guardian_action_pretty;
|
||||
#[cfg(test)]
|
||||
use approval_request::guardian_assessment_action;
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in new issue
Block a user