NewsSecurity

OpenAI Codex Security Open-Sources Its CLI Today

OpenAI released its Codex Security CLI and TypeScript SDK to GitHub on July 28, 2026 — but the company didn’t announce it. Hacker News found it first. The repo appeared quietly on GitHub and npm as @openai/codex-security under Apache 2.0, and within hours it became the top story on HN with 322 points. OpenAI later confirmed on X: “We quietly released the open-source Codex Security CLI, but Hacker News found it before we had a chance to share it here.” The tool can scan repositories for vulnerabilities, track findings across runs, verify fixes, and drop into CI/CD pipelines. What it cannot do, without a paid subscription, is produce any results.

OpenAI Codex Security: Open Source Client, Commercial Backend

What OpenAI open-sourced is the Codex Security CLI and TypeScript SDK — the scaffolding that lets you run scans and receive structured output. What remains closed is the reasoning engine that actually finds vulnerabilities. The official documentation is blunt: using the tool requires “access to Codex Security service,” which is not free. Pricing sits around $0.018 per thousand lines scanned.

This is the “open source client, commercial backend” model — the same pattern used by Stripe’s SDKs, the AWS CLI, and dozens of developer tools before them. You can inspect the client code, fork it, and contribute fixes. The intelligence is rented. For teams already in the OpenAI ecosystem paying for Codex access, this is a welcome move. For teams hoping to self-host an AI security scanner, this is not that.

Why OpenAI Codex Security Isn’t Another SAST Tool

The actual technical differentiation here is worth understanding. Traditional static analysis tools — Semgrep, Snyk, CodeQL — work by matching code against libraries of known vulnerability patterns. They are fast, battle-tested, and excellent at catching SQL injection, XSS, and hardcoded credentials. However, they consistently miss authorization bypasses, IDOR bugs, and missing permission checks across execution paths, because those require understanding intent, not matching patterns.

Codex Security uses LLM reasoning to determine whether code correctly implements security controls. During its research preview, it scanned over 1.2 million commits and surfaced 792 critical vulnerabilities across projects including GnuTLS, Chromium, and PHP — including three critical issues that neither Semgrep nor Snyk caught in comparative testing. The vendor claims approximately 70% fewer false positives versus traditional SAST. The caveat is a real one: the tool can only reason about what the code does, not about design intent or business logic that lives outside the repository.

Related: T3MP3ST: Your AI Coding Agent Is Now a Red-Team Operator

Getting Started

The setup bar is low — Node.js 22+ and Python 3.10+ are the only prerequisites. For teams that already have Codex Security access, it takes about two minutes to get a first scan running:

npm install @openai/codex-security

# Interactive scan
npx codex-security login
npx codex-security scan .

# CI/CD (no interactive login)
OPENAI_API_KEY=<your_key> npx codex-security scan .

A TypeScript SDK is also available for programmatic access — useful if you want to build custom reporting pipelines or integrate findings into your own tooling. The CLI stores state via a configurable CODEX_SECURITY_STATE_DIR environment variable, which makes tracking findings across runs straightforward in stateful CI environments.

Where Codex Security Fits in Your Stack

Codex Security does not replace Semgrep. The right mental model is layered: Semgrep runs fast on every PR, catches the known-pattern vulnerabilities, and costs nothing for most teams. Codex Security audits whether your access control logic is actually correct — the class of bug that AI-generated code introduces most often. Those two tools are doing fundamentally different things.

The pricing reality matters here. At $0.018 per thousand lines, a 500,000-line codebase costs $9 per full scan. That is reasonable for a periodic audit cadence but expensive to run on every commit. The sensible pattern for most teams is Semgrep on every PR, Codex Security on a weekly schedule or pre-release. Whether this specific product is worth the cost depends on whether authorization and logic-layer bugs are a real risk in your stack — and for teams shipping AI-generated code at scale, the answer is increasingly yes.

Key Takeaways

  • OpenAI open-sourced the Codex Security CLI and TypeScript SDK (Apache 2.0) on July 28, 2026 — the client is free, the backend reasoning engine requires a paid subscription
  • Codex Security catches authorization bypasses, IDOR, and broken access control using LLM reasoning — the bug class that traditional SAST tools consistently miss
  • Setup takes about two minutes if you already have Codex access; CI/CD integration uses a single environment variable
  • This is not a Semgrep replacement — it is a complement that operates at the logic layer, most valuable for teams shipping AI-generated code at scale
ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News