Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Codex Security

$ codex-security Official Med Risk
OpenAI · Security & Secrets · Apache-2.0 · macos / linux / windows

codex-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.

FCRS-1.0 Score
92 /100
Excellent
Medium Confidence
Zero-Friction Install
npm install -g @openai/codex-security
CLI vs MCP Decision CLI Preferred vs MCP

Purpose-built --llms manifest plus --format toon|json|jsonl makes direct CLI invocation strictly superior to wrapping scans in MCP.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 25 / 25

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
Trust & Safety 21 / 25

Read-only scanning by default with --path/--diff/--exclude-path scoping and flexible --auth modes.

  • Scoped read-only scanning with env/ChatGPT auth
Setup & Portability 13 / 15

Installs cleanly via npm install -g @openai/codex-security or npx @openai/codex-security on Node.js.

  • Distributed via npm (@openai/codex-security)
Utility & Efficiency 14 / 15

Validates vulnerabilities beyond naive regex SAST and even outputs compact toon format to save agent tokens.

  • AI vulnerability validation plus native toon and jsonl formatters
Maintenance & Lineage 10 / 10

Official OpenAI repository (openai/codex-security, 14.6k+ stars) under Apache-2.0.

  • Official openai/codex-security repository
Docs & Verifiability 9 / 10

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

Auth Modes
Env API Key OAuth Browser Config File
Credential Storage

Supports --auth auto|chatgpt|api-key reusing ChatGPT Codex auth or OPENAI_API_KEY / provider env credentials.

Side Effects
Read-Only Local Write
Cost & Quotas

Apache-2.0 open-source CLI; analysis consumes OpenAI/ChatGPT Codex or configured provider inference quota.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Print the agent-readable command manifest
codex-security --llms

Emits the compact agent manifest describing subcommands, scan flags, and output formats.

Scan working-tree changes as structured JSON
codex-security scan --working-tree --format json

Analyzes uncommitted repository changes and returns validated findings as JSON.

Controlled Writes & Previews

Run a scoped diff scan against main
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 --llms flag and native --format json|toon|jsonl|yaml output options.
  • + Supports --diff <base> and --working-tree for 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.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI