Skip to content

Handle mixed-case URLs in Windows command safety - #30879

Merged
charliemarsh-oai merged 1 commit into
mainfrom
charlie/fix-windows-url-case-sensitivity
Jul 7, 2026
Merged

Handle mixed-case URLs in Windows command safety#30879
charliemarsh-oai merged 1 commit into
mainfrom
charlie/fix-windows-url-case-sensitivity

Conversation

@charliemarsh-oai

Copy link
Copy Markdown
Contributor

Summary

  • recognize embedded HTTP(S) URL prefixes case-insensitively in Windows dangerous-command detection
  • add regression coverage for uppercase and mixed-case schemes inside Start-Process invocations

Why

PowerShell and URL parsing treat schemes case-insensitively, but the pre-parser only searched for lowercase http:// and https://. When a URL appeared in the same shlex token as surrounding PowerShell syntax, such as Start-Process('HTTPS://example.com');, the prefix was not stripped and the command was incorrectly classified as not dangerous.

Validated with the scoped codex-shell-command suite (138 tests) and a direct classifier reproduction that failed before the change and passed afterward.

@charliemarsh-oai charliemarsh-oai added bug Something isn't working windows-os Issues related to Codex on Windows systems labels Jul 2, 2026
@charliemarsh-oai
charliemarsh-oai marked this pull request as ready for review July 2, 2026 00:22
@charliemarsh-oai
charliemarsh-oai force-pushed the charlie/fix-windows-url-case-sensitivity branch from d546400 to fc3bcca Compare July 6, 2026 11:46
@charliemarsh-oai
charliemarsh-oai merged commit 9deb4f9 into main Jul 7, 2026
35 checks passed
@charliemarsh-oai
charliemarsh-oai deleted the charlie/fix-windows-url-case-sensitivity branch July 7, 2026 21:50
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working windows-os Issues related to Codex on Windows systems

2 participants