Security threat model

From lyndonkl/claude · View interactive version

Security threat model is an AI agent skill from the GitHub repository lyndonkl/claude. Systematically identifies vulnerabilities, threats, and mitigations for systems handling sensitive data using STRIDE methodology, trust boundary mapping, and defense-in-depth principles. Use when designing or reviewing systems with PII/PHI/financial/auth data, building security-sensitive features (a

How to use this skill

Skill file

Security Threat Model

Table of Contents

  1. Workflow
  2. STRIDE Framework
  3. Trust Boundary Mapping
  4. Common Patterns
  5. Guardrails
  6. Quick Reference

Workflow

Copy this checklist and track your progress:

Security Threat Model Progress:
- [ ] Step 1: Map system architecture and data flows
- [ ] Step 2: Identify trust boundaries
- [ ] Step 3: Classify data and compliance requirements
- [ ] Step 4: Apply STRIDE to identify threats
- [ ] Step 5: Define mitigations, monitoring, and prioritize risks

Step 1: Map system architecture and data flows

Document components, external services, users, data stores, and communication paths. See Common Patterns for architecture examples. For straightforward systems → Use resources/template.md.

Step 2: Identify trust boundaries

Mark where data crosses security domains (user → server, server → database, internal → third-party). See Trust Boundary Mapping for boundary types.

Step 3: Classify data and compliance requirements

Rate data sensitivity (public, internal, confidential, restricted), identify PII/PHI/PCI, document compliance obligations (GDPR, HIPAA, PCI DSS). See resources/template.md for classification tables.

Step 4: Apply STRIDE to identify threats

For each trust boundary and data flow, systematically check all six STRIDE threat categories. See STRIDE Framework for threat identification. For complex systems with multiple attack surfaces → Study resources/methodology.md for advanced attack tree analysis and DREAD scoring.

Step 5: Define mitigations, monitoring, and prioritize risks

Propose preventive/detective/corrective controls, establish monitoring and alerting, prioritize by risk score (likelihood × impact). Self-check using resources/evaluators/rubric_security_threat_model.json. Minimum standard: Average score ≥ 3.5.

STRIDE Framework

S - Spoofing Identity

T - Tampering with Data

R - Repudiation

I - Information Disclosure

D - Denial of Service

E - Elevation of Privilege

Trust Boundary Mapping

Trust boundary: Where data crosses security domains with different trust levels.

Common boundaries:

Boundary analysis questions:

Common Patterns

Pattern 1: Web Application with Database

Pattern 2: API with Third-Party OAuth

Pattern 3: Microservices Architecture

Pattern 4: File Upload Service

Pattern 5: Mobile App with Backend API

Guardrails

Assume breach mindset:

Prioritize realistically:

Avoid security theater:

Document assumptions:

Update threat model:

Quick Reference

Resources:

5-Step Process: Map Architecture → Identify Boundaries → Classify Data → Apply STRIDE → Mitigate & Monitor

STRIDE: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege

Trust Boundaries: User→App, App→DB, Internal→External, Public→Private, Client→Server, Privileged→Unprivileged

Mitigation Types: Preventive (block attacks), Detective (identify attacks), Corrective (respond to attacks)

Prioritization: High-value assets first, compliance-critical threats, realistic risk vs. cost balance

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.