Rank #03 · Daily · Security
Codex Security: OpenAI's CLI and SDK for Finding and Fixing Vulnerabilities
Install @openai/codex-security, sign in, and run cs scan . — or call the same scan, validate, and patch workflows from the TypeScript SDK, a GitHub Action, or a Codex session.
What it does
Codex Security is OpenAI's open-source toolkit for finding, investigating, and fixing vulnerabilities in your code. GitHub description: "OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities." npm package: @openai/codex-security. Docs: developers.openai.com/codex/security and the CLI documentation.
README claims (as verified):
- Scan scopes. A whole repository, selected paths (
cs scan . --path src), or committed Git changes (--diff origin/main). A deep scan (--mode deep) repeats Standard scans and returns deduplicated findings. - After the scan. Validate candidate findings, generate patches, and verify existing fixes. A completed scan saves a Markdown report at the REPORT path printed in the terminal;
cs scans showfinds the latest completed scan in that repository. Read the report for source evidence and coverage limits before asking for a patch. - Policy and threat models.
cs policydrafts aSECURITY.md(the draft is saved outside the repository; existing files are left unchanged until you copy the policy in). Component--pathand a--knowledge-basefile are supported. Scans already use root and componentSECURITY.mdfiles. Saved threat models can be exported later withcs export --artifact threat-model. - Triage and tracking. Browse saved scans and findings, identify duplicates, assess severity against your own rubric, and suggest owners from source and Git history. Track findings in Linear, Jira, or GitHub; export SARIF, JSON, and CSV; optionally publish completed scans.
- Import other scanners. Preview third-party scanner findings, save them locally, or publish supported reports to Codex Security Cloud.
- Surfaces. Security workflows inside a Codex session (with the Codex Security plugin enabled); the
cs/codex-securityCLI (npx @openai/codex-securityif the short name conflicts); a TypeScript SDK (CodexSecurity); a GitHub Action (the repo ships an example weekly Ubuntu workflow); and Docker Compose for containerized bulk scans. - Requirements. Node.js 22.13.0+ within 22.x, or Node.js 24.x or 26.x, plus Python 3.10+ (Python 3.10 also needs
tomli). Local install:npm install --global @openai/codex-security, thencs loginandcs scan .. For CI, setOPENAI_API_KEYorCODEX_API_KEYin the scan process environment. - Model providers. OpenAI, Amazon Bedrock, OpenRouter, Fireworks AI, and Cheaper Inference. Bedrock uses AWS credentials and does not require a separate OpenAI login.
- Cloud is optional. Local scans work without Codex Security Cloud. The README notes that the local
servecommand and browser dashboard have been removed; existing databases and scan artifacts remain available.
License: Apache-2.0 (LICENSE file and GitHub SPDX agree).
Who it's for
- AppSec and platform teams that want an LLM-assisted scan → validate → patch loop they can run from a terminal, CI, or a TypeScript script.
- Groups already using Codex who want the Security plugin workflows in a coding session.
- Engineers who need SARIF/JSON/CSV export, a GitHub Action, or a place to import findings from other scanners.
Less ideal if you want a fully offline, rule-only static analyzer with no model or API costs, cannot meet the Node.js 22+ / Python 3.10 runtime requirements, or need a local web dashboard (the bundled serve UI has been removed).
Stars / language / license
12,427 stars · TypeScript · Apache-2.0
Data verified: 2026-11-13 09:03 Asia/Shanghai (official Daily Top10 gate; language/license confirmed via GitHub API get_repository + README + LICENSE)
Trending note: +643 stars today (captured 09:03 Asia/Shanghai)
Category tags
Security · vulnerability-scanning · CLI · TypeScript · SDK · AppSec · GitHub-Actions · OpenAI · DevSecOps
How it differs from similar projects
Compared with Semgrep, CodeQL, and similar rule- or query-based SAST. Those tools match patterns or queries you (or a vendor) maintain. Codex Security's pitch is an LLM-driven investigation that can also validate findings, propose patches, and draft policy — and it can import findings from third-party scanners rather than replace them outright. TidyHow has not compared detection quality.
Compared with asking a general coding agent to "review this repo for vulns." Codex Security adds a saved-scan workflow: reports with evidence and coverage limits, deduplicated findings, exports, CI/Action packaging, and optional issue-tracker connectors.
Compared with hosted AppSec platforms (Snyk, GitHub Advanced Security, and others). Those bundle scanning, hosting, and often dependency or secret coverage as a service. Here the CLI/SDK is Apache-2.0 and local scans work without Cloud; you still need a supported model provider, and the README notes that some cybersecurity requests and protected findings require additional access programs (Trusted Access for Cyber; Daybreak for eligible accounts).
Caveats. Scans consume model/API budget (the example GitHub Action uses an estimated $5 limit and notes that in-progress requests can exceed it). Coverage limits belong in the report — read them before treating a clean scan as complete. This is not a substitute for a traditional security review. No independent precision or recall figures are claimed here.