If you've used Cursor, Claude Code, Codeium, or Replit Agent to write production code in the past six months, you've probably hit this scenario: the AI produces a working-looking payment integration in 30 seconds, complete with an API key assembled from environment variables committed straight into git — and nobody warns you. On August 7, OpenAI open-sourced its official security scanning plugin Codex Security on npm as @openai/codex-security (GitHub: openai/codex-security, current version 0.1.8), packaging external agent invocation, multi-LLM provider support, AppArmor sandbox hardening, and containerized bulk scanning into an official CLI + TypeScript SDK.
The real significance isn't that "OpenAI open-sourced another thing" — it's that the vibe coding space finally has a unified, OpenAI-backed security layer, open to external agents from day one, not just for Codex itself.
What it does
In one sentence: a "find → verify → fix" code security scan, implemented differently from traditional SAST.
A scan is one command: npx @openai/codex-security scan . — scanning the current directory. Key parameters are notably engineering-oriented:
--mode deepfor deep mode--workers 2to control concurrent workers--subagents 0to disable sub-agents--stop-after-no-new 3to stop after 3 consecutive runs with no new findings--max-discovery-runs 10to cap discovery roundsOPENROUTER_API_KEY: third-party models such asanthropic/claude-sonnet-4.5FIREWORKS_API_KEY: e.g.,accounts/fireworks/models/qwen3-235b-a22bAWS_BEARER_TOKEN_BEDROCK+AWS_REGION: Amazon Bedrock- Anthropic Skills / Agent Plugins 1.0.0: Agent Plugins 1.0.0 packages Skills/MCP/Tools into portable units (with Anthropic itself absent); Codex Security takes a different path — a standalone AI code security product line maintained by OpenAI, not distributed via Skills.
- NVIDIA SkillSpector + LangGraph + YARA + SARIF (Aug 4 coverage): that stack is "traditional security tools + AI workflow orchestration"; Codex Security is an "AI-agent-first security tool" — the design language is inverted.
- Microsoft SkillOpt: SkillOpt solves cross-model/cross-tool skill migration; Codex Security solves "how to gate AI-written code for security." Together they sketch the full AI coding toolchain.
- OpenAI official announcement (X, @ChatGPTapp, Aug 7): 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" application: 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
- Whether the v0.1.x API stabilizes before 1.0; enterprise users should pin
@openai/codex-security@0.1.8 - How open the "Trusted Access for Cyber" approval mechanism really is — some vulnerability categories require approval to scan, potentially limiting academic/research use
- Integration depth with Codex CLI / Codex IDE: standalone CLI usage is documented, but no IDE one-click-scan UX path is visible yet
- Cross-provider latency and reproducibility: no public benchmarks comparing OpenAI vs Anthropic vs Fireworks findings on the same codebase
- No official recommended pattern for using traditional SAST (Semgrep, Snyk, SARIF) as a pre-filter, with Codex Security doing semantic confirmation
This parameter design language is written around "how AI agents control cost on long-running tasks," not the traditional static scanner's "scan everything to the end" approach. In deep mode it spawns multiple parallel sub-agents, all of which can be disabled via --subagents 0 to avoid mistakenly invoking external agents.
Multi-provider inference architecture
Codex Security defaults to OpenAI models (gpt-5.6-terra, gpt-5.6-luna), but three external providers can be selected via environment variables:
Two things are true at once. First, OpenAI did not build a closed ecosystem that only accepts OpenAI models — the opposite of GitHub Copilot's 2024-era closed strategy. Second, and more importantly, any vibe coding tool can call it. You can have Claude Code trigger a scan after writing code, have Cursor Agent scan before commits, have Replit Agent health-check before deploy. OpenAI has effectively made "AI code security" a standalone product line rather than an add-on to Codex.
Authentication model
Two login methods: npx @openai/codex-security login for ChatGPT local login (no API key needed), or OPENAI_API_KEY / CODEX_API_KEY for CI. When both exist, interactive scans ask which to use, but CI/non-interactive scenarios prioritize the API key — a classic "developer experience first, enterprise fallback" design. Local login uses the system keyring (falling back to local file storage when unavailable). CODEX_SECURITY_STATE_DIR lets you redirect the state directory when the default is not writable.
The tool's own security posture
SECURITY.md defines a trusted-local threat model: environment API keys are passed directly to the current scan and are never stored in the Codex credentials directory or system keyring; --verbose output redacts all credentials and provider identifiers; container images are pinned to immutable git revisions; an AppArmor-hardened compose config (compose.apparmor.yaml) is included; and untrusted pre-commit hook execution is prevented. Unlike traditional SAST tools (Semgrep, Snyk, GitGuardian) whose scanners are often part of the attack surface, OpenAI appears to have applied supply-chain security standards to the scanner itself.
Versus traditional SAST
The biggest difference is architectural philosophy. Semgrep runs rule matching, CodeQL runs dataflow analysis, Snyk matches vulnerability databases — these are "rule-based scanners." Codex Security is an "LLM-reasoning-based finder": you describe vulnerability patterns in natural language (--scan-prompt-file / --post-scan-prompt-file), control scan depth via reasoning effort (--effort high), and control duration via stop-after-no-new. That means it can, in principle, find novel vulnerability patterns before rules exist for them — at the cost of determinism, mitigated by --mode deep + --max-discovery-runs.
The standout comparison feature: scans compare BEFORE_SCAN_ID AFTER_SCAN_ID automatically matches findings by root cause and labels them new / persisting / reopened / resolved / unknown. This is critical for CI/CD — prior SAST tools only tell you "N vulnerabilities this scan," not "how many this commit fixed or introduced." Codex Security makes this a first-class citizen, enabling direct "net change" reporting on PRs.
Licensing and release pace
The repo root has a LICENSE file (whether Apache 2.0 or MIT isn't clearly stated on the GitHub front page, though the official announcement emphasizes welcoming open-source maintainers and contributors); the npm package is published under the OpenAI namespace. Notably: v0.1.0 prep finished July 24 and v0.1.8 shipped August 8 — 23 days from init to 0.1.x, very OpenAI-style velocity. But v0.1.x means the API may still change in minor releases; enterprise adopters should pin versions.