OpenAI’s Codex Security is an AI application-security agent that scans your codebase, validates candidate findings, drafts patches, and verifies fixes, and it is now a normal part of the Codex agent workflow, a standalone CLI and TypeScript SDK (@openai/codex-security), and a GitHub Action. As of Nov. 18, 2026 it ships as v0.10.1. If you write code and you have been wondering whether to let an agent find your vulnerabilities, here is what it actually does, how to run it, and where the limits are.
No hands-on testing was performed for this article. Everything below is from the official repository, README, release notes, and the npm registry, checked on Nov. 19, 2026. Where a number is OpenAI’s own claim, it is labeled as such.
What Codex Security is
Codex Security helps you find, investigate, and fix vulnerabilities in your code. From the README, it works in three places:
- In Codex: choose a security workflow in your Codex session (for example, “run a Codex Security scan on this repository, focusing on authentication and authorization, and return the saved report with source evidence and coverage limits”). The plugin saves a report and findings you can read and act on.
- In a terminal: the
@openai/codex-securityCLI and TypeScript SDK. - In automation: a GitHub Action for scheduled scans, plus CI/container support.
It scans repositories, selected paths, or committed Git changes; validates candidate findings (to cut false positives); generates patches; verifies existing fixes; drafts SECURITY.md policies; saves threat models; and can export SARIF, JSON and CSV for other systems. It can also import findings from third-party scanners (AWS Continuum and saved CrowdStrike Falcon Cloud Security IaC reports, as of 0.10.1) and push tracking into Linear, Jira or GitHub.
| Capability | How it runs |
|---|---|
| Repository / path / diff scan (Standard, Deep) | cs scan ., --path, --exclude-path, --diff origin/main, --mode deep |
| Finding validation and patch generation | Validate step in scan workflow; request a patch after the report |
| Verify an existing fix | Ask Codex to verify, or SDK/CLI verify commands |
| SECURITY.md policy drafts | cs policy . (draft saved outside the repo for review) |
| Threat models | Saved with scans; export via cs export --scan SCAN_ID --artifact threat-model |
| CI | GitHub Action openai/codex-security (pin to a reviewed commit SHA) |
| Exports | SARIF, JSON, CSV; ServiceNow Application Vulnerability Response export |
| Model providers | OpenAI, Amazon Bedrock, OpenRouter, Fireworks AI, Cheaper Inference |
Repo facts and current attention
The repository is openai/codex-security on GitHub: created July 13, 2026, Apache-2.0, TypeScript. As of Nov. 19, 2026 it has about 14,141 stars. The npm package @openai/codex-security recorded 214,964 downloads in the week of Nov. 11-17, 2026 (npm downloads API). Release cadence is fast: v0.10.0 on Nov. 12, v0.10.1 on Nov. 18 (2026). It is listed on GitHub Trending (weekly) as of this writing. OpenAI first announced “Codex Security: now in research preview” on March 6, 2026 (The Hacker News reported OpenAI’s figures of 1.2 million commits scanned and 10,561 high-severity issues found; treat those as vendor-reported).
How to install and run your first scan
Requirements (README): Node.js 22.13.0+ within 22.x, or Node.js 24.x/26.x, and Python 3.10+ (with tomli on Python 3.10).
npm install --global @openai/codex-security
cs login # or: npx @openai/codex-security login
cs scan . # run from the repository directory
cs and codex-security are the same command; npx works if you hit a global install conflict. Useful flags:
cs scan . --path src --path tests # selected paths
cs scan . --exclude-path examples/ # literal, repo-relative (v0.10.1)
cs scan . --diff origin/main # committed changes since a base revision
cs scan . --mode deep # repeat Standard, deduplicated findings
cs scan . --max-time 15 # advisory 15-minute Standard allowance
When the scan finishes, open the Markdown report at the REPORT path printed in the terminal. cs scans show re-prints the latest completed scan for that repository. Scans read your existing root and component SECURITY.md guidance if present.
For CI, set OPENAI_API_KEY or CODEX_API_KEY in the environment, or use device/SSH login for headless machines (README auth section).
GitHub Action for weekly scans
The README includes a weekly GitHub-hosted Ubuntu workflow example. The shape:
- Add an OpenAI API key as the repository secret
CODEX_SECURITY_API_KEY. - Copy the weekly workflow from
github-action/examples/repository.ymlinto.github/workflows/codex-security.yml, pinninguses:to the reviewed distribution commit SHA of the Action release (e.g.openai/codex-security@bf650710f36c16936324efe250a49cdd9f2da037 # action-v0.10.1). - Reports findings without failing the job; for severity thresholds, PR checks or runner requirements, see the Action guide.
The README example uses an estimated $5 limit per scan. That is an example estimate, not a quote: requests in progress can exceed the limit, and real cost varies by repo size, scan mode and model.
What a scan actually produces
A completed scan saves a report with: source evidence for each finding, exclusions (what was not covered and why), severity assessed against your own rubric if you define one, and suggested owners (inferred from source and Git history). Findings deduplicate; Deep scans repeat Standard scans and return deduplicated results. You can validate findings, request patches, and verify existing fixes. SARIF/JSON/CSV exports let you wire results into your existing tooling; Linear, Jira and GitHub integrations track findings as issues.
Deep Scan has a specific failure mode worth knowing: if Codex blocks a worker request on a misalignment-policy violation, Deep Scan stops and reports the refusal instead of retrying (v0.10.1).
Where the limits are
- Vendor-reported numbers. The 1.2M commits / 10,561 high-severity figures and any benchmark-style claims are OpenAI’s, not independently reproduced here.
- Access gating. Some cybersecurity requests and protected findings require Trusted Access for Cyber (chatgpt.com/cyber). Accounts with Daybreak access can opt in explicitly. A scan may refuse or skip parts of a task for policy reasons.
- Coverage limits exist and are printed. The report states exclusions; a clean report means “no findings within scope”, not “the code is secure”.
- Not a SAST drop-in. It complements rather than replaces deterministic linters and dedicated SAST; treat it as an agentic analyst whose output needs human triage.
- Cost can exceed estimates. Long scans on large repos cost real money; set
--max-timeand cost limits deliberately. - No hands-on testing performed here. Commands above are copied from the README; your mileage will vary by repo, language support and account entitlements.
Quick sanity checklist before you scan
- Is your repo’s
SECURITY.mdaccurate? The scanner reads it. - Are there directories you never want scanned (fixtures, generated code, vendored deps)? Exclude them with
--exclude-path. - Do you want PR-time checks or scheduled scans? Pick workflow vs Action accordingly.
- Who triages findings? Assign an owner before you enable automation.
How this was checked
Primary sources fetched Nov. 19, 2026: GitHub repository metadata (created 2026-07-13, Apache-2.0, TypeScript, ~14,141 stars, last push 2026-11-19), README (quick start, scan modes, SDK, Action, exports, providers, access gating), release notes for v0.10.0 (Nov. 12) and v0.10.1 (Nov. 18), npm registry (214,964 downloads Nov. 11-17), and GitHub Trending (weekly). Hacker News items (July 2026, 598 points) are recorded as historical scale, not current attention. Google autocomplete and a live SERP review (Nov. 19, 2026) confirm current queries around “codex security cli/plugin/scan”; the first organic results are OpenAI’s docs, the GitHub repo, and OpenAI’s own videos. Wide Angle performed no independent testing of the scanner. See the agent skills repo guide for related coverage of the agent-skills ecosystem.
Bottom line: Codex Security is the most direct way to put an AI security analyst inside your existing Codex workflow or CI, and v0.10.1 makes it scriptable (--exclude-path, SARIF/JSON/CSV, Action pinning). Run one Standard scan on a non-critical repo first, read the coverage limits in the report, then decide whether to wire it into CI. It is a triage accelerator, not an audit stamp.