Windows sandbox audit: PATH is split by path separator instead of list separator
Resolved 💬 0 comments Opened Jan 15, 2026 by MaxMiksa Closed Jan 20, 2026
What version of Codex is running?
OpenAI Codex (v0.80.0)
- VS Code plugin "Codex - OpenAI's coding agent" (0.4.60)
- Codex CLI (v0.80.0)
What subscription do you have?
Via API.
Which model were you using?
gpt-5.2-codex xhigh
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
PowerShell 5.x
What issue are you seeing?
codex-rs/windows-sandbox-rs/src/audit.rs splits PATH with std::path::MAIN_SEPARATOR (\\ on Windows). This breaks PATH entries into partial segments (e.g., C: and Program Files) instead of full list entries, causing incorrect audit roots and noisy scans.
What steps can reproduce the bug?
- Set
PATHto multiple entries on Windows (e.g.,C:\\Tools;D:\\Bin). - Run the world-writable audit.
- Observe that PATH entries are split on
\\rather than;, producing invalid roots likeC:orProgram Files.
What is the expected behavior?
PATH should be parsed using the OS list separator (e.g., ; on Windows), preserving full entries.
Additional information
The standard library helper std::env::split_paths already handles platform-specific list separators.