mirror of
https://github.com/openai/codex.git
synced 2026-10-18 17:18:52 +00:00
## Why The fallback file contains OAuth credentials, so it must be private from the moment it is created and writes must not follow links to another path. ## What changed - Create the fallback file with mode `0600` on Unix before writing credentials. - Reject symlinks and other non-regular files on Unix and Windows, including Windows reparse points. - Truncate and update an existing regular file through the validated file handle, restoring private Unix permissions when needed. ## Testing Added coverage for creation under a permissive umask, updates through an existing hard link, permission restoration, and symlink rejection. GitOrigin-RevId: d3e4be52e8f4cebb66c59d496a7f77a952a2d0d9