/threat-modeling:stride-analysisfrom threat-modeling
Conducts STRIDE threat modeling to systematically identify and document security threats across six categories. Useful during system design, architecture reviews, and security design reviews.
Ships in threat-modeling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Conduct a systematic threat analysis of a system's architecture using Microsoft's STRIDE framework to identify vulnerabilities before they're exploited.
You are a security architect helping a team identify threats in their system design. STRIDE is a structured approach that ensures comprehensive coverage across six threat categories. Unlike ad-hoc "security brainstorming," STRIDE forces you to ask the right questions for each component and data flow, ensuring threats aren't missed.
Done well, threat modeling catches design flaws early (when they're cheap to fix). Done poorly (checklist-style, without understanding), it generates noise and wastes engineering time.
Before starting STRIDE analysis, gather:
If documentation is missing, start by drawing the architecture with the team.
Create or review a Data Flow Diagram (DFD) showing:
Example:
[User] --HTTPS--> [Web App] --SQL--> [Database]
|
[API Log]
|
[SIEM/Alert]
Trust boundary: Outside | Web App Layer | Database Layer
For each process, data store, or data flow, systematically ask:
Spoofing (Identity) questions:
Tampering (Integrity) questions:
Repudiation (Accountability) questions:
Information Disclosure (Confidentiality) questions:
Denial of Service (Availability) questions:
Elevation of Privilege (Authorization) questions:
For each threat, document:
Severity = Likelihood × Impact
| Likelihood | Impact | Severity |
|---|---|---|
| High (>50%) | Critical (customer data, downtime) | CRITICAL |
| High | High (service disruption, data loss) | HIGH |
| Medium (10-50%) | Critical | HIGH |
| Medium | High | MEDIUM |
| Low (<10%) | Critical | MEDIUM |
| Low | High | LOW |
| Low | Medium (minor disruption) | LOW |
Match each threat to:
Prioritize mitigations by:
A STRIDE Threat Model document:
# STRIDE Threat Model: [System Name]
## System Overview
[Brief architecture description, DFD, trust boundaries]
## Threat Analysis
| ID | Category | Component | Threat | Severity | Existing Controls | Mitigation | Status |
|----|----------|-----------|--------|----------|-------------------|-----------|--------|
| T1 | Spoofing | API Auth | Attacker replays valid JWT | High | JWT signed, TTL 1hr | Rate limit auth failures | Open |
| T2 | Tampering | DB Connection | MITM modifies SQL queries | Critical | No TLS | Enforce TLS 1.2+ | Open |
| T3 | Information Disclosure | Logs | Sensitive data logged | High | No log encryption | Redact PII in logs | Open |
## Critical Findings Summary
- [List critical/high threats needing immediate attention]
## Mitigations Roadmap
- [Phase 1]: [Mitigations for critical threats]
- [Phase 2]: [Mitigations for high threats]
## Accepted Risks
- [Threats accepted with business justification and timeline to mitigate]
STRIDE Threat Model: Freelancer Project Sharing Feature
Users share project links (one-click, read-only) with clients. Shared link grants read-only access to project files via a public URL (no authentication required).
[Client] --HTTP(S)--> [Web App] --[Token Lookup]--> [Database]
|
[File Storage]
Trust Boundary: Unauthenticated | Web App | Private Systems
| ID | Category | Component | Threat | Severity | Existing Controls | Mitigation | Status |
|---|---|---|---|---|---|---|---|
| T1 | Spoofing | Shared Link | Attacker guesses valid token | Medium | Tokens 32 bytes entropy, URL-safe | Use cryptographic PRNG (not Math.random) | Open |
| T2 | Information Disclosure | Shared Link | Token leaked in browser history, referrer header | High | HTTPS only, no query params | Put token in POST body or use signed URLs | Open |
| T3 | Tampering | Shared Link | Attacker modifies token to access other projects | High | Cryptographically signed tokens | Use authenticated encryption (HMAC-SHA256) | Open |
| T4 | Denial of Service | Shared Link | Attacker floods requests to exhaust capacity | Medium | CloudFront caching | Rate limit by IP; implement CAPTCHA | Open |
| T5 | Information Disclosure | File Storage | Project files stored unencrypted | Critical | Files at rest unencrypted | Encrypt files at rest (AES-256) | Open |
| T6 | Elevation of Privilege | Shared Link | Attacker modifies token to grant edit access | Critical | Read-only token checks API | Enforce read-only at every API call (not just auth) | Open |
| T7 | Repudiation | Audit Log | Attacker accesses project without audit trail | High | No audit logging | Log all shared link accesses (who, when, what files) | Open |
Critical Findings:
Mitigations Roadmap:
When analyzing threats and facing ambiguity:
Description: "Spoofing threat" for every component; no specific attack scenario.
Guard: Every threat must answer: "Attacker does X to [component] to achieve Y." If you can't fill in X and Y, it's not a threat; it's a buzzword.
Description: Threat model assumes all insiders are trusted; focuses only on external attackers.
Guard: Ask "What could a disgruntled employee do?" Insider threats are real and often have high impact.
Description: "Use encryption" without specifying where, how, or what algorithm.
Guard: Mitigations must be specific. "Encrypt PII at rest using AES-256 with key rotation every 90 days" is actionable.
Description: STRIDE done once; never updated when architecture changes.
Guard: Threat model is living document. Update when adding features, changing platforms, or after security incidents.
Description: Over-inflating severity to make everything seem urgent.
Guard: If everything is critical, nothing is. Severity must differentiate; justify why each threat has its rating.
Before sharing the threat model:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sethdford/claude-skills --plugin security-threat-modeling9 skills in this plugin
/abuse-case-designDesign abuse cases (negative use cases) showing how attackers misuse system features. Use when identifying attacks that exploit intended functionality or business logic flaws./asset-inventoryCreate a comprehensive inventory of assets (data, systems, infrastructure, people) and their criticality, value, and dependencies. Use when prioritizing threats and allocating security resources./attack-tree-modelingBuild hierarchical attack trees showing how attackers decompose goals into sub-goals and exploits. Use when analyzing attack paths, prioritizing security investments, or assessing attacker effort and cost./data-flow-diagram-securityCreate and analyze DFDs (Data Flow Diagrams) with security focus, identifying data flows across trust boundaries, storage, and processing points. Use when modeling system architecture for threat analysis./risk-scoringQuantify risk using likelihood and impact, apply severity ratings, and prioritize mitigations. Use when prioritizing threats, allocating security budget, and communicating risk to leadership./threat-identificationSystematically identify threats from threat libraries, historical CVEs, and attacker tactics. Use when augmenting STRIDE analysis with known threats from MITRE ATT&CK, CWE, or your industry.Other plugins' skills for the same job