AI News (2026/7/31): OpenAI Open Sources Codex Security CLI: AI-Powered Code Security Scanner with Automatic Remediation and CI/CD Integration
Executive Summary:
OpenAI has officially open-sourced the Codex Security CLI, an AI-based code security scanning tool designed to help security teams and developers more efficiently identify, verify, and fix vulnerabilities during development. The project is available on GitHub under the Apache-2.0...
Open Source Release and Positioning
OpenAI has officially open-sourced the Codex Security CLI, an AI-based code security scanning tool designed to help security teams and developers more efficiently identify, verify, and fix vulnerabilities during development. The project is available on GitHub under the Apache-2.0 license and can also be installed as the npm package @openai/codex-security.
Codex Security first appeared in March 2026 as a research preview. This open-source release makes the core CLI tool publicly available to the community. According to OpenAI, the tool is not a traditional static analysis tool; instead, it leverages the semantic understanding of large models to perform contextual analysis of the overall project logic, identifying attack surfaces and hidden vulnerabilities across multiple files.
Core Capabilities: Semantic Scanning, False Positive Filtering, and Automatic Remediation
The official documentation lists the following key capabilities:
- Intelligent Vulnerability Scanning: Understands the project architecture like a security engineer, automatically identifying user input points, data flows, and potential risk paths, with support for cross-file analysis.
- False Positive Filtering: Proactively verifies whether a vulnerability has a real attack path rather than relying solely on pattern matching, significantly reducing the false positive rate compared to traditional tools.
- Automatic Remediation Suggestions: Provides explanations of dangerous code for each identified issue, along with recommended coding practices and directly applicable patches that developers can review and merge.
- CI/CD Integration: Can be integrated into automated pipelines, with scan records automatically saved for continuous tracking and rollback.
OpenAI states that Codex Security first builds a threat model for the project and then scans the repository history. As a result, the initial scan may take longer, but subsequent incremental scans will be faster.
Installation and Usage
Codex Security CLI requires Node.js 22+ and Python 3.10+. It can be installed globally or locally via npm:
npm install @openai/codex-security
After installation, authentication is required. Individual developers can use npx codex-security login to authenticate via the ChatGPT login process; for team or CI environments, set the OPENAI_API_KEY environment variable.
To perform a scan, navigate to the root directory of the code repository and run:
npx codex-security scan .
Scan results are automatically saved in the default state directory, and the path can be customized using the CODEX_SECURITY_STATE_DIR environment variable. The tool also supports advanced parameters, such as --model to specify the model and --effort to control scan depth (e.g., --effort high).
This tool is currently in early release. OpenAI explicitly states that it is an early version and some features are still under development. Details such as whether a separate Codex Security subscription or API costs are required, the range of supported languages, and other specifics have not yet been fully disclosed and are subject to future updates.
Sources and Project Links
- GitHub Repository: https://github.com/openai/codex-security
- Official Documentation (CLI Quick Start): https://learn.chatgpt.com/docs/security/cli
- Codex Security Overview: https://learn.chatgpt.com/docs/security
- OpenAI Research Preview Announcement: https://openai.com/index/codex-security-now-in-research-preview/
- OpenAI Community Introduction: https://community.openai.com/t/introducing-the-open-source-codex-security-cli/1388319


