threat-model

Builds a living STRIDE threat model from DFD analysis with risk-ranked mitigations.

3|Updated Oct 28, 2020
One-click install
npx skills add https://github.com/k0d3x8its/dotfiles --skill threat-model-k0d3x8its
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: threat-model
Source: https://github.com/k0d3x8its/dotfiles/tree/main/claude/.claude/skills/threat-model
Command: npx skills add https://github.com/k0d3x8its/dotfiles --skill threat-model-k0d3x8its

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security code reviews find exploitable bugs in existing code, but they cannot answer design-level questions like what an attacker could do to your system architecture, which data flows cross trust boundaries, or which threats deserve mitigation first. This Skill produces a top-down STRIDE threat model that captures deployment topology, actors, and business data value that code alone cannot reveal. ## Core Features & Use Cases - Living threat model document: Builds and maintains docs/threat-model.md via a DFD element table, STRIDE-per-element analysis, a likelihood-by-impact risk grid, and a mitigation map where every threat is VERIFIED-in-code, filed as a [SECURITY] TODO, ACCEPTED, ELIMINATED, or TRANSFERRED. - Update mode: Re-verifies claimed mitigations against current code using ast-grep patterns tiered by risk rank, and re-STRIDEs only changed DFD elements instead of rebuilding from scratch. - Design-review mode: Runs the model against a planning document before code exists, surfacing attack-surface gaps, auth assumptions, and a top-3 mini threat model with a 100/75/50 confidence rubric. - Use Case: Before launching a new HTTP service that stores customer PII, run the skill to enumerate entry points, map trust boundaries, rank threats like spoofing and information disclosure, and file tagged TODOs for every unmitigated High-risk finding. ## Quick Start Ask the AI to threat model this system and build a STRIDE analysis of the current repository.

Frequently Asked Questions about threat-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a STRIDE threat model for my application?▼

Run the threat-model skill against your repository to build a DFD element table, apply STRIDE per element using the Shostack applicability chart, and rank threats on a likelihood-by-impact grid. The output is a living model at docs/threat-model.md with a mitigation map for every threat.

What is the difference between threat modeling and a security code review?▼

Threat modeling is top-down design analysis of what an attacker could do to the system, using facts code cannot show like deployment topology and data business value. Code review is bottom-up, finding exploitable bugs in code that exists today.

Can I threat model a system before any code exists?▼

Yes, design-review mode runs the model against a planning document instead of code. It surfaces attack-surface inventory gaps, auth assumptions, data exposure, and a top-3 mini threat model, with findings scored on a 100/75/50 confidence rubric.

How does threat model update mode re-verify mitigations?▼

Update mode locates each recorded ast-grep pattern at a depth tiered by risk rank: High threats get a full entry-to-guard-to-sink re-trace, Medium gets pattern location plus a function read, and Low gets an existence check. It re-STRIDEs only changed DFD elements.

When should I not run a threat model automatically?▼

Threat modeling is a deliberate-trigger analysis and should never auto-run per sweep. Use it for pre-launch reviews, new-system design reviews, or explicit requests, while broad hygiene sweeps and reachability filtering are handled by sibling skills.