Codex Security
$ codex-security Official Med Riskcodex-security (@openai/codex-security) is OpenAI's official security analysis CLI and TypeScript SDK. Built natively for coding agents and CI pipelines with --llms self-describing manifest output, --format json|toon|jsonl|yaml, git --diff scoping, and --working-tree scans.
npm install -g @openai/codex-security Purpose-built --llms manifest plus --format toon|json|jsonl makes direct CLI invocation strictly superior to wrapping scans in MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Features --llms self-describing agent manifest, --format json|toon|jsonl|yaml, and scoped non-interactive scan subcommands.
- Supports
--llms,--format json|toon|jsonl|yaml, and--working-tree
Read-only scanning by default with --path/--diff/--exclude-path scoping and flexible --auth modes.
- Scoped read-only scanning with env/ChatGPT auth
Installs cleanly via npm install -g @openai/codex-security or npx @openai/codex-security on Node.js.
- Distributed via npm (
@openai/codex-security)
Validates vulnerabilities beyond naive regex SAST and even outputs compact toon format to save agent tokens.
- AI vulnerability validation plus native
toonandjsonlformatters
Official OpenAI repository (openai/codex-security, 14.6k+ stars) under Apache-2.0.
- Official
openai/codex-securityrepository
Official docs at developers.openai.com/codex/security and machine-readable --llms help.
- Docs at developers.openai.com/codex/security and
--llms
Security, Auth & Guardrails
Supports --auth auto|chatgpt|api-key reusing ChatGPT Codex auth or OPENAI_API_KEY / provider env credentials.
Apache-2.0 open-source CLI; analysis consumes OpenAI/ChatGPT Codex or configured provider inference quota.
# codex-security Agent Rules - Run `codex-security --llms` once to verify supported `--format` and `--provider` flags. - Scope PR/branch checks with `--diff <base>` or `--working-tree` and `--format json` (or `toon`). - Review every suggested security patch before applying edits to production code.
Agent-Ready Command Recipes
Safe Read-Only Queries
codex-security --llms
Emits the compact agent manifest describing subcommands, scan flags, and output formats.
codex-security scan --working-tree --format json
Analyzes uncommitted repository changes and returns validated findings as JSON.
Controlled Writes & Previews
codex-security scan --diff origin/main --exclude-path node_modules --format toon
Scans commits since origin/main in token-efficient TOON output format.
Strengths for Agents
- + First-class
--llmsflag and native--format json|toon|jsonl|yamloutput options. - + Supports
--diff <base>and--working-treefor fast, low-cost PR and pre-commit security checks. - + Supports multiple providers (
openai,openrouter,fireworks,amazon-bedrock) and ChatGPT auth.
Caveats & Pitfalls
- ! Deep repository scans (
--mode deep) consume significant model quota and wall-clock time. - ! Requires an active ChatGPT Codex session or supported LLM provider API key.