threat-model
하는 일
이 스킬은 위협 모델을 만듭니다. 위협 모델은 시스템이 공격받을 수 있는 방법들을 정리한 지도입니다. 앱 소유자와의 인터뷰, 코드와 과거 버그, 또는 둘 다를 바탕으로 작업합니다. 보안 검토를 계획하는 보안 팀을 위한 스킬입니다.
사용하는 경우
- ✓버그를 찾기 전에 앱에 무엇이 잘못될 수 있는지 알고 싶을 때.
- ✓앱 소유자가 시스템과 위험에 대해 답할 수 있을 때.
- ✓소유자가 없고, 코드와 과거 취약점을 바탕으로 한 위협 모델이 필요할 때.
스킬 링크
https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/threat-model/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 코드와 내가 답하는 질문을 바탕으로 내 앱의 위협 모델을 만들어 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 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
자주 묻는 질문
위협 모델이란 무엇인가요?
공격자가 시스템에 해를 끼칠 수 있는 방법의 목록이며, 각 방법이 얼마나 가능성 있는지와 대응 방안이 함께 적혀 있습니다.
앱을 테스트하나요?
아니요. 이 스킬은 코드와 보고서만 읽으며, 앱을 실행하거나 바꾸지 않습니다.
결과는 어디에 저장되나요?
대상 프로젝트 폴더에 위협 모델 마크다운 파일을 작성합니다.
상세 정보
작성자의 원본 설명
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
- 라이선스
- —
- 업데이트
- 2026. 8. 6.
댓글
- …
이 저장소의 다른 스킬
customize
7.7k에이전트가 AI 취약점 탐지 파이프라인에서 대상에 특화된 부분만 새 버그 유형, 언어, 대상에 맞게 고치도록 돕습니다.
dnr-hunt
7.7k에이전트가 경보 없이 웹 로그에서 공격의 흔적을 찾고, 발견한 사건을 정리하도록 돕습니다.
dnr-respond
7.7k에이전트가 보안 경보나 침해 지표 하나를 검토해 공격이 성공했는지, 어디까지 퍼졌는지 확인하도록 돕습니다.
patch
7.7k에이전트가 검증된 보안 발견 사항의 코드 수정안을 diff 파일로 작성해, 사람이 검토할 수 있게 돕습니다.