Codex Security क्या है?
Codex Security किसी codebase में सुरक्षा कमज़ोरियाँ (vulnerabilities) खोजने, उनकी पुष्टि (validate) करने और उन्हें ठीक करने के लिए OpenAI का CLI और TypeScript SDK. यह AI Coding टूल्स की AI Code Review & Security श्रेणी में आता है; ओपन सोर्स है, TypeScript में लिखा गया है और Apache-2.0 लाइसेंस के तहत है।
सारांश
Codex Security को `@openai/codex-security` npm package के रूप में प्रकाशित किया गया है: एक command-line tool और TypeScript SDK, जो किसी directory पर model चलाकर security findings लौटाता है। CLI सबसे तेज़ तरीका है — `codex-security login` और फिर `codex-security scan /path/to/directory` — और CI में आप साइन इन करने के बजाय `OPENAI_API_KEY` सेट करते हैं। इसके लिए Node.js 22.13.0 या उससे नया और Python 3.10 या उससे नया चाहिए।
SDK वही scanner `CodexSecurity` class के रूप में देता है, जिसमें `run()` call है। यह उन विकल्पों को लेता है जिन्हें scan असल में बदलता है: `deep` mode, worker और subagent की संख्या, `stopAfterNoNew` जो तब scan रोक देता है जब कोई run नई findings देना बंद कर दे, और discovery runs तथा wall-clock hours पर सीमा। यह एक report path लौटाता है। कई repositories एक साथ scan करने के लिए repository में `ghcr.io/openai/codex-security` image पर बना Docker Compose कॉन्फ़िगरेशन है, साथ ही एक workflow-runner उदाहरण जो CLI के चरणों को अलग करता है ताकि चरणों के बीच state बची रहे।
Scanner के आसपास एक preview findings service है, जिसे `codex-security serve` से शुरू किया जाता है या उसी container image से चलाया जा सकता है। यह findings और embeddings को SQLite में store करती है, उन्हें pages में बाँटती है, और `/dashboard` पर एक read-only dashboard देती है जो हर पाँच सेकंड में refresh होता है। `codex-security publish scan` पूरी हो चुकी findings upload करता है, और `codex-security dedupe` embedding-similarity candidates वापस लाता है, उनकी स्वतंत्र Codex reviews लोकल पर चलाता है, और स्वीकार किए गए duplicate groups सहेजता है। एक अलग `classify-severity` command चुनी गई findings को आपकी दी गई rubric file के आधार पर फिर से आँकता है, और हर finding को checkpoint करता है ताकि reruns पिछले assessments दोबारा इस्तेमाल करें। यह project Apache-2.0 है; कुछ cybersecurity requests और protected findings के लिए OpenAI के Trusted Access for Cyber programme के तहत मंज़ूरी लेनी होती है।
यह क्या करता है
- CLI और TypeScript SDK, दोनों एक ही scanner पर: `deep` mode, worker/subagent की संख्या, और समय व discovery-run की सीमाएँ
- Repository, pull-request और CI scanning, interactive login की जगह `OPENAI_API_KEY` के साथ
- Preview findings service, जो findings और embeddings को SQLite में store करती है, साथ में एक read-only, अपने-आप refresh होने वाला dashboard
- Embedding-similarity deduplication (`codex-security dedupe`), हर candidate group की स्वतंत्र लोकल Codex reviews के साथ
- Policy-driven severity classification, आपकी अपनी rubric markdown के आधार पर, हर finding पर checkpoint के साथ
- Docker Compose और `ghcr.io/openai/codex-security` image के ज़रिए containerised bulk scans
- Amazon Bedrock, OpenRouter और Fireworks जैसे अन्य inference providers पर चलता है, `--provider` और `--model` के साथ
शुरू करें
npm package इंस्टॉल करें, एक बार authenticate करें, और कोई directory scan करें। Node.js 22.13.0+ और Python 3.10+ ज़रूरी हैं।
इंस्टॉल करें और scan करें
README के तीन commands: इंस्टॉल करें, साइन इन करें, scan करें। CI में login छोड़ दें और OPENAI_API_KEY सेट करें।
npm install @openai/codex-security
codex-security login
codex-security scan /path/to/directoryTypeScript से चलाएँ
SDK scanner को एक class के रूप में देता है। `run()` एक result लौटाता है, जिसमें report path होता है; options वही scan controls से मेल खाते हैं जो CLI में हैं।
import { CodexSecurity } from "@openai/codex-security";
const security = new CodexSecurity();
const result = await security.run("/path/to/directory", {
mode: "deep",
workers: 2,
subagents: 0,
stopAfterNoNew: 3,
maxDiscoveryRuns: 10,
maxTimeHours: 1.5,
});
console.log(result.reportPath);
await security.close();Findings service चलाएँ
कई scans की findings इकट्ठा करने के लिए preview service को Docker के बिना शुरू करें। इसका dashboard /dashboard पर दिखता है और हर पाँच सेकंड में refresh होता है।
codex-security serve
codex-security publish scan --to custom --findings-url http://localhost:3000अपनी policy के अनुसार severity classify करें
Classifier को एक rubric markdown file की ओर इंगित करें। मूल scan severity नहीं बदली जाती; `--reprocess` पहले से checkpoint की गई findings का दोबारा assessment करवाता है।
codex-security classify-severity --scan SCAN_ID --rubric /path/to/policy.mdकमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।
कब इस्तेमाल करें
- जब आप interactive chat के बजाय CI gate के रूप में LLM security review चाहते हैं, तब इसका इस्तेमाल करें
- जब कई repositories स्कैन करनी हों और हर run में दोबारा triage करने के बजाय deduplicated findings चाहिए, तब इसका इस्तेमाल करें
- जब आपकी organisation की severity policy scanner से अलग हो और आप findings को उसके मुताबिक फिर से grade करवाना चाहें, तब इसका इस्तेमाल करें
- जब आप scan को CLI के लिए shell से चलाने के बजाय TypeScript service में जोड़ना चाहें, तब इसका इस्तेमाल करें
वर्शन इतिहास
Every verified update to Codex Security that AI/TLDR tracked, newest first — each links to our coverage and the official changeset.
- 12 नव॰ 20260.10.0
Interrupted Standard scans can resume from a saved checkpoint, a --max-total-cost flag sets one estimated budget across bulk or component scans, and blocked patches now explain what stopped the fix. ArmorCode SAST findings can be imported locally.
- 28 जुल॰ 2026
OpenAI open-sourced Codex Security under Apache-2.0 — a CLI and TypeScript SDK that scans repositories, reviews pull-request changes, tracks findings over time and plugs into CI as a security gate.
How Codex Security compares
Codex Security alongside other open-source ai code review & security tools AI/TLDR tracks, ranked by GitHub stars.
| टूल | स्टार | यह क्या करता है |
|---|---|---|
| Open Code Review | ★ 57.9k | Alibaba का code-review CLI, जो review प्रक्रिया को deterministic engineering से तय रखता है और सिर्फ़ judgement calls LLM agent पर छोड़ता है |
| Bend | ★ 26.1k | एक कंपाइल होने वाली भाषा जिसका टाइप चेकर ही प्रूफ़ चेकर भी है, इसलिए AI का कोई बदलाव तभी बिल्ड होता है जब वह साबित करे कि आपके घोषित नियम अब भी सही हैं |
| Codex Security | ★ 14.5k | किसी codebase में सुरक्षा कमज़ोरियाँ (vulnerabilities) खोजने, उनकी पुष्टि (validate) करने और उन्हें ठीक करने के लिए OpenAI का CLI और TypeScript SDK |
| Whiteboard | ★ 3.6k | एक ओपन सोर्स कैनवास, जहाँ कोडिंग एजेंट अपने बदलावों के डायग्राम बनाते हैं, ताकि लोग diff देखने से पहले डिज़ाइन की समीक्षा कर सकें |
| git-lrc | ★ 1.5k | git commit से जुड़ने वाला एक Go CLI, जो हर staged diff को commit होने से पहले AI review से गुज़ारता है। इसमें browser review UI है और git log में review stats भी दिखते हैं। |
| Sphinx | ★ 511 | एक git hook जो protected branch पर push को तब तक रोकता है जब तक आप सही अनुमान न लगा लें कि agent द्वारा लिखा गया change क्या करता है |
| CodeRabbit | — | AI pull request reviewer that analyzes diffs with full-repo context to flag bugs, security issues, and quality problems, posting inline comments and one-click fixes. |
| Greptile | — | AI code review tool that indexes your whole codebase into a graph so a swarm of agents can catch multi-file logic bugs and security risks in every PR. |
