Overview
On August 7, OpenAI open-sourced Codex Security on npm as @openai/codex-security (GitHub: openai/codex-security, version 0.1.8). The release packages code security scanning as an official CLI plus TypeScript SDK, explicitly designed for *external* AI agents, not only Codex itself. This is the first OpenAI-blessed, vendor-neutral security layer that every "vibe coding" tool—Cursor, Claude Code, Replit Agent, Codeium—can plug into.
Key points
Three-stage pipeline: find → verify → fix
- Run with:
npx @openai/codex-security scan . - Workflow-flavored flags let agents control cost on long tasks:
--mode deepfor deep analysis--workers 2for parallel workers--subagents 0to disable sub-agent fan-out (prevents accidental recursion in external agents)--stop-after-no-new 3to halt after N consecutive empty rounds--max-discovery-runs 10to cap total discovery roundsOPENROUTER_API_KEY→ e.g.anthropic/claude-sonnet-4.5FIREWORKS_API_KEY→ e.g.accounts/fireworks/models/qwen3-235b-a22bAWS_BEARER_TOKEN_BEDROCK+AWS_REGION→ Amazon Bedrocknpx @openai/codex-security login→ ChatGPT local login (no API key required), backed by system keyring with a local-file fallback.OPENAI_API_KEY/CODEX_API_KEY→ CI-friendly API key path; keys take priority in non-interactive runs.CODEX_SECURITY_STATE_DIRlets CI relocate state to a writable directory outside the repo.- Environment API keys are passed to the current scan and never stored in the Codex credential directory or system keyring.
--verboseoutput redacts credentials and provider identifiers.- Container images are pinned to immutable Git revisions.
- Shipped with AppArmor hardening (
compose.apparmor.yaml). - Untrusted pre-commit hooks are blocked. The scanner itself avoids becoming an attack surface, unlike many legacy SAST/SCA tools.
- Semgrep, CodeQL, Snyk, GitGuardian = rule-based scanners.
- Codex Security = LLM-reasoning-based discoverer, using natural-language prompt files (
--scan-prompt-file,--post-scan-prompt-file) and effort levels (--effort high). - Stronger at novel, not-yet-codified vulnerability patterns, but less deterministic—mitigated by
--mode deep+--max-discovery-runs. - LICENSE file present at repo root (exact terms—likely Apache 2.0 or MIT—not yet headline-prominent on GitHub).
- v0.1.0 prepared July 24; v0.1.8 released August 8: roughly 23 days from init to
0.1.x. - v0.1.x signals API may still shift before 1.0—pin versions in production (
@openai/codex-security@0.1.8). - Anthropic Skills / Agent Plugins 1.0.0: packages Skills/MCP/Tools as portable units; Codex Security instead exposes security scanning as an independent, OpenAI-maintained product line, not distributed via Skills.
- NVIDIA SkillSpector + LangGraph + YARA + SARIF: traditional security tools orchestrated by AI workflow—opposite design direction from Codex Security's "AI-agent-first security tool."
- Microsoft SkillOpt: solves cross-model/cross-tool skill portability; Codex Security solves the "security gate for AI-written code." Together, they sketch a complete AI coding toolchain picture.
- OpenAI announcement on X: https://x.com/ChatGPTapp/status/1954472109380260483
- GitHub repo: https://github.com/openai/codex-security
- npm package: https://www.npmjs.com/package/@openai/codex-security
- Official CLI docs: https://learn.chatgpt.com/docs/security/cli
- TypeScript SDK README: https://github.com/openai/codex-security/blob/main/sdk/typescript/README.md
- "Trusted Access for Cyber" entry point: https://chatgpt.com/cyber
- v0.1.0 prep PR: https://github.com/openai/codex-security/pull/11852
- v0.1.8 release notes: https://github.com/openai/codex-security/pull/301
- Containerized bulk scan docs: https://github.com/openai/codex-security/blob/main/sdk/typescript/README.md#containerized-bulk-scans
- API stability before 1.0; pin
@openai/codex-security@0.1.8today. - Unknown openness of "Trusted Access for Cyber" approvals—could restrict academic/research use of certain vulnerability categories.
- Depth of integration with Codex CLI / Codex IDE; in-IDE "one-click scan" UX not documented.
- No public benchmark on reproducibility differences across OpenAI / Anthropic / Fireworks providers.
- No official guidance on pairing Codex Security as a semantic confirmation pass after a fast rule-based SAST pre-filter (Semgrep, Snyk, SARIF).
Multi-model provider architecture
Default models are OpenAI's own (gpt-5.6-terra, gpt-5.6-luna), but providers are switchable via env vars:
Implications: Codex Security is not a closed OpenAI-only ecosystem (unlike 2024-era GitHub Copilot), and *any* coding agent can invoke it as a post-write security gate.
Authentication model
Tool-level (supply-chain) security
SECURITY.md defines a trusted-local threat model:
Comparison with traditional SAST
First-class scan diffing for CI/CD
scans compare BEFORE_SCAN_ID AFTER_SCAN_ID auto-classifies findings as new / persisting / reopened / resolved / unknown, giving PRs a precise "net change" rather than a flat vulnerability count.Licensing & release cadence
Positioning vs adjacent products
Sources (by authority)
Open questions
Bottom line
Codex Security is not "yet another OpenAI bundle." It is the first model-vendor-maintained, agent-agnostic, provider-portable security scanning foundation for the vibe coding era. Cursor, Claude Code, Replit, and Codeium now share a common security gate instead of each reinventing SAST—which is OpenAI's move to standardize vibe coding from the infrastructure layer up.