The following files may contain active authentication tokens:
~/.codex/auth.json~/.codex/account_backup/<profile>/auth.json
Treat them as secrets.
- Keep backup directory permission restricted:
chmod 700 ~/.codex/account_backup
- Restrict each
auth.jsonfile:chmod 600 ~/.codex/account_backup/*/auth.json
- On Windows, restrict access to
%CODEX_HOME%\account_backupand%CODEX_HOME%\binwith NTFS permissions:icacls %CODEX_HOME%\account_backup /inheritance:r /grant:r %USERNAME%:F
- Never push token files to Git repositories.
- Avoid syncing backup folders to public cloud storage.
This project mainly performs local file operations. When reading plan/quota data it sends the OAuth access token over HTTPS to official ChatGPT/OpenAI endpoints and fetches quota metadata only — no prompts are sent and no models are invoked.
The reset-credit lookup sends only the credentials required for the account scope; the app persists just the available count, grant time, and expiry time — never card IDs or raw response bodies.
Main risk is accidental token exposure through Git, screenshots, shared terminals, insecure backups, or loose Windows ACLs.