Answer: Run `$codex-security:security-diff-scan` in CI via `codex exec` after installing the CLI and the Codex Security plugin, providing an OpenAI API key from your CI secret store as `CODEX_SECURITY_API_KEY`. The scan writes output to `$TMPDIR/codex-security-scans///`, and examples are provided for GitHub Actions, GitLab CI/CD, Azure Pipelines, and Jenkins. Status: Confirmed Entry: tool/codex/agents-and-automation/automate-security-reviews-ci-cd Revision: 1 Digest: sha256:f58bf9eeaca81c33 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:53:26Z Last changed: 2026-11-13T03:53:26Z Last verified: 2026-11-20T13:41:59Z Next check: 2026-11-21T13:41:59Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of scan skill command | $codex-security:security-diff-scan | [1] | 2026-11-20 CLI install command | npm install --global @openai/codex | [1] | 2026-11-20 plugin install command | codex plugin add codex-security@openai-curated | [1] | 2026-11-20 API key secret name | CODEX_SECURITY_API_KEY | [1] | 2026-11-20 exec command | CODEX_API_KEY="$CODEX_SECURITY_API_KEY" codex exec \ --sandbox workspace-write \ "Use \$codex-security:security-diff-scan to review changes from $BASE_REVISION to $HEAD_REVISION for security regressions. Do not modify the checkout." | [1] | 2026-11-20 output directory | $TMPDIR/codex-security-scans/// | [1] | 2026-11-20 supported CI providers | GitHub Actions | [1] | 2026-11-20 Sources: [1] OpenAI. "Review code changes for security". https://learn.chatgpt.com/docs/security/plugin/code-changes.md Role: primary. Accessed: 2026-11-20T13:41:59Z Quote: "Run `$codex-security:security-diff-scan` in CI when the runner can invoke the" (Supports: scan skill command) Quote: "npm install --global @openai/codex" (Supports: CLI install command) Quote: "codex plugin add codex-security@openai-curated" (Supports: plugin install command) Quote: "`CODEX_SECURITY_API_KEY`. Expose the credential only for the scan:" (Supports: API key secret name) Quote: "CODEX_API_KEY="$CODEX_SECURITY_API_KEY" codex exec \ --sandbox workspace-write \ "Use \$codex-security:security-diff-scan to review changes from $BASE_REVISION to $HEAD_REVISION for security regressions. Do not modify the checkout."" (Supports: exec command) Quote: "`$TMPDIR/codex-security-scans///`" (Supports: output directory) Quote: "{ id: "github", label: "GitHub Actions" }" (Supports: supported CI providers) Snapshot SHA-256: 7234ef879ffd798a3ef2b034996d0776d9aa39c27bb78e81c2a2293862b4559c (captured 2026-11-13T03:53:25Z) 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-13T03:53:26Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:41:59Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:41:59Z Last attempt: 2026-11-20T13:41:59Z Notes and limitations: Extracted automatically from a single official source (section "Automate reviews in CI/CD"). Related: https://latestn.com/tool/codex/agents-and-automation/background-hooks How do I run a Codex hook in the background? https://latestn.com/tool/codex/agents-and-automation/build-skill How do I build a skill for ChatGPT or Codex? https://latestn.com/tool/codex/agents-and-automation/codex-cloud-task-default-environment How do I start a Codex cloud task without choosing a repository? https://latestn.com/tool/codex/admin-and-enterprise/review-codex-analytics How do I review Codex analytics for my workspace? https://latestn.com/tool/codex/admin-and-enterprise/set-global-baseline-environment-overrides How do I set a Global baseline policy and add environment overrides in Codex Agent Security? https://latestn.com/tool/codex/agents-and-automation/agent-workflow-guardrails How do I add guardrails to custom agent workflows in Codex? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:53:26Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/agents-and-automation/automate-security-reviews-ci-cd/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/agents-and-automation/automate-security-reviews-ci-cd POST: https://latestn.com/dispute/tool/codex/agents-and-automation/automate-security-reviews-ci-cd with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/agents-and-automation/automate-security-reviews-ci-cd?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I automate Codex security reviews in CI/CD? Revision 1, last verified 2026-11-20T13:41:59Z. https://latestn.com/tool/codex/agents-and-automation/automate-security-reviews-ci-cd (accessed 2026-11-21T10:04:55Z). @misc{LatestN_tool_codex_agents_and_automation_automate_security_reviews_ci_cd_r1, title = {How do I automate Codex security reviews in CI/CD?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/agents-and-automation/automate-security-reviews-ci-cd}}, note = {Revision 1; digest sha256:f58bf9eeaca81c33; last verified 2026-11-20T13:41:59Z; accessed 2026-11-21T10:04:55Z} } 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/agents-and-automation/automate-security-reviews-ci-cd