MCPInstall

security-threat-model

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 (auth, payments, file uploads, APIs), preparing for audits or compliance (PCI, HIPAA, SOC 2), investigating incidents, or integrating third-party services. Use when user mentions threat model, STRIDE, trust boundaries, attack surface, or security review.

Installs
107
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/lyndonkl/claude --skill security-threat-model
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads security-threat-model automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

  • Threat: Attacker impersonates legitimate user or system
  • Examples: Stolen credentials, session hijacking, caller ID spoofing, email spoofing
  • Mitigations: Multi-factor authentication, certificate validation, cryptographic signatures, mutual TLS

T - Tampering with Data

  • Threat: Unauthorized modification of data in transit or at rest
  • Examples: Man-in-the-middle attacks, SQL injection, file modification, message replay
  • Mitigations: HTTPS/TLS, input validation, parameterized queries, digital signatures, checksums, immutable storage

R - Repudiation

  • Threat: User denies performing action, no proof of activity
  • Examples: Deleted logs, unsigned transactions, missing audit trails
  • Mitigations: Comprehensive audit logging, digital signatures on transactions, tamper-proof logs, third-party timestamping

I - Information Disclosure

  • Threat: Exposure of sensitive information to unauthorized parties
  • Examples: Database dumps, verbose error messages, unencrypted backups, API over-fetching
  • Mitigations: Encryption at rest/in transit, access control, data minimization, secure deletion, redaction in logs

D - Denial of Service

  • Threat: System becomes unavailable or degraded
  • Examples: Resource exhaustion, distributed attacks, algorithmic complexity exploits, storage filling
  • Mitigations: Rate limiting, auto-scaling, circuit breakers, input size limits, CDN/DDoS protection

E - Elevation of Privilege

  • Threat: Attacker gains unauthorized access or permissions
  • Examples: SQL injection to admin, IDOR to other user data, path traversal, privilege escalation bugs
  • Mitigations: Principle of least privilege, input validation, authorization checks on every request, role-based access control

Trust Boundary Mapping

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

Common boundaries:

  • User → Application: Untrusted input enters system (validate, sanitize, rate limit)
  • Application → Database: Application credentials vs. user permissions (parameterized queries, connection pooling)
  • Internal → External Service: Data leaves your control (encryption, audit logging, contract terms)
  • Public → Private Network: Internet to internal systems (firewall, VPN, API gateway)
  • Client-side → Server-side: JavaScript to backend (never trust client, re-validate server-side)
  • Privileged → Unprivileged Code: Admin functions vs. user code (isolation, separate processes, security boundaries)

Boundary analysis questions:

  • What data crosses this boundary? (classify sensitivity)
  • Who/what is on each side? (authentication, authorization)
  • What could go wrong at this crossing? (apply STRIDE)
  • What controls protect this boundary? (authentication, encryption, validation, rate limiting)

Common Patterns

Pattern 1: Web Application with Database

  • Boundaries: User ↔ Web Server ↔ Database
  • Critical threats: SQLi (Tampering), XSS (Spoofing), CSRF (Spoofing), session hijacking (Spoofing), IDOR (Elevation of Privilege)
  • Key mitigations: Parameterized queries, CSP headers, CSRF tokens, HttpOnly/Secure cookies, authorization checks

Pattern 2: API with Third-Party OAuth

  • Boundaries: User ↔ Frontend ↔ API Server ↔ OAuth Provider ↔ Third-Party API
  • Critical threats: Token theft (Spoofing), scope creep (Elevation of Privilege), authorization code interception, redirect URI manipulation
  • Key mitigations: PKCE for public clients, state parameter validation, token rotation, minimal scopes, HTTPS only

Pattern 3: Microservices Architecture

  • Boundaries: API Gateway ↔ Service A ↔ Service B ↔ Message Queue ↔ Database
  • Critical threats: Service impersonation (Spoofing), lateral movement (Elevation of Privilege), message tampering (Tampering), service enumeration (Information Disclosure)
  • Key mitigations: mTLS between services, service mesh, API authentication per service, network policies, least privilege IAM

Pattern 4: File Upload Service

  • Boundaries: User ↔ Upload Handler ↔ Virus Scanner ↔ Object Storage
  • Critical threats: Malware upload (Tampering), path traversal (Information Disclosure), file overwrite (Tampering), storage exhaustion (DoS)
  • Key mitigations: File type validation (magic bytes not extension), size limits, virus scanning, unique file naming, separate storage domain

Pattern 5: Mobile App with Backend API

  • Boundaries: Mobile App ↔ API Gateway ↔ Backend Services
  • Critical threats: API key extraction (Information Disclosure), certificate pinning bypass (Tampering), local data theft (Information Disclosure), reverse engineering
  • Key mitigations: Certificate pinning, ProGuard/R8 obfuscation, biometric auth, local encryption (Keychain/Keystore), root/jailbreak detection

Guardrails

Assume breach mindset:

  • Don't ask "can attacker get in?" but "when attacker gets in, what damage can they do?"
  • Defense in depth: Multiple overlapping controls, no single point of failure
  • Least privilege: Minimal permissions by default, explicit grants only

