threat-modeling
Skill2 starsChanged 3 months agoMITView on GitHub
Structured security design analysis — find what can go wrong before an attacker does. Build a Data Flow Diagram with trust boundaries, apply STRIDE per element, add abuse/misuse cases, and map every threat to a control and a test. Use when the user asks to threat model a feature/system, run STRIDE, map the attack surface, do a security design review, write abuse cases, identify trust boundaries, ask "what could go wrong" / "what are the security risks of this feature", or draw a data flow diagram. Use at design time (before building) and again on any significant change (new data flow, new trust boundary, new third party, new auth path, new PII). A living activity, not a one-time document.
47 other projects use a version of this.
Adopted by
Most recently taken up by
- lengrufeng2008/dsh-skill-librarytheir own version, first seen Nov 15, 2026
- swap-cameroon/kuro-antigravity-configtheir own version, first seen Nov 15, 2026
- kinhluan/skillstheir own version, first seen Nov 8, 2026
- AxlZero21/Skillstheir own version, first seen Nov 8, 2026
- bepaldes/heimdall-agenttheir own version, first seen Nov 8, 2026
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use iac-security, container-security and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hardw00tSkilliac-security
Infrastructure-as-Code security scanning router for Terraform, CloudFormation, Kubernetes manifests, Helm, ARM/Bicep. Orchestrates Checkov, tfsec, Terrascan, KICS, kubesec, kube-linter, Polaris, cfn-lint/cfn-nag, and OPA/Conftest. Use when auditing IaC for misconfigurations, scanning Terraform plans, validating K8s security policies, checking cloud infrastructure compliance, or authoring custom policy-as-code (Rego).
Also in 4 projects that use this
vbrevikSkillcontainer-security
Scan container images, Dockerfiles, docker-compose files, and Kubernetes manifests for security misconfigurations and vulnerabilities. Uses Trivy for image/IaC scanning and Kubescape for K8s policy compliance. Falls back to regex-based Dockerfile and K8s YAML analysis when tools are unavailable. Produces STIG V-ID-tagged findings for /stig-compliance pipeline. Use when (1) reviewing Docker or K8s configuration changes, (2) scanning container images for OS-level CVEs, (3) validating K8s RBAC and NetworkPolicy configuration, (4) before deployment. Works air-gapped with pre-downloaded vulnerability database.
Also in 4 projects that use this
wgpsecSkillprompt-injection
AI/LLM 间接 Prompt 注入攻击。当目标 AI 系统会处理外部数据源(网页、文档、邮件、数据库、API 返回)时使用。覆盖间接注入、工具链劫持、RAG 投毒、数据外泄等技术。OWASP LLM Top 10 #1 漏洞类别
Also in 4 projects that use this
allanninalSkillthreat-hunting
Hunt threats using Sigma detection rules and security analysis techniques. Use when investigating security incidents, creating detection rules, or analyzing suspicious activity.
Also in 3 projects that use this
narlyseorgSkillsecure-code-review
Use when reviewing source code for security vulnerabilities, performing static analysis of a codebase, auditing code for injection flaws, authentication issues, cryptographic weaknesses, insecure deserialization, SSRF, path traversal, memory safety bugs, hardcoded secrets, or misconfigurations. Use when the user asks to find security bugs in code, assess code quality from a security perspective, or review pull requests for security implications. Use when performing dependency audits, secrets scanning, or configuration review of application source.
Also in 3 projects that use this
jx1100370217Skillsecurity-hardening
Harden OpenClaw security configuration. Use when: (1) Setting up security for new OpenClaw installation, (2) Configuring exec approvals and allowlists, (3) Securing gateway access, (4) Setting up tool policies, (5) User asks about OpenClaw security or hardening.
Also in 3 projects that use this
Other versions47 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 47
- briiirussell/cybersecurity-skills★ 489same name
- fr33d3m0n/skill-threat-modeling★ 347same name
- proflead/codex-skills-library★ 153same name
- hardw00t/ai-security-arsenal★ 101same name
- nahid-sparktales/agent-dispatcher★ 59same name
- mn-youssef/security-skills★ 47same name
- nimadorostkar/Claude-Skills-collection★ 37same name
- kumaran-is/claude-code-onboarding★ 35same name
- ulises-jeremias/agent-toolkit★ 20same name
- Indium-AI-Labs/indium-agentkit★ 18same name
37 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- api-designSkill
- building-frontend-uiSkill
- debugging-agent-runsSkill
- developing-featuresSkill
- developing-features-tddSkill
- documenting-featuresSkill
- ensuring-cross-platformSkill
- evaluating-ai-outputSkill
- exploratory-testingSkill
- fixing-bugsSkill
- playwright-cliSkill
- reviewing-codeSkill
- running-agent-loopsSkill
- security-reviewSkill
- validating-in-realitySkill
- writing-prdSkill
- writing-pull-requestsSkill
- writing-testsSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 42 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
If learnings/ holds only its README, proceed with the defaults below.
- Distinctive: line 41
STRIDE-per-element: not every category applies to every element type — processes face all six.
- Distinctive: line 53
Map threat → control: every mitigated threat names a concrete control (input validation, authz check, encryption in transit, rate limit, …
- Distinctive: line 54
Map control → test: every control names a test or abuse-case that would fail if the control regressed.
“Common” is measured: kept by at least 6 in 10 of the 42 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Threat Modeling
Threat modeling is structured anticipation: you reason about how a system can be attacked while it is still cheap to change — at design time, on paper or in a diagram, before the code exists. The output is not a document; it is a set of mitigations wired to tests and a habit of asking "what could go wrong?" continuously.
This skill runs on Shostack's Four Question Framework (Adam Shostack, Threat Modeling: Designing for Security): What are we working on? What can go wrong? What are we going to do about it? Did we do a good job? Everything else — STRIDE, DFDs, risk ranking — serves those four questions.
Read first (always)
List learnings/ and read every file relevant to the current system (the domain, the trust boundaries, the third parties, the compliance regime). Project-specific assets, known attacker personas, accepted risks, and "in this system X is out of scope because Y" decisions live there and override the defaults in this SKILL.md. If a learning conflicts with this file, the learning wins — mention it to the user.
If learnings/ holds only its README, proceed with the defaults below.
Why this matters
Most vulnerabilities are design flaws, not coding bugs — a missing trust boundary, an unverified assumption, an authorization check that lives on the client. Code review and tests catch implementation defects; they rarely catch "we never decided who is allowed to do this." Threat modeling is the only activity that surfaces the flaw before the architecture sets. The Threat Modeling Manifesto frames it as a culture: a team that continuously finds and fixes, values a journey over a one-time artifact, and treats the model as living.
The Four Question Framework (the workflow)
1. What are we working on?
Define scope and assets, then draw the system.
- Assets: what is worth protecting? Data (PII, credentials, payment data, secrets), capabilities (admin actions, money movement), and reputation/availability. If nothing is worth stealing or breaking, you have no threat model.
- Diagram: build a Data Flow Diagram (DFD) — external entities, processes, data stores, data flows — and draw trust boundaries where privilege or control changes (network edge, process boundary, third-party call, user↔server). The boundaries are where the threats concentrate.
- Altitude: scope the system at the right zoom — one feature or service, not the whole company. Too big and you boil the ocean; too small and you miss the boundary crossing that matters.
→ Full method, element types, boundary rules, and a worked example: references/dfd-and-scope.md.
→ verify: you can name the assets, every data flow crosses a labeled boundary or stays inside one, and the diagram fits on one screen.
2. What can go wrong?
Walk the diagram and apply STRIDE per element along each data flow and every boundary crossing.
- STRIDE maps each threat to the security property it violates: Spoofing↔authentication, Tampering↔integrity, Repudiation↔non-repudiation, Information disclosure↔confidentiality, Denial of service↔availability, Elevation of privilege↔authorization (Microsoft STRIDE).
- STRIDE-per-element: not every category applies to every element type — processes face all six; data stores rarely "spoof." Use the element-type table so you ask the right questions and don't waste effort.
- Abuse / misuse cases: flip each user story into an attacker's goal ("as an attacker, I want to…"). Add attacker personas to keep the analysis grounded in who would actually try.
→ STRIDE definitions, per-element applicability, example threats and mitigations: references/stride.md.
→ Abuse cases, attacker personas, and other lenses (LINDDUN for privacy): references/methodologies-and-risk.md.
→ verify: every element and every boundary crossing has been questioned against its applicable STRIDE categories; threats are written as concrete scenarios, not category names.
3. What are we going to do about it?
For each threat, decide a response and bind it to something verifiable.
- Response (pick one): mitigate (add a control), eliminate (remove the feature/flow), transfer (push to a provider/insurer), or accept (document who accepted it and why). Accepting is a valid answer — silently ignoring is not.
- Map threat → control: every mitigated threat names a concrete control (input validation, authz check, encryption in transit, rate limit, audit log, signed token…).
- Map control → test: every control names a test or abuse-case that would fail if the control regressed. A control with no test will rot.
- Track the rest: unresolved threats become work items with an owner and a risk rank. Prioritize by risk = likelihood × impact (see
references/methodologies-and-risk.mdfor ranking options and the criticism of DREAD).
→ verify: no threat is left in "what can go wrong" without a response; every "mitigate" has a control and a test reference; accepted risks name an accepter.
4. Did we do a good job?
Review coverage and treat the model as living.
- Coverage: did you cover every element, every boundary, every applicable STRIDE category? Did the highest-risk threats get the strongest controls?
- Continuity: threat modeling is not done once. Redo it on significant change — a new data flow, a new trust boundary, a new third party, a new auth path, new categories of data (especially PII). Keep each pass lightweight.
- Feedback: did findings actually become controls and tests in the codebase? A model that never changes the code did nothing.
→ verify: the model is dated, the diff from last time is clear, and follow-through (controls + tests landed) is confirmed — not just promised.
Anti-patterns (these defeat the purpose)
- Boiling the ocean. Modeling the entire system at maximum detail. You will never finish and you will model things that don't matter. Scope tight, model the risky boundary.
- One-time-only with no follow-through. A threat model produced once, filed, and never revisited — and whose threats never became controls or tests. The Manifesto's core warning: value the journey, not the artifact.
- Modeling without a DFD or assets. "Brainstorming threats" with no diagram and no asset list produces a random list, not coverage. You can't reason about boundary crossings you never drew.
- Threats with no controls or tests. A long "what can go wrong" list and an empty "what are we going to do about it." The list is theater unless each item maps to a mitigation and a test.
- Wrong altitude. Modeling at the level of individual functions (too low) or the whole company (too high). Model a feature/service.
Capture a learning
After completing a threat model, ask: did I encounter an asset, attacker persona, trust boundary, accepted-risk decision, compliance constraint, or recurring threat pattern not already in this SKILL.md or references/? If yes, append a learnings/YYYY-MM-DD-slug.md (protocol in learnings/README.md). If no, skip — don't log the model you just produced.
See also
references/stride.md— STRIDE category definitions, the security property each violates, STRIDE-per-element applicability, and example threats with example mitigations.references/dfd-and-scope.md— how to build a Data Flow Diagram (four element types + trust boundaries), how to scope assets and altitude, with a worked mini-example.references/methodologies-and-risk.md— when to reach for PASTA, Attack Trees, LINDDUN (privacy), VAST, OCTAVE; risk ranking (likelihood × impact, DREAD and its criticism, CVSS); abuse cases and attacker personas.developing-featuresskill — security implementation depth once threats are known; see itsreferences/security.mdfor the controls (validation, authz, secrets, encryption) you map threats to.reviewing-codeskill — the security checks that verify, at PR time, that the controls this model specified actually shipped.api-designskill — API security (authn/authz, input validation, rate limiting) for threats found on API trust boundaries.learnings/— project-specific assets, attacker personas, accepted risks, and recurring threat patterns.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

