Answer: Store an OpenAI API key in your CI provider's secret store as `CODEX_SECURITY_API_KEY`, then map it to the scan process's `OPENAI_API_KEY` environment variable. Status: Confirmed Entry: tool/codex/integrations/ci-api-key-setup Revision: 2 Digest: sha256:308e27902e24561b (changes whenever the content changes) Timeline: Created: 2026-11-13T03:52:59Z Last changed: 2026-11-17T14:06:35Z (Environment variable: — → OPENAI_API_KEY) Last verified: 2026-11-20T13:41:31Z Next check: 2026-11-21T13:41:31Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Secret name | CODEX_SECURITY_API_KEY | [1] | 2026-11-20 Environment variable | OPENAI_API_KEY | [1] | 2026-11-20 Sources: [1] OpenAI. "Codex Security CI/CD overview". https://learn.chatgpt.com/docs/security/cli/ci.md Role: primary. Accessed: 2026-11-20T13:41:31Z Quote: "Store an OpenAI API key in your CI provider's secret store as `CODEX_SECURITY_API_KEY`" (Supports: Secret name) Quote: "map it to the scan process's `OPENAI_API_KEY` environment variable" (Supports: Environment variable) Snapshot SHA-256: 0ad309e123789eff2de9df21a275a8e7cd6b7dbecf26f123f75192d32746ce84 (captured 2026-11-17T14:06:35Z) 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:35Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:41:31Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:41:31Z Last attempt: 2026-11-20T13:41:31Z Notes and limitations: Extracted automatically from a single official source (section "Prepare the workflow"). Related: https://latestn.com/tool/codex/integrations/ci-integration-options Which CI integrations does Codex Security support? https://latestn.com/tool/codex/integrations/codex-environment-repo-selection How does Codex choose which environment and repo to use for a Linear issue? https://latestn.com/tool/codex/integrations/configure-codex-exec How do I configure `codex exec` options in the Codex GitHub Action? https://latestn.com/tool/codex/integrations/app-server-production-support Is the Codex app server supported for production workloads? https://latestn.com/tool/codex/integrations/authenticate-codex-vertex-ai How do I authenticate Codex on the host machine to use Google Cloud Vertex AI? https://latestn.com/tool/codex/integrations/capture-outputs How do I capture outputs from the Codex GitHub Action in my workflow? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T14:06:35Z | changed | Environment variable: — → OPENAI_API_KEY | [1] 2026-11-17T14:06:35Z | changed | Secret name: — → CODEX_SECURITY_API_KEY | [1] 2026-11-17T14:06:35Z | changed | Environment variable to map to: OPENAI_API_KEY → — | [1] 2026-11-17T14:06:35Z | changed | Secret store key name: CODEX_SECURITY_API_KEY → — | [1] 2026-11-13T03:52:59Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/integrations/ci-api-key-setup/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/integrations/ci-api-key-setup POST: https://latestn.com/dispute/tool/codex/integrations/ci-api-key-setup with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/integrations/ci-api-key-setup?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I set up the API key for Codex Security scans in CI? Revision 2, last verified 2026-11-20T13:41:31Z. https://latestn.com/tool/codex/integrations/ci-api-key-setup (accessed 2026-11-21T09:52:17Z). @misc{LatestN_tool_codex_integrations_ci_api_key_setup_r2, title = {How do I set up the API key for Codex Security scans in CI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/integrations/ci-api-key-setup}}, note = {Revision 2; digest sha256:308e27902e24561b; last verified 2026-11-20T13:41:31Z; accessed 2026-11-21T09:52:17Z} } 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/integrations/ci-api-key-setup