Prioritize realistically:

  • Focus on high-value assets (customer data, credentials, financial data) first
  • Address compliance-critical threats (PCI, HIPAA) before nice-to-haves
  • Balance security cost vs. risk (don't over-engineer low-risk systems)

Avoid security theater:

  • Security theater: Controls that feel secure but don't meaningfully reduce risk (e.g., password complexity without rate limiting = still vulnerable to credential stuffing)
  • Effective security: Address actual threat vectors with measurable risk reduction

Document assumptions:

  • "Assumes database is not publicly accessible" (validate with network config)
  • "Assumes TLS 1.2+ enforced" (verify in load balancer settings)
  • "Assumes environment variables protected" (confirm secrets management)

Update threat model:

  • Threat models decay (new features, new attack techniques, infrastructure changes)
  • Review quarterly or when architecture changes significantly
  • Incorporate lessons from incidents and security research

Quick Reference

Resources:

  • Quick threat model: resources/template.md
  • Advanced techniques: resources/methodology.md (attack trees, DREAD scoring, abuse cases)
  • Quality rubric: resources/evaluators/rubric_security_threat_model.json

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

FAQ

What does the security-threat-model skill do?

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 (auth, payments, file uploads, APIs), preparing for audits or compliance (PCI, HIPAA, SOC 2), investigating incidents, or integrating third-party services. Use when user mentions threat model, STRIDE, trust boundaries, attack surface, or security review.

How do I install security-threat-model?

Run npx skills add https://github.com/lyndonkl/claude --skill security-threat-model in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/security-threat-model/ (personal) or .claude/skills/security-threat-model/ (project).

Which AI agents can use security-threat-model?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is security-threat-model safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains security-threat-model?

It is published by lyndonkl in lyndonkl/claude. It has 107 recorded installs.

More from lyndonkl/claude

View all →

evaluation-rubrics

lyndonkl/claude

Designs structured scoring tools with explicit criteria, performance scales, and descriptors for consistent, transparent quality assessment. Use when need quality criteria and scoring scales to evaluate work consistently, compare alternatives objectively, set acceptance thresholds, reduce subjective bias, or when user mentions rubric, scoring criteria, quality standards, evaluation framework, inter-rater reliability, or grading/assessing work.

Develops business strategies grounded in rigorous competitive and market analysis using proven frameworks (Good Strategy kernel, Porter's 5 Forces, SWOT, Blue Ocean, Playing to Win, Value Chain Analysis, BCG Matrix). Use when developing strategy (market entry, product launch, expansion, M&A, turnaround), conducting competitive analysis, making strategic decisions (build vs buy, pricing, positioning), planning strategic initiatives, or when user mentions strategy, competitive analysis, Porter's 5 Forces, SWOT, market positioning, or strategic frameworks.

Business & Finance491 installs

Guides systematic multi-pass review and editing of scientific manuscripts (research articles, reviews, perspectives) to improve clarity, structure, scientific rigor, and reader comprehension. Use when reviewing or editing research manuscripts, journal articles, or perspectives, when user mentions manuscript, paper draft, article, research writing, journal submission, reviewer feedback, or needs to improve scientific writing.

Creates evidence-based learning plans that maximize long-term retention through spaced repetition, retrieval practice, interleaving, and elaboration. Guides through goal definition, material breakdown, review scheduling, and progress tracking. Use when long-term knowledge retention is needed, studying for exams or certifications, learning new job skills or technology, mastering substantial material, combating forgetting, or when user mentions studying, memorizing, learning plans, spaced repetition, flashcards, active recall, or durable learning.

Guides learners to discover knowledge through strategic Socratic questioning and progressive scaffolding removal. Combines question ladders, misconception detectors, Feynman explanations, and worked-example fading to build durable understanding. Use when teaching complex concepts, correcting misconceptions, onboarding team members, mentoring problem-solving, or designing self-paced learning. Use when user mentions "teach me", "help me understand", "explain like I'm", "learning path", "guided discovery", or "Socratic method".

Guides creation and review of competitive grant proposals (NIH R01/R21/K, NSF, foundations) by applying reviewer-perspective thinking to ensure clear hypotheses, compelling significance, genuine innovation, and feasible approaches. Use when writing or reviewing grant proposals, crafting specific aims, drafting significance/innovation/approach sections, or when user mentions R01, R21, K-series, grant writing, proposal review, study section, or fundable hypothesis.

Popular security skills

View category →

azure-compliance

microsoft/azure-skills

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

OfficialSecurity567K installs

minimal-run-and-audit

lllllllama/rigorpilot-skills

Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.

Security477.4K installs

seo-audit

coreyhaines31/marketingskills

When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.

Security238.7K installs

firebase-security-rules-auditor

firebase/agent-skills

Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.

OfficialSecurity139.1K installs

audit

pbakaus/impeccable

Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.

Security81.9K installs

competitors

coreyhaines31/marketingskills

When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.

Security79.3K installs