Systematically identify and document threats using the STRIDE framework (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege). Use when designing systems, reviewing architectures, conducting security design reviews, or updating threat models.
From threat-modelingnpx claudepluginhub sethdford/claude-skills --plugin security-threat-modelingThis skill is limited to using the following tools:
examples/example-output.mdtemplate.mdEnables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
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: