threat-model
यह क्या करती है
यह स्किल थ्रेट मॉडल बनाती है, जो यह नक्शा है कि किसी सिस्टम पर हमला किन तरीकों से हो सकता है। यह ऐप मालिक के साथ बातचीत, कोड और उसकी पिछली बग के आधार पर काम करती है। यह समीक्षा की योजना बनाने वाली सुरक्षा टीमों के लिए है।
कब इस्तेमाल करें
- ✓जब आप बग खोजने से पहले जानना चाहते हैं कि ऐप के साथ क्या गलत हो सकता है।
- ✓जब ऐप मालिक सिस्टम और उसके जोखिमों के बारे में सवालों के जवाब दे सकता है।
- ✓जब कोई मालिक नहीं है और आप कोड व पिछली कमज़ोरियों के आधार पर थ्रेट मॉडल चाहते हैं।
Skill का लिंक
https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/threat-model/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे ऐप के लिए थ्रेट मॉडल बना सकते हैं, जो हमारे कोड और मेरे दिए जवाबों पर आधारित हो?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट ऐप मालिक से सवालों के एक सेट के साथ बातचीत कर सकता है, या कोड और पिछली कमज़ोरी रिपोर्ट पढ़ सकता है। फिर वह प्रोजेक्ट के लिए एक थ्रेट मॉडल फ़ाइल लिखता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
threat-model
A threat model answers "what could go wrong with this system, who would do it, and what should we do about it?" independently of whether any specific bug has been found yet. It is the map; vulnerability discovery is the metal detector. A good threat model tells the pipeline where to look and tells triage which findings matter.
Litmus test: If patching one line of code makes an entry disappear, it was
a vulnerability, not a threat. A threat ("attacker achieves RCE via untrusted
media parsing") still stands after every known bug is fixed; a vulnerability
("dr_wav.h:412 doesn't bounds-check chunk_size") does not. This skill
produces threats. Vulnerabilities appear only as evidence that raises a
threat's likelihood score.
Invocation: /threat-model [bootstrap-then-interview|bootstrap|interview] <target-dir> [flags]
Step 0 — Safety preamble (always runs first)
This skill performs static analysis only. It reads source, git history,
and any vulnerability reports the user supplies, and writes a single output
file (<target-dir>/THREAT_MODEL.md). It does not build, execute, fuzz, or
modify the target, and does not make network requests against the target's
infrastructure.
Before proceeding, confirm and state in your first response:
- The target directory exists and is a local checkout you can read.
- You will not execute any code from the target directory.
- If
--vulnspoints at a URL or you are asked to "fetch CVEs", you will query only public advisory databases (NVD, GitHub Security Advisories, the project's own issue tracker) and never the target's live deployment.
If the user asks you to validate a threat by running an exploit, decline and
point them at the vuln-pipeline (README Step 2) instead.
Step 1 — Route to a mode
Parse $ARGUMENTS:
| First token | Route to |
|---|---|
interview |
Read interview.md in this directory and follow it. |
bootstrap |
Read bootstrap.md in this directory and follow it. |
bootstrap-then-interview |
Bootstrap first, then interview seeded from the draft. See below. |
| anything else, or empty | Ask the user: "Is someone who owns or built this system available to answer questions in this session?" Yes and the codebase is checked out → recommend bootstrap-then-interview. Yes but no codebase → interview.md. No → bootstrap.md. |
All modes write the same artifact (THREAT_MODEL.md, schema in schema.md)
so downstream consumers (pipeline recon/judge, verifier agents) do not need
to know which mode produced it.
interview |
bootstrap |
|
|---|---|---|
| Needs | An application owner present in the session | A local checkout; optionally past vulns |
| Method | Four-question framework: conversational walk through what are we working on → what can go wrong → what are we going to do about it → did we do a good job | Five stages: parallel research swarm → synthesize sections 1-3 + vuln table → generalize vulns into threat classes → STRIDE gap-fill → emit |
| Best for | New systems, design reviews, systems where the risk lives in business logic the code doesn't show | Inherited systems, third-party code, OSS dependencies, anything with a CVE history |
| Provenance tag | interview |
bootstrap |
Context durability. Interview mode is multi-turn; tool results from early reads may be evicted before you need them. To stay resilient:
- Do not read
interview.mdorbootstrap.mdin full up front. Read the mode file (or the relevant section of it) at the point you need it, one question or stage at a time. - If a re-read via the Read tool is refused as "file unchanged", the prior
result was evicted; reload with
cat <path>via Bash instead.
Interview backbone (so you can proceed even if interview.md is
unavailable mid-session):
| Q | Question | Fills schema sections |
|---|---|---|
| Q1 | What are we working on? | section 1 context, section 2 assets, section 3 entry points |
| Q2 | What can go wrong? | section 4 threat rows (id, threat, actor, surface, asset) |
| Q3 | What are we going to do about it? | section 4 impact/likelihood/status/controls; section 5 deprioritized; section 8 recommended mitigations |
| Q4 | Did we do a good job? | validate ranking, coverage check, section 6 open questions |
bootstrap-then-interview mode
When the owner is available and the codebase is checked out, this is the recommended path: the owner's time goe
अक्सर पूछे जाने वाले सवाल
थ्रेट मॉडल क्या है?
यह उन तरीकों की सूची है जिनसे कोई हमलावर सिस्टम को नुकसान पहुंचा सकता है, साथ में हर तरीके की संभावना और उससे निपटने के उपाय।
क्या यह ऐप की जाँच करता है?
नहीं। स्किल केवल कोड पढ़ती है और रिपोर्ट लिखती है, ऐप को न चलाती है और न बदलती है।
नतीजा कहां सहेजा जाता है?
यह लक्ष्य प्रोजेक्ट फ़ोल्डर में एक threat model markdown फ़ाइल लिखता है।
जानकारी
लेखक का मूल विवरण
Build a threat model for a target codebase. Three modes: "interview" walks an application owner through the four-question framework and produces a threat model from their answers; "bootstrap" derives a threat model from the code plus past vulnerabilities (CVEs, git history, pentest reports) when no owner is available; "bootstrap-then-interview" chains the two when both owner and codebase are present. All write THREAT_MODEL.md in a shared schema. Use when asked to "threat model", "build a threat model", "map the attack surface", or "what should we be worried about in this codebase".
लोकप्रियता
- GitHub स्टार
- 7.7k
- रैंकिंग में स्थान
- #13105
- लाइसेंस
- —
- अपडेट की गई
- 6/8/2026
कमेंट
- …
इस repository की और skills
customize
7.7kयह आपके एजेंट को AI से सुरक्षा कमज़ोरी खोजने वाली पाइपलाइन को नए बग प्रकार, भाषा या लक्ष्य के लिए ढालने में मदद करती है, खास हिस्से दोबारा लिखकर।
dnr-hunt
7.7kयह आपके एजेंट को बिना किसी अलर्ट के वेब लॉग में हमले के संकेत खोजने और मिली घटनाओं का लिखित विवरण बनाने में मदद करती है।
dnr-respond
7.7kयह आपके एजेंट को एक सुरक्षा अलर्ट या संकेत की जाँच करने में मदद करती है कि हमला सफल हुआ या नहीं और वह कितनी दूर तक पहुंचा।
patch
7.7kयह आपके एजेंट को जाँचे गए सुरक्षा निष्कर्षों के लिए कोड सुधार के ड्राफ़्ट बनाने में मदद करती है, जिन्हें समीक्षा के लिए diff के रूप में सहेजा जाता है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।