Security Threat Modeling
Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations to produce actionable AppSec-grade threat models.
Best use case
Security Threat Modeling is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations to produce actionable AppSec-grade threat models.
Teams using Security Threat Modeling should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/security-threat-model/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Security Threat Modeling Compares
| Feature / Agent | Security Threat Modeling | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations to produce actionable AppSec-grade threat models.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Security Threat Modeling Deliver an actionable AppSec-grade threat model specific to the repository, not a generic checklist. Anchor every architectural claim to evidence in the repo and keep assumptions explicit. Prioritize realistic attacker goals and concrete impacts. ## Workflow ### 1. Scope and Extract the System Model - Identify primary components, data stores, and external integrations from the repo - Identify how the system runs (server, CLI, library, worker) and its entrypoints - Separate runtime behavior from CI/build/dev tooling and from tests/examples - Map in-scope locations and exclude out-of-scope items explicitly - Do not claim components, flows, or controls without evidence ### 2. Derive Boundaries, Assets, and Entry Points - Enumerate trust boundaries as concrete edges between components - Note protocol, auth, encryption, validation, and rate limiting at each boundary - List assets that drive risk: data, credentials, models, config, compute resources, audit logs - Identify entry points: endpoints, upload surfaces, parsers, job triggers, admin tooling ### 3. Calibrate Attacker Capabilities - Describe realistic attacker capabilities based on exposure and intended usage - List assets that drive risk: credentials, PII, integrity-critical state, availability - Explicitly note non-capabilities to avoid inflated severity ### 4. Enumerate Threats as Abuse Paths - Map attacker goals to assets and boundaries - Focus on: exfiltration, privilege escalation, integrity compromise, denial of service - Classify each threat and tie it to impacted assets - Keep the number of threats small but high quality ### 5. Prioritize with Explicit Reasoning - Use qualitative likelihood and impact (low/medium/high) with short justifications - Set overall priority (critical/high/medium/low) using likelihood x impact - State which assumptions most influence the ranking ### 6. Validate with the User - Summarize key assumptions that affect threat ranking or scope - Ask 1-3 targeted questions to resolve missing context - Pause and wait for user feedback before producing the final report ### 7. Recommend Mitigations - Distinguish existing mitigations (with evidence) from recommended mitigations - Tie mitigations to concrete locations and control types - Prefer specific implementation hints over generic advice ### 8. Quality Check - Confirm all entrypoints are covered - Confirm each trust boundary is represented in threats - Confirm runtime vs CI/dev separation - Write the final Markdown to `<repo-name>-threat-model.md` ## Risk Prioritization Guidance - **High:** Pre-auth RCE, auth bypass, cross-tenant access, sensitive data exfiltration, key/token theft, sandbox escape - **Medium:** Targeted DoS, partial data exposure, rate-limit bypass, log poisoning - **Low:** Low-sensitivity info leaks, noisy DoS with easy mitigation, unlikely preconditions
Related Skills
OWASP ZAP Security Scanner
Automated web application security scanning using OWASP ZAP for finding XSS, SQL injection, CSRF, and other OWASP Top 10 vulnerabilities.
Security Ownership Map
Analyze git repositories to build security ownership topology, compute bus factor for sensitive code, detect orphaned security-critical files, and export ownership graphs for visualization.
Security Best Practices Review
Perform language and framework specific security best-practice reviews, vulnerability detection, and secure-by-default coding guidance for Python, JavaScript/TypeScript, and Go applications.
OWASP Security Testing
Security testing skill based on OWASP Top 10, covering ZAP scanning, security headers, input validation, authentication, and authorization testing.
OAuth2 Security Testing
Security testing for OAuth2 implementations including authorization code flow, PKCE, token handling, redirect URI validation, and scope enforcement.
LLM Security Testing
Security testing for LLM-powered applications including prompt injection, jailbreak detection, data leakage prevention, and AI safety testing.
JWT Security Testing
Comprehensive JWT token security testing including signature verification, expiration checks, algorithm confusion attacks, and claim validation.
CSP Security Testing
Content Security Policy testing and validation to prevent XSS attacks, data injection, and clickjacking through proper CSP header configuration.
CORS Security Testing
Testing Cross-Origin Resource Sharing configurations for misconfigurations, overly permissive policies, and credential handling vulnerabilities.
CodeQL Security Analysis
Advanced security analysis using GitHub CodeQL to find zero-day vulnerabilities, injection flaws, and security anti-patterns in source code.
BurpSuite Security Testing
Web application security testing using BurpSuite for proxy-based interception, scanning, and manual penetration testing of web applications.
API Security Testing
Comprehensive API security testing based on OWASP API Security Top 10 including broken authentication, injection attacks, rate limiting, BOLA/BFLA vulnerabilities, and automated security scanning with ZAP and custom scripts.