mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Windows temp grants could fall back to host `TEMP`/`TMP` values and bypass read-only or denied subpaths. Sandbox permissions must match the environment passed to the child process. ## What changed - Resolve `:tmpdir` from absolute `TEMP`/`TMP` paths in the completed workload environment, preserving access modes and missing-path rules without falling back to host values. - Deduplicate Windows environment keys case-insensitively in a deterministic order so permission resolution and the child environment select the same value. - Use the resolved temp policy for elevated sandbox overrides across core execution, exec-server, and direct spawning. - Launch direct-spawn sandbox wrappers with the supplied Codex executable, materializing an inner helper only when it is that executable. ## Testing Add Windows regression coverage for temp-only writes, read-only and denied carveouts, mixed-case and duplicate environment keys, unavailable temp paths, and empty or missing write-root overrides. Exercise core execution and direct spawning, and extend exec-server RPC coverage to the elevated backend with temp values set through the environment policy. GitOrigin-RevId: 16b8bd4702cc434fd743a08c75a3e4515780bff3