threat-modeling

Use when implementing auth, file uploads, payments, or external APIs. Applies STRIDE framework systematically. Triggers: "authentication", "file upload", "payment", "multi-tenant", "external API". If thinking "I know security" - use this anyway.

⭐11stars🔀4forks📁View on GitHub🕐Updated Dec 22, 2025⬇️1downloads

When & Why to Use This Skill

This Claude skill automates the threat modeling process using the industry-standard STRIDE framework. It helps developers and architects systematically identify, score, and mitigate security vulnerabilities in critical features such as authentication, payment processing, and multi-tenant architectures before they reach production.

Use Cases

  • Securing Authentication Systems: Identifying risks like credential stuffing, session hijacking, and token leakage during the design of login and password reset workflows.
  • Hardening File Upload Features: Preventing malicious file execution, path traversal, and DoS attacks by analyzing server filesystem entry points.
  • Multi-tenant API Protection: Ensuring robust data isolation and preventing cross-tenant information disclosure or unauthorized privilege escalation.
  • Payment and External API Integration: Evaluating third-party integrations for tampering and repudiation risks to ensure transaction integrity and data privacy.
  • Pre-release Security Audits: Conducting a rapid, structured risk assessment to replace ad-hoc brainstorming and reduce the cost of fixing security bugs post-deployment.
namethreat-modeling
descriptionUse when implementing auth, file uploads, payments, or external APIs. Applies STRIDE framework systematically. Triggers: "authentication", "file upload", "payment", "multi-tenant", "external API". If thinking "I know security" - use this anyway.

Threat Modeling

MANDATORY FIRST STEP

TodoWrite: Create 18+ items (6 STRIDE categories × 3 items each)

  • Define assets/entry points
  • Enumerate threats per STRIDE category
  • Risk scoring
  • Identify controls
  • Document threat model
  • Verification checkpoint

Quick-Start Templates

Authentication Feature

Assets: User credentials, session tokens, reset tokens Entry points: Login, signup, password reset endpoints

STRIDE Focus:

Threat Check
Spoofing Credential stuffing protection? Rate limiting?
Tampering Token manipulation? Secure cookies?
Repudiation Login attempt logging?
Info Disclosure Token leakage? Error messages reveal info?
DoS Rate limiting? Account lockout?
EoP Session hijacking? Privilege escalation?

File Upload Feature

Assets: Stored files, file metadata, server filesystem Entry points: Upload endpoint, file retrieval

STRIDE Focus:

Threat Check
Spoofing Impersonate uploader?
Tampering Malicious files? Path traversal?
Repudiation Upload logging?
Info Disclosure Access others' files?
DoS Large file attacks?
EoP Execute uploaded code?

Multi-Tenant API

Assets: Tenant data, API endpoints, configurations Entry points: All endpoints with tenant context

STRIDE Focus:

Threat Check
Info Disclosure Cross-tenant data leakage?
EoP Access other tenant's data?
Tampering Modify tenant_id in requests?
Spoofing Impersonate other tenant?

STRIDE Process

Apply each category systematically (S→T→R→I→D→E):

  1. Spoofing: Can attacker impersonate?
  2. Tampering: Can attacker modify data/code?
  3. Repudiation: Can attacker deny actions?
  4. Information Disclosure: Can attacker access secrets?
  5. Denial of Service: Can attacker disrupt?
  6. Elevation of Privilege: Can attacker gain unauthorized access?

Risk Scoring: Likelihood (1-5) × Impact (1-5)

  • 15-25: Critical (address immediately)
  • 6-14: High (before release)
  • 1-5: Low (track)

Verification Checkpoint

Before marking complete, verify 3 specifics:

  1. ✅ Each STRIDE category has ≥2 concrete threats identified
  2. ✅ All high-risk (score ≥6) threats have controls documented
  3. ✅ Threat model includes data flow diagram with trust boundaries

Response Templates

"This is over-engineering for a simple feature"

Security bugs cost 30x more post-release than during design. STRIDE takes 15-30 minutes and prevents deployment blockers. Which STRIDE categories don't apply to this feature?


Red Flags

Thought Reality
"Ad-hoc brainstorming is faster" Misses 60% of threats
"Everything is critical" No risk prioritization = wrong fixes
"We'll security review later" 30x more expensive post-implementation