mirror of
https://github.com/openai/codex.git
synced 2026-11-29 00:00:54 +00:00
fix: tighten shell wrapper detection
Use exact matches for known shell wrappers so command display and approval keys do not treat arbitrary shell-like paths as trusted wrappers. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -82,6 +82,10 @@ mod tests {
|
||||
let args = vec!["/bin/bash".into(), "-lc".into(), "echo hello".into()];
|
||||
let cmdline = strip_bash_lc_and_escape(&args);
|
||||
assert_eq!(cmdline, "echo hello");
|
||||
|
||||
let args = vec![".poc/bash".into(), "-lc".into(), "echo hello".into()];
|
||||
let cmdline = strip_bash_lc_and_escape(&args);
|
||||
assert_eq!(cmdline, ".poc/bash -lc 'echo hello'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user