[codex core] Require approval for fake shell escalation#22171
[codex core] Require approval for fake shell escalation#22171evawong-oai wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/exec_policy.rs
Lines 345 to 349 in a8b6f3e
The fake-shell path now prompts, but it still proposes an execpolicy amendment for only the parsed inner command (for /tmp/.../bash -lc ls, ['ls']). If the user accepts that amendment, it is persisted as an allow rule, so the same fake shell with RequireEscalated later becomes an explicit policy allow and bypasses the sandbox without another approval. Suppress amendments for sandbox overrides/model shells or include the wrapper identity.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
a8b6f3e to
5277dc8
Compare
Summary
Why
CLI 8725 reported that a fake bash wrapper could hide behind an inner ls call and run outside the sandbox with no user approval. This PR keeps command safety separate from permission safety.
Validation
Tickets
CLI 8725