codex/codex-rs/shell-command/src/command_safety
jif 80b88a700e Avoid false URL-launch detections in literal PowerShell commands (#54076)
## Why

PowerShell safety checks can mistake a literal `start` argument for a URL-launch command, or combine a process launch with a URL from a separate command.

## What changed

Classify independently parsed literal PowerShell commands separately so commands such as `Write-Output start 'https://example.com'` do not trigger URL-launch checks. Retain conservative checks for pipelines, script state, executable strings, and shell or terminal wrappers, while continuing to detect actual URL launches and destructive commands.

## Testing

Add policy regression coverage for literal arguments, separate commands, URL launches, wrappers, and destructive commands, plus a Windows integration test covering execution and policy rejection.

GitOrigin-RevId: 2878aa86bc36b44c60230cc1de3430922b28b81a
History 2026-10-14 19:47:50 +00:00
..
fixtures Add a fail-closed Tree-sitter PowerShell lowerer (#39213) 2026-08-18 14:59:43 +00:00
is_dangerous_command.rs Avoid false URL-launch detections in literal PowerShell commands (#54076) 2026-10-14 19:47:50 +00:00
mod.rs Retire the untrusted approval policy (#39630) 2026-08-20 07:03:02 +00:00
powershell_parser.ps1 [codex] Reject unlowered PowerShell AST regions (#24092) 2026-06-23 03:09:20 +00:00
powershell_parser.rs Prevent launch context from reaching child processes (#37607) 2026-08-08 16:58:26 +00:00
powershell_tree_sitter.rs Bind unified exec approvals to shell executables (#39311) 2026-08-18 23:00:53 +00:00
powershell_tree_sitter_tests.rs Add a fail-closed Tree-sitter PowerShell lowerer (#39213) 2026-08-18 14:59:43 +00:00
windows_dangerous_commands.rs Avoid false URL-launch detections in literal PowerShell commands (#54076) 2026-10-14 19:47:50 +00:00