AI कोडिंग एजेंट्स के लिए मल्टी-एजेंट स्टैटिक एप्लिकेशन-सुरक्षा समीक्षा हार्नेस: कोडबेस को मैप करता है, भेद्यता वर्गों की खोज करता है, निष्कर्षों को श्रृंखलाबद्ध और सत्यापित करता है, और SARIF, JSON, तथा PDF में रिपोर्ट करता है।
Claude Code (और, बाद में, अन्य AI एजेंट्स) के लिए एक मल्टी-एजेंट एप्लिकेशन-सुरक्षा समीक्षा हार्नेस। एक राउटर स्किल एक पूर्ण आक्रामक-सुरक्षा पाइपलाइन को डिस्पैच करता है जो एक कोडबेस को मैप करता है, प्रति-श्रेणी ज्ञान आधार के साथ कमज़ोरियों का शिकार करता है, निष्कर्षों को एस्केलेशन में श्रृंखलाबद्ध करता है, वास्तविक प्रभाव को सत्यापित करता है, और README / JSON / SARIF / doc / PDF में रिपोर्ट करता है।
दायरा: यह हार्नेस उस कोड पर स्टैटिक विश्लेषण (स्रोत समीक्षा, डेटा-फ़्लो ट्रेसिंग, PoC/पेलोड निर्माण) करता है जिसका आप स्वामी हैं या जिसका परीक्षण करने के लिए आप अधिकृत हैं। यह लाइव तृतीय-पक्ष सिस्टम पर हमला नहीं करता।
security-harness/ # a plugin marketplace └── plugins/security-harness/ ├── skills/ │ ├── sh-router # single entry point - routes any appsec request │ ├── sh-security-review # the pipeline orchestrator (Stages 0-5) │ └── sh-kb-* (15) # per-vuln-class knowledge bases ├── agents/ │ ├── sh-recon # map: Graft graph + stack/SBOM/CVE + attack surface │ ├── sh-hunter # find: source→sink hunting, one per class (parallel) │ ├── sh-chainer # escalate: combine findings into attack chains │ ├── sh-verifier # confirm: offensive + seceng + dev verification + PoC │ └── sh-reporter # deliver: README/JSON/SARIF/HTML/PDF/doc └── references/ # shared contracts (finding schema, SARIF map, state files, rubrics)
### कवर की गई भेद्यता श्रेणियाँ (`sh-kb-*` कौशल)
access-control (IDOR/BOLA/priv-esc) · sqli · xss · ssrf · injection (cmd/code/SSTI/LDAP) · auth (session/JWT)
· deserialization · path-traversal (LFI/RFI) · secrets · csrf · xxe · open-redirect · crypto · race-conditions
· file-upload. Dependency CVEs/SBOM को recon चरण द्वारा संभाला जाता है।
## इंस्टॉल
यह हार्नेस कई एजेंट्स के लिए उपलब्ध है। पूर्ण पैकेजिंग विवरण और रिलीज़
चेकलिस्ट [`docs/DISTRIBUTION.md`](https://github.com/dmdhrumilmistry/security-harness/blob/main/docs/DISTRIBUTION.md) में हैं।
**Claude Code** - इस रेपो को प्लगइन मार्केटप्लेस के रूप में जोड़ें और प्लगइन इंस्टॉल करें:```
/plugin marketplace add dmdhrumilmistry/security-harness
/plugin install security-harness
/plugin marketplace add इनमें से कोई भी स्वीकार करता है: एक GitHub owner/repo (जैसा ऊपर है), एक पूर्ण git URL
(https://github.com/dmdhrumilmistry/security-harness.git), या किसी क्लोन का स्थानीय पथ
(उदा. /plugin marketplace add ./security-harness उस डायरेक्टरी से जिसमें आपका चेकआउट है)।
फिर /plugin install security-harness चलाएँ और संकेत मिलने पर पुनः लोड करें।
Gemini CLI - एक नेटिव एक्सटेंशन, मैनिफ़ेस्ट रेपो रूट पर:```bash gemini extensions install https://github.com/dmdhrumilmistry/security-harness
**opencode, Codex, या कोई भी [agentskills.io](https://agentskills.io) एजेंट** - skills को एक discovery directory में कॉपी करें। Codex इसके अतिरिक्त स्वयं `AGENTS.md` को उठा लेता है:```bash
git clone https://github.com/dmdhrumilmistry/security-harness
cd security-harness
python3 scripts/sync-agent-skills.py --install agents # ~/.agents/skills
python3 scripts/sync-agent-skills.py --install opencode # ~/.config/opencode/skills
Graft पाइपलाइन द्वारा स्वचालित रूप से इंस्टॉल और सेटअप किया जाता है। Stage 0 npm install -g @nanonets/graft चलाता है यदि यह अनुपस्थित है (Node/npm की आवश्यकता है), फिर graft init <target> --no-agents --no-global
चलाता है ताकि लक्ष्य रेपो के लिए Graft MCP सर्वर और freshness hooks रजिस्टर हो सकें। ग्राफ स्वयं (<target>/graft/,
स्वतः-gitignored) recon के दौरान बनाया जाता है। मैन्युअल रूप से पहले से इंस्टॉल करने के लिए: npm install -g @nanonets/graft। Graft का
संरचनात्मक बिल्ड मुफ़्त है और इसके लिए किसी API key की आवश्यकता नहीं है; वैकल्पिक --deep LLM पास सेट होने पर GRAFT_API_KEY /
GRAFT_PROVIDER / GRAFT_MODEL का उपयोग करता है।
अन्य टूल्स भी Stage 0 द्वारा अनुपस्थित होने पर स्वतः-इंस्टॉल किए जाते हैं (मशीन पर उपलब्ध किसी भी पैकेज मैनेजर के माध्यम से - winget/choco/scoop, brew, apt, npm/pip/go - देखें references/tooling-setup.md)। इंस्टॉल की घोषणा की जाती है, no-elevation विधियों को प्राथमिकता दी जाती है, और रन को कभी ब्लॉक नहीं किया जाता: जो कुछ भी इंस्टॉल नहीं हो सकता उसे बस अनुपलब्ध चिह्नित कर दिया जाता है और पाइपलाइन फ़ॉलबैक कर देती है। Stage 0 केवल वही इंस्टॉल करता है जो किसी अनुपस्थित क्षमता समूह को पूरा करता है:
syft · CVEs: grype
(पसंदीदा), trivy, या osv-scanner में से एकwkhtmltopdf या pandoc (PDF/DOCX के लिए); अन्यथा आपको report.html (या एक headless-Chrome PDF) मिलता है।ये सभी वैकल्पिक हैं - यदि कोई भी इंस्टॉल नहीं होता है तो पाइपलाइन सहजता से native search + manifest parsing पर आ जाती है।
राउटर को एक प्राकृतिक-भाषा अनुरोध के साथ आमंत्रित करें:``` /sh-router full security review of ./api /sh-router find SQLi and IDOR in src/ /sh-router just map this codebase # recon only
या सीधे पाइपलाइन को कॉल करें:```
/sh-security-review . classes:sqli,access-control,ssrf depth:deep
/sh-security-review . stage:report # regenerate reports for the latest run
प्रत्येक चरण अपने संज्ञानात्मक भार से मेल खाते मॉडल पर चलता है, इसलिए टोकन वहीं खर्च होते हैं जहाँ खोज की गुणवत्ता वास्तव में उन पर निर्भर करती है और यांत्रिक कार्यों पर बचत होती है। यह डिफ़ॉल्ट है - किसी तर्क की आवश्यकता नहीं।
| चरण | डिफ़ॉल्ट मॉडल |
|---|---|
| recon | sonnet |
| hunt (प्रति वर्ग) | पैटर्न वर्गों के लिए haiku (secrets, crypto, open-redirect, csrf) · source→sink ट्रेसिंग के लिए sonnet (sqli, xss, ssrf, injection, path-traversal, xxe, file-upload, auth) · deep-logic वर्गों के लिए opus (access-control, race-conditions, deserialization) |
| chain | opus |
| verify | opus (सटीकता गेट - मजबूत रखा गया) |
| report | haiku |
models: तर्क के साथ ओवरराइड करें (राउटर के माध्यम से भी पास किया गया):```
/sh-security-review . # default tiered map above
/sh-security-review . models:max # every stage + hunter on opus (max quality, max cost)
/sh-security-review . models:cheap # aggressive downshift (trades some verify precision)
/sh-security-review . models:verify=opus,hunt=sonnet # per-stage overrides
/sh-security-review . models:report=sonnet,hunt.pattern=sonnet # per-hunter-tier override
Stages: `setup, recon, hunt, chain, verify, report`. Models: `opus, sonnet, haiku, inherit`. `hunt` के लिए,
एक bare model सभी hunters को उसी पर flatten कर देता है; `hunt.pattern` / `hunt.trace` / `hunt.logic` एक tier को target करते हैं।
अन्य token savers built in हैं: recon केवल उन classes के लिए hunters spawn करता है जिनमें real attack surface हो, hunters
whole files पढ़ने के बजाय Graft graph query करते हैं, और `findings.json`/SARIF model के बजाय एक
deterministic script द्वारा generate होते हैं।
### Output
सब कुछ `<target>/.security-harness/<run-id>/` के अंतर्गत आता है:
- `recon.md`, `codebase-map.json` - the map (stack, SBOM, CVEs, attack surface).
- `findings.jsonl` → `chains.md` → `verified.jsonl` - the working state (देखें `references/state-files.md`).
- `reports/` - `README.md`, `findings.json`, `results.sarif`, `report.html`, `report.pdf` (+ `report.docx`).
प्रत्येक published finding में एक payload, एक PoC, verification verdict, CWE/OWASP ids, CVSS, और एक
code-level mitigation होता है।
## Pull request review
`sh-pr-review` पूरे codebase के बजाय एक single pull request review करता है, परिणाम को
inline comments के रूप में **PR पर ही** post करता है, और एक `security/pr-review` commit
status set करता है जिसे branch protection enforce कर सकता है।