English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

OpenAI Releases Codex Security CLI: AI Security Review Before the Commit

Forum topic · 小凯 · 2026-07-29

Summary

On July 29, OpenAI released Codex Security as a CLI and TypeScript SDK under the repository openai/codex-security. Unlike a typical vulnerability scanner, it scans whole repositories, single paths, Git diffs, or uncommitted working-tree changes and produces structured, CI-ready artifacts: findings.json (severity, confidence, evidence, remediation), coverage.json (complete/partial/unknown coverage with deferred areas and open questions), report.md, and optional SARIF export. It targets the development loop rather than quarterly audits via --diff, --working-tree, and install-hook for pre-commit blocking, plus deep mode, architecture docs as knowledge base, batch GitHub repo scanning, and finding match/compare across scans. The author frames it as a semantic review layer that complements rule-based SAST rather than replacing it, noting trade-offs: inference cost (--max-cost support), result variability, access requirements, and unavoidable false positives/negatives. The tool is in beta, requires Codex Security access, Node.js 22+, Python 3.10, and sometimes Trusted Access for Cyber. Because outputs may contain source snippets and vulnerability details, OpenAI advises storing them outside the repo. The post argues security gates are becoming a default stage in AI coding agent pipelines.

Codex Security: OpenAI's New CLI Puts AI Security Review Before the Commit

On July 29, OpenAI released the CLI and TypeScript SDK for Codex Security, in a plainly named repository: openai/codex-security. It can scan an entire codebase, a single path, a diff, or uncommitted working-tree changes — and the output isn't just a vague "risk found" warning, but structured artifacts that can be stored, compared, and wired into CI.

At first glance it looks like yet another security scanner. Look closer, and it smells different.

Scan Results Split into Three Ledgers

A standard scan generates:

  • findings.json: severity, confidence, location, evidence, and remediation advice;
  • coverage.json: which code was reviewed, what was excluded, and what's still owed;
  • report.md: a human-readable report;
  • Optionally, SARIF export for direct integration with code hosting platforms and CI.
  • What I care about most is coverage.json. Traditional SAST often packages "no errors" as "secure," but no errors may simply mean nothing was scanned. Codex Security explicitly categorizes coverage as complete, partial, or unknown, and asks readers to check deferred areas and open questions. It's a restrained design: it admits security review has blind spots.

    It Targets the Development Loop, Not Quarterly Audits

    The tool supports three very specific entry points:

    1. --diff to check changes between two Git revisions; 2. --working-tree to review staged and unstaged code; 3. install-hook to add a pre-commit hook that blocks high-severity findings and scan errors before commit.

    There's also deep mode, architecture docs and threat models as a knowledge base, batch scanning of GitHub repositories, re-running historical scans, and finding match/compare between two scans. New, persistent, re-emerging, resolved, and unknown findings can be viewed separately.

    This pushes security review from a "pre-release meeting" into the daily coding loop. A coding agent writes the code; a security agent reviews it next; once root causes are found, subsequent scans keep tracking them. It short-circuits a lot of back-and-forth.

    Division of Labor with Traditional SAST

    Don't rush to call it a replacement. Codex Security is more like a semantic review layer.

    Rule-based scanners excel at deterministic patterns — fast, stable results. Model-based review is good at reading cross-file data flows, architecture docs, permission boundaries, and the current diff together. The costs are also on the table: inference expense, result variability, access permissions, and false positives/negatives that won't disappear. The CLI even offers --max-cost to stop new requests when the budget is exhausted, though in-flight requests may still push the bill slightly over the cap.

    It's currently in beta and requires Codex Security access. Node.js 22+ is required, with Python 3.10 needed for scanning or export; full repository scans may additionally require Trusted Access for Cyber. In other words, an open-source repo doesn't mean the service capability is fully open.

    One more thing that can't be skipped: results may contain source code snippets and vulnerability details. OpenAI requires placing the output directory in a private location outside the repo, with a retention policy configured. Security reports are themselves sensitive assets.

    Why It's Worth Watching

    Just days ago, the AI coding world turned Harness and multi-agent parallelism into an official methodology; today OpenAI adds a "security harness" layer on top. A mature coding agent pipeline will likely no longer end at code generation, but follow:

    > Plan → modify → test → security review → coverage confirmation → compare with history → only then allow merge.

    Models still matter. But for products that actually make it into enterprises, the competition is over who turns these gates into defaults.

    Original sources

  • OpenAI Codex Security repository: https://github.com/openai/codex-security
  • Official CLI quickstart: https://learn.chatgpt.com/docs/security/cli
  • Release announcement: https://x.com/thsottiaux/status/2082241164850364555

Tags

#openai#codex-security#ai-coding#appsec#sast#devsecops#cli#code-review

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178503767