Modern software development increasingly relies on automation, but security reviews often remain one of the last manual checkpoints. OpenAI’s Codex Security takes a different approach by packaging an AI-assisted security scanner as an open-source command-line tool and TypeScript SDK designed for repositories you own or have explicit permission to assess.
Rather than acting as a generic code linter, Codex Security focuses on identifying, validating, and reviewing potential security issues. The tool requires authentication with an OpenAI account or API key before running scans and supports macOS, Linux, and Windows. Node.js 22 or newer is required, while Python 3.10 or later is needed only for scanning and exporting results.
One of the most practical design decisions is its flexibility in defining what gets analyzed. Developers can scan an entire repository, limit the scan to selected paths, compare against a Git diff, or enrich the analysis with additional documentation such as architecture descriptions, threat models, PDFs, or Word documents. By allowing multiple knowledge-base inputs, the scanner can incorporate project-specific context instead of relying solely on source code.
The output is equally geared toward real-world workflows. Results can be exported as JSON, CSV, or SARIF, making them suitable for integration with existing security pipelines and code-scanning platforms. The tool also keeps a scan history, allowing developers to rerun previous scans, compare findings between revisions, and match vulnerabilities across multiple scan results to distinguish newly introduced issues from existing ones.
Continuous integration receives particular attention. Scans are report-only by default, but teams can enable policy enforcement with –fail-on-severity, causing builds to fail only when findings meet or exceed a chosen severity threshold. Runtime errors and incomplete coverage are reported separately with distinct exit codes, making automated pipelines more predictable.
For Git users, Codex Security can install a pre-commit hook that scans staged and unstaged changes before every commit. The hook respects existing Git hook configurations, avoids overwriting custom hooks, and blocks commits only when configured severity thresholds are exceeded or a scan cannot complete successfully.
Organizations managing many repositories are not left out. A bulk scanning mode can automatically discover recently updated GitHub repositories through an existing GitHub CLI login or process a supplied CSV inventory. The included Docker configuration targets large-scale campaigns by supporting resumable scans, multiple concurrent workers, persistent authentication, and hardened sandboxing. The supplied container configuration deliberately minimizes privileges by dropping Linux capabilities, running as a non-root user, and using a restrictive seccomp profile while still permitting the namespaces required by its scanning sandbox.
Developers who prefer integrating security directly into their own tooling can use the accompanying TypeScript SDK. Beyond starting scans, the SDK exposes preflight validation, progress callbacks, cancellation support, path and diff targeting, and typed scan results. Applications can therefore build security analysis into custom workflows without shelling out to the CLI.
Another notable detail is the emphasis on protecting scan artifacts themselves. Results must be written outside the scanned repository and, on Linux and macOS, existing output directories are required to be private to the current user. This reflects the reality that vulnerability reports frequently contain source code excerpts, reproduction steps, and other sensitive information that should not accidentally end up committed to version control or shared publicly.
The project also exposes machine-readable command metadata for AI agents while deliberately limiting what is available through its Model Context Protocol server. Metadata can be queried, but authentication, scanning, validation, exporting, and patch generation remain CLI-only because long-running scans require capabilities that the transport cannot currently provide.
One recurring theme throughout the project is careful separation between analysis and modification. Scans produce reports by default, while validation and patch generation are explicit commands that operate on supplied findings. That keeps the default workflow focused on surfacing evidence before suggesting fixes.
For engineering teams already investing in automated testing and continuous integration, AI-assisted security scanning is becoming another component of the development toolchain rather than an occasional audit. Open-source projects like Codex Security demonstrate how modern language models can be integrated into familiar developer workflows while preserving structured outputs, reproducible automation, and compatibility with established security formats.
For implementation details, installation instructions, and the complete command reference, see https://github.com/openai/codex-security.