Developer tools#Security scan#Code review

Codex Security CLI: find, validate and patch vulnerabilities in one pipeline

Codex Security is an OpenAI open-source CLI and SDK that chains vulnerability discovery, validation and patching, with SARIF export and a GitHub Action for CI.

Project facts

GitHub Ecosystem
Repositorygithub.com/openai/codex-security
License
Apache-2.0
Language
TypeScript
Stars
13,539
Data checked
2026-11-15

Snapshot figures reflect the check date and may change over time.

Most SAST tools hand you a queue of alerts and leave the triage to you. Codex Security, which OpenAI open-sourced in late July 2026 under Apache-2.0, is a TypeScript CLI and SDK that runs discovery, validation and fixing as one pipeline: a single cs scan . command ends in a Markdown report, and from there the model can pressure-test candidate findings, draft patches, and re-check fixes that already landed. As of November 15, 2026 the repo sits at about 13.5k stars, and v0.10.0 shipped on November 12.

GitHub repository card for openai/codex-security, OpenAI's Codex Security CLI and TypeScript SDK

Core features

  • Three scan scopes: cs scan . covers the whole repo, --path src --path tests narrows it to selected directories, and --diff origin/main reviews only the commits between a base revision and HEAD. --mode deep repeats the standard scan and deduplicates the findings. --max-time 15 sets an advisory 15-minute investigation allowance on a standard scan. The open-sourced implementation runs a scan in phases — threat modeling, discovery, validation, impact analysis, reporting, hardening — and writes structured artifacts such as scan-manifest.json, findings.json and coverage.json.
  • Resumable scans: since v0.10.0, codex-security scans resume SCAN_ID continues an interrupted standard scan from its checkpoint with usage and budget intact, and bulk or component scans take --max-total-cost so a group of repositories shares one estimated budget (in-flight work can exceed the estimate).
  • Validation and patches: after a scan, the model can validate whether a candidate finding is actually exploitable, generate a patch, and verify an existing fix. Per the project’s own docs, hosted patch verification runs in a controlled environment, and since v0.10.0 a patch that ends on a different commit reports revision_changed and keeps its execution receipt. We have not independently tested this mechanism; treat the details as the vendor’s description.
  • Getting results where work happens: findings export to SARIF, JSON and CSV, or sync to Linear, Jira and GitHub. Third-party scanner reports — Semgrep, Snyk, ArmorCode — can be imported into the local workbench for triage.
  • Policy and threat models: cs policy drafts a SECURITY.md plus a threat model outside the repo for human review, and scans read root and component SECURITY.md files as context.
  • Model backends beyond OpenAI: Amazon Bedrock, OpenRouter, Fireworks AI and others are supported; Bedrock uses plain AWS credentials and needs no OpenAI login.
  • SDK and CI: the @openai/codex-security TypeScript SDK embeds scans in your own tooling, and the official GitHub Action example runs a scheduled weekly scan with a $5 estimated limit per scan, reporting findings without failing the build.

Typical use cases

  • Security engineers triaging a backlog: run accumulated scanner alerts through a validation round, rate them against your own rubric, and only then decide what deserves a human’s afternoon.
  • Incremental checks in CI: use --diff origin/main on pull requests and a scheduled job for full scans; bulk scans can share one budget across repositories with --max-total-cost.
  • Open-source maintainers: OpenAI confirmed on Hacker News that maintainers can apply for conditional access through the Codex for OSS form to offset the model cost.

Quick start

The install comes from the project README; you need Node.js 22.13.0+ within 22.x, or 24.x / 26.x, plus Python 3.10+:

npm install --global @openai/codex-security
cs login

cs scan .

When the scan finishes, the terminal prints a REPORT path to a Markdown file with source evidence and coverage limits; cs scans show finds the latest completed scan again. If npm reports an EEXIST conflict, run npx @openai/codex-security in place of cs. In CI, set OPENAI_API_KEY or CODEX_API_KEY and the scan runs headless.

Summary

Codex Security fits teams that want AI-driven vulnerability review inside CI and daily development and can accept sending code to a cloud model. The honest catches are cost and access: on the Hacker News launch thread, users reported single scans consuming up to half a Pro plan’s weekly usage, one interrupted scan billed about $13, model guardrails occasionally refusing to explain a vulnerability the tool itself found, and the sharper capabilities gated behind Trusted Access for Cyber or Daybreak. Local models are not supported, so code always leaves the machine. There is deliberately no rule-level SAST report — OpenAI explained why in a separate post. Apache-2.0, written in TypeScript, v0.10.0 released November 12, 2026, actively maintained (last push November 14). If you’d rather bolt security skills onto an agent yourself, see our reverse-skill entry; for a plain toolbox of scanners, hackingtool remains the kitchen sink.