Exploring OpenAI's Official Open-Source 'Codex Security' CLI and TypeScript SDK
An overview of OpenAI's official security scanner CLI and TypeScript SDK, covering vulnerability detection, patch verification, threat modeling, and multi-provi
OpenAI maintains 'Codex Security', an open-source vulnerability scanner available as a CLI utility and TypeScript SDK designed to identify security flaws, validate fixes, and generate automated remediation patches. First created in July 2026 and licensed under Apache 2.0, the project provides automated security workflows directly inside developer terminals and CI/CD pipelines.

Hero image: Original TAU HOME editorial concept illustration, not a product screenshot.
Codex Security bridges automated static checks with LLM-assisted investigation. It isolates candidate findings, verifies whether vulnerabilities are genuinely exploitable, and drafts concrete code patches. Recent updates simplified the toolset by deprecating the local browser dashboard command (serve), focusing on clean CLI execution, file-based artifacts, and standardized report generation.
CLI Installation and Scanning Workflows
The Codex Security CLI runs via the cs or codex-security commands. It installs globally as an npm package in environments where both Node.js and Python are configured.
- Runtime Requirements: Requires Node.js 22.13.0+ (within the 22.x line) or Node.js 24.x/26.x, alongside Python 3.10+. Python 3.10 installations also require the
tomlipackage for configuration parsing. - Installation and Authentication:
npm install --global @openai/codex-security cs login - Running Scans:
# Full repository scan cs scan . # Target specific paths cs scan . --path src --path tests # Scan uncommitted or committed Git diff against a base branch cs scan . --diff origin/main # Deep investigation mode cs scan . --mode deep
Once a scan concludes, the terminal outputs the exact path to a generated Markdown report. Running cs scans show within the same repository recalls the latest completed scan details. Findings can also be exported to SARIF, JSON, and CSV formats for integration into existing CI pipelines.
Multi-Provider Support and Issue Tracker Integrations
Codex Security does not lock users into OpenAI's native endpoints; it provides flexible model provider support out of the box.
In addition to OpenAI models, scans run across Amazon Bedrock, OpenRouter, Fireworks AI, and Cheaper Inference. Using Amazon Bedrock relies directly on configured AWS credentials, eliminating the requirement for an OpenAI account login when scanning code within enterprise cloud boundaries.
The utility also integrates into day-to-day issue triage:
- Issue Trackers: Direct connectors publish findings to Linear, Jira, and GitHub Issues.
- Third-Party Scanner Ingestion: Teams can import external scanner outputs and aggregate findings locally or via Codex Security Cloud.
- Permission Requirements: Certain advanced offensive security evaluations and restricted vulnerability findings require accounts enrolled in OpenAI's 'Trusted Access for Cyber' program (Daybreak access).
Automated Security Policies and Threat Modeling
Beyond code scanning, Codex Security assists teams in generating repository governance artifacts.
Running cs policy . inspects codebase architecture and drafting a custom SECURITY.md. The generator writes its output outside the repository directory alongside structured threat models, preserving existing files until developers review the diff and manually copy the policy into place.
Teams can also export structured threat models from completed scans without re-running analysis:
cs export --scan SCAN_ID --artifact threat-model --output threatmodel.md
With the removal of legacy local web server commands in favor of file-based reporting and headless CLI pipelines, Codex Security offers a streamlined foundation for DevSecOps automation across multi-repository environments.
Sources
- GitHub Repository: openai/codex-security
- OpenAI Documentation: Codex Security CLI Reference