OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security
https://developers.openai.com/codex/security
Codex Security
Codex Security helps you find, investigate, and fix vulnerabilities in your code. Use its security workflows in Codex, or automate them with the @openai/codex-security CLI and TypeScript SDK.
Features
- Scan repositories, selected paths, or Git changes. Deep scans repeat Standard scans and return their deduplicated findings.
- Validate candidate findings, generate patches, and verify existing fixes.
- Draft
SECURITY.md policies and save threat models for later review.
- Browse saved scans and findings, identify duplicates, assess severity against your own rubric, and suggest owners from source and Git history.
- Preview third-party scanner findings, save them locally, or publish supported reports to Codex Security Cloud. Scanner import guides.
- Track findings in Linear, Jira, or GitHub, publish completed scans, or export SARIF, JSON, and CSV. Integration workflows.
- Automate scans across repositories or project components, including in CI and containers.
Use in Codex
Open your repository in a Codex session with the Codex Security plugin enabled, then ask:
Run a Codex Security scan on this repository, focusing on authentication and authorization. Return the saved report, source evidence, and coverage limits.
A completed scan saves a report and findings. Read the report for source evidence and exclusions, then request a patch or ask Codex to verify an existing fix. See the agent workflow guide for setup, task selection, and recovery.
Quick start
Requires Node.js 22.13.0+ within 22.x, or Node.js 24.x or 26.x, and Python 3.10+. Python 3.10 also requires tomli.
Install the CLI globally and sign in:
npm install --global @openai/codex-security
cs login
Run your first scan from the repository directory:
cs scan .
When the scan completes, open the Markdown file at the REPORT path in the terminal. Run cs scans show from the same repository to find its latest completed scan again. See scan scope and follow-up work for how to interpret exclusions in the report.
cs and codex-security run the same CLI. If the short name conflicts with another command, use codex-security. To skip the global install, or if npm reports an EEXIST conflict, use npx @openai/codex-security in place of cs for both login and s