Answer: To use your ChatGPT sign-in instead of an API key for a scan, select your stored credentials explicitly with `--auth chatgpt`. To make stored credentials the automatic default, run `unset OPENAI_API_KEY CODEX_API_KEY`. Status: Confirmed Entry: tool/codex/permissions-and-security/use-chatgpt-auth-instead-of-api-key Revision: 2 Digest: sha256:d717a22e8e28a55d (changes whenever the content changes) Timeline: Created: 2026-11-13T03:53:09Z Last changed: 2026-11-18T13:35:24Z (make stored credentials default: — → unset OPENAI_API_KEY CODEX_API_KEY) Last verified: 2026-11-20T13:41:41Z Next check: 2026-11-21T13:41:41Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of explicit auth flag | --auth chatgpt | [1] | 2026-11-20 make stored credentials default | unset OPENAI_API_KEY CODEX_API_KEY | [1] | 2026-11-20 API key environment variables | OPENAI_API_KEY | [1] | 2026-11-20 Sources: [1] OpenAI. "Codex Security CLI FAQ". https://learn.chatgpt.com/docs/security/cli/faq.md Role: primary. Accessed: 2026-11-20T13:41:41Z Quote: "npx @openai/codex-security scan . --auth chatgpt" (Supports: explicit auth flag) Quote: "To make your stored credentials the automatic default, run `unset OPENAI_API_KEY CODEX_API_KEY`." (Supports: make stored credentials default) Quote: "When your environment includes `OPENAI_API_KEY` or `CODEX_API_KEY`, scans" (Supports: API key environment variables) Snapshot SHA-256: 5e5a9a41f3ff72e7e8c81bebb44325e8de0f2d9f121c768eb9ce4ca932719092 (captured 2026-11-17T14:06:48Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T14:06:46Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:41:41Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:41:41Z Last attempt: 2026-11-20T13:41:41Z Notes and limitations: Extracted automatically from a single official source (section "Why does a scan use an API key after sign-in"). Related: https://latestn.com/tool/codex/permissions-and-security/use-hardening-guidance-from-scan How do I use hardening guidance from a Codex Security scan? https://latestn.com/tool/codex/permissions-and-security/vulnerability-report-without-scan Can Codex write vulnerability reports without a Codex Security scan? https://latestn.com/tool/codex/permissions-and-security/write-vulnerability-reports-workflow How do I use Codex to write vulnerability reports from findings and PoCs? https://latestn.com/tool/codex/permissions-and-security/threat-model-contents What does a Codex threat model include for a repository? https://latestn.com/tool/codex/permissions-and-security/track-findings-issue-advisory How do I get Codex to create a GitHub issue or draft security advisory for findings? https://latestn.com/tool/codex/permissions-and-security/triage-security-backlog How do I triage a backlog of security findings in Codex? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:35:24Z | changed | make stored credentials default: — → unset OPENAI_API_KEY CODEX_API_KEY | [1] 2026-11-18T13:35:24Z | changed | explicit auth flag: — → --auth chatgpt | [1] 2026-11-18T13:35:24Z | changed | Make stored credentials default: unset OPENAI_API_KEY CODEX_API_KEY → — | [1] 2026-11-18T13:35:24Z | changed | Explicit auth flag: --auth chatgpt → — | [1] 2026-11-13T03:53:09Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/permissions-and-security/use-chatgpt-auth-instead-of-api-key/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/codex/permissions-and-security/use-chatgpt-auth-instead-of-api-key POST: https://latestn.com/dispute/tool/codex/permissions-and-security/use-chatgpt-auth-instead-of-api-key with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/permissions-and-security/use-chatgpt-auth-instead-of-api-key?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I make Codex Security CLI use my ChatGPT sign-in instead of an API key for scans? Revision 2, last verified 2026-11-20T13:41:41Z. https://latestn.com/tool/codex/permissions-and-security/use-chatgpt-auth-instead-of-api-key (accessed 2026-11-21T10:08:08Z). @misc{LatestN_tool_codex_permissions_and_security_use_chatgpt_auth_instead_of_api_key_r2, title = {How do I make Codex Security CLI use my ChatGPT sign-in instead of an API key for scans?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/permissions-and-security/use-chatgpt-auth-instead-of-api-key}}, note = {Revision 2; digest sha256:d717a22e8e28a55d; last verified 2026-11-20T13:41:41Z; accessed 2026-11-21T10:08:08Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/codex/permissions-and-security/use-chatgpt-auth-instead-of-api-key