Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
Add a star history chart too →

openai/codex-security

Security & Privacy

A CLI and TypeScript SDK that scans repositories for security vulnerabilities, validates findings, and proposes fixes.

Best position on GitHub Trending (daily): #9. Click to get this badge for your README
12,016
955
TypeScript
Apache-2.0
4 months old

What it does

Codex Security is OpenAI's application-security toolset for locating, investigating, and repairing vulnerabilities in source code. It ships as a terminal CLI (cs), a TypeScript SDK, a GitHub Action, and an agent workflow inside Codex. Scans cover a whole repository, selected paths, or a Git diff; deep scans rerun standard scans and deduplicate the results. Beyond detection, it can validate candidate findings, generate patches, verify existing fixes, draft SECURITY.md policies, and save threat models. Findings can be exported to SARIF, JSON, or CSV, or pushed to Linear, Jira, and GitHub.

Quick start

The CLI needs Node.js 22.13.0 within the 22.x line, or Node.js 24.x/26.x, plus Python 3.10+ (tomli on 3.10). Install globally and authenticate:

npm install --global @openai/codex-security
cs login

From the repository you want to review:

cs scan .

When the scan finishes, open the Markdown file at the REPORT path printed in the terminal; cs scans show re-displays the latest completed scan for that repository. Narrow the scope with --path src, compare against a base revision with --diff origin/main, or request a deeper run with --mode deep. If the global install conflicts with another command, use codex-security instead of cs, or run npx @openai/codex-security.

For CI, set OPENAI_API_KEY or CODEX_API_KEY in the scan environment; headless machines have a separate device/SSH login flow covered in the CLI docs. See the quick start and CLI reference for the full option set.

Programmatic use

The SDK exposes the same engine to TypeScript code:

import { CodexSecurity } from "@openai/codex-security";

const security = new CodexSecurity();
try {
  const result = await security.run("/path/to/repository");
  console.log(result.reportPath);
} finally {
  await security.close();
}

The SDK guide documents deep-scan configuration, validation, severity classification, owner suggestions, and result handling.

Constraints and access

Scans are model-driven and consume API usage or a ChatGPT plan quota. The README's GitHub Actions example uses an estimated $5 per-scan limit, though in-progress requests can exceed it. Some cybersecurity requests and protected findings require enrollment in Trusted Access for Cyber; Daybreak accounts have a separate opt-in toggle. Scans use existing root and component SECURITY.md files, so policy updates should preserve vulnerability-reporting instructions. Providers other than OpenAI are supported (Amazon Bedrock, OpenRouter, Fireworks AI, Cheaper Inference) with their own credentials and model selection. The project is Apache-2.0 licensed.

HotRepo's take

On 2026-11-11 the repository reached 9th on GitHub's all-language daily ranking, adding 20 stars that day at roughly 11.4k total. The launch thread on Hacker News (2026-07-28) drew 598 points and 229 comments, and the discussion is more useful than the star count: users reported an almost one-hour run interrupted because the repository HEAD changed mid-scan after draining half a Pro plan's weekly usage, a scan that cost about $13 before hitting rate limits with no obvious way to resume the partial output, and a run blocked by a cybersecurity flag that directed the user to Trusted Access for Cyber with no final output. A commenter argued tokens should be refunded when the agent refuses to work (source:15). A maintainer acknowledged in the thread that the project was freshly open-sourced and still needs improvement and invited feedback. For teams evaluating it, the practical questions are scan cost controls, resumability of partial runs, and whether the guardrail/access program fits their threat-modeling workflow.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

Hacker News

Codex Security
▲ 598 · 229 comments · July 28, 2026

You might also like

  1. KeygraphHQ/shannonAn autonomous agent that reads your web app's source, then runs real exploits against a staging copy to prove vulnerabilities.TypeScript49,899
  2. cloudflare/security-audit-skillA coding-agent skill that runs multi-phase security audits and writes verified, schema-checked findings.JavaScript69,706
  3. NVIDIA/SkillSpectorChecks an AI agent skill for malicious patterns and vulnerabilities before you let an agent run it.Python21,679
  4. morluto/reaAn MCP server and CLI that let coding agents inspect binaries, apps, and runtime behavior and return evidence-backed reverse-engineering findings.TypeScript451,938
  5. spring-projects/spring-securityA Spring framework library that adds authentication and authorization to Java applications.Java9,655