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?

  1. Set PATH to multiple entries on Windows (e.g., C:\\Tools;D:\\Bin).
  2. Run the world-writable audit.
  3. Observe that PATH entries are split on \\ rather than ;, producing invalid roots like C: or Program 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.

View original on GitHub ↗