Codex Security

developers.openai.com

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating and fixing vulnerabilities in your code.

Pricing
Open source
Published
Nov 12, 2026

Next steps

What it does

Codex Security brings OpenAI's security workflows to Codex sessions, the terminal and automation. The open-source @openai/codex-security CLI (cs) and TypeScript SDK scan whole repositories, selected paths or Git changes; deep scans repeat standard scans and deduplicate findings. It can validate candidate findings, generate patches, verify existing fixes, draft SECURITY.md policies and save threat models. Findings can be assessed against your own severity rubric, assigned to suggested owners, imported from third-party scanners, tracked in Linear, Jira or GitHub, and exported as SARIF, JSON or CSV. A GitHub Action supports CI use.

Codex Security · Image from the official website
Image from the official website

Use cases

  • Scan a repository, selected paths or a Git diff for vulnerabilities from the terminal or CI
  • Validate candidate findings, generate patches and verify existing fixes with Codex
  • Export findings as SARIF, JSON or CSV and track them in Linear, Jira or GitHub

Frequently asked questions

What is Codex Security?
OpenAI's security workflows for Codex, also available as the @openai/codex-security CLI and TypeScript SDK, for finding, investigating and fixing vulnerabilities in code.
How do I run a scan?
Install with npm install --global @openai/codex-security, sign in with cs login, then run cs scan . in your repository. Options include --path, --diff origin/main and --mode deep.
Can it run in CI?
Yes. Set OPENAI_API_KEY or CODEX_API_KEY in the scan environment; there is also a GitHub Action and the TypeScript SDK for automation.
What license is the CLI under?
The GitHub repository is published under Apache-2.0. Using it requires signing in to OpenAI or providing an API key.
Log in to join the discussion