Threat modeling
Skill timwukp/agent-skills-best-practice/skills/skills/threat-modeling
35 portable agent skills (Agent Skills spec) for Kiro & Claude Code: Scrum DevSecOps roles, PCI-DSS/MAS TRM compliance, AWS Well-Architected reviews — each with evals and a 4-layer tested methodology
npx -y skills add timwukp/agent-skills-best-practice --skill threat-modelingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Performs STRIDE threat modeling for features, APIs, and architecture changes, producing a threat model document with risk-rated threats, mitigations, and security stories ready for the backlog. Use during sprint planning or design review. Triggers on: "threat model", "STRIDE", "security risks of this feature", "what could go wrong with this design", "security review of architecture".
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.5 KB, as published. Nobody here has run it
Threat Modeling (STRIDE)
Produce a lightweight, sprint-compatible threat model: 15-30 minutes of structured analysis, not a multi-week security assessment. The output is a threat model document plus security stories the team can schedule.
Process
- Establish the data flow. Ask for (or derive from the code/design) the feature's data flow: actors, entry points, services, data stores, and trust boundaries. Summarize it as
Actor → Component → ... → Store, marking each trust boundary crossing with||. If the user has architecture docs or code, read them instead of asking. - Walk the STRIDE categories against each trust boundary crossing (see table below). For each plausible threat, capture: description, category, likelihood (H/M/L), impact (H/M/L), and a concrete mitigation. Skip categories that genuinely don't apply — do not pad the table.
- Rate risk as High if likelihood or impact is High and the other is at least Medium; Low only if both are Low; otherwise Medium.
- Generate security stories for every High and Medium threat using the story format below (or hand off to the security-story-writing skill if it is available). Low threats go to the residual risk list with a one-line acceptance rationale.
- Deliver the document using the template, and tell the user which stories should enter the next sprint.
STRIDE Categories
| Category | Question to ask | Typical mitigations |
|---|---|---|
| Spoofing | Can someone pretend to be a user, service, or device? | Strong authentication, mTLS, signed tokens |
| Tampering | Can data be modified in transit or at rest? | TLS, integrity checks, signed payloads, immutable logs |
| Repudiation | Can an actor deny performing an action? | Audit logging with identity + timestamp, log integrity |
| Information disclosure | Can data leak to the wrong party? | Encryption, least-privilege access, output filtering, masking |
| Denial of service | Can the component be made unavailable? | Rate limiting, quotas, timeouts, autoscaling, circuit breakers |
| Elevation of privilege | Can a user gain rights they shouldn't have? | AuthZ checks at every boundary, input validation, sandboxing |
Threat Model Template
# Threat Model: [Feature Name]
**Date:** [YYYY-MM-DD] · **Sprint/Milestone:** [if applicable] · **Participants:** [names/roles]
## Feature Description
[2-3 sentences: what it does and what data it touches]
## Data Flow
[User → Frontend || API Gateway → Service → Database]
(|| marks trust boundary crossings)
## STRIDE Analysis
| # | Threat | Category | Likelihood | Impact | Risk | Mitigation |
|---|--------|----------|-----------|--------|------|------------|
| 1 | [description] | [S/T/R/I/D/E] | H/M/L | H/M/L | H/M/L | [concrete control] |
## Security Stories Generated
- [ ] [Story title] — [priority] — [estimate if known]
## Residual Risks (accepted)
- [Low-risk threat] — [one-line justification for accepting]
Security Story Format
**As** [the system/security role], **I want** [security control], **so that** [risk is mitigated].
**Threat:** [STRIDE category + threat #] · **Source:** threat model [feature name]
**Acceptance:** Given [precondition], when [attack vector attempted], then [system prevents/detects/alerts].
Guidelines
- Anchor every threat to a specific element of the data flow — "hackers could attack the API" is not a threat; "an unauthenticated caller can enumerate user IDs via GET /users/{id} (Information disclosure)" is.
- Prefer mitigations that already exist in the team's stack (their gateway, their IdP) over introducing new components.
- If the feature touches payment card data, personal data, or runs in a regulated industry, recommend a compliance pass (e.g. the fsi-compliance-checker skill for financial services) in addition to the threat model.
- For a brand-new system rather than a feature, model the 2-3 most critical flows first rather than attempting full coverage in one session.