skills/security/threat-model/SKILL.md
Generate a STRIDE-based threat model from codebase and architecture analysis. Identifies assets, trust boundaries, data flows, threats, and mitigations. Language-agnostic.
npx skillsauth add abhiunix/community-registry threat-modelInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When asked to create a threat model, analyze the codebase and generate a structured threat model using the STRIDE methodology.
Map the system by examining the codebase:
List what an attacker would want:
For each asset, note:
Identify where trust levels change:
For each trust boundary and data flow, analyze threats using STRIDE:
Can an attacker pretend to be someone else?
Can an attacker modify data they shouldn't?
Can an attacker deny their actions?
Can an attacker access data they shouldn't see?
Can an attacker make the system unavailable?
Can an attacker gain higher access than intended?
Rate each threat using:
| Factor | Low (1) | Medium (2) | High (3) | |--------|---------|------------|----------| | Likelihood | Requires internal access + deep knowledge | Requires some skill or access | Exploitable by anyone with basic tools | | Impact | Minor inconvenience | Data loss or partial compromise | Full system compromise or major data breach |
Risk = Likelihood x Impact
## Threat Model: [Application Name]
### 1. System Overview
Brief description of what the system does and its architecture.
### 2. Assets
| Asset | Location | Sensitivity | Current Protection |
|-------|----------|-------------|-------------------|
| User passwords | PostgreSQL users table | Critical | bcrypt hashed |
| ... | ... | ... | ... |
### 3. Trust Boundaries
- [Boundary 1]: Description and what crosses it
- [Boundary 2]: ...
### 4. Threats
#### [T-001] Threat title
- **STRIDE Category:** Spoofing / Tampering / Repudiation / Info Disclosure / DoS / Elevation
- **Trust Boundary:** Where this threat applies
- **Attack Scenario:** How an attacker would exploit this
- **Likelihood:** Low / Medium / High
- **Impact:** Low / Medium / High
- **Risk:** Low / Medium / High / Critical
- **Existing Mitigations:** What's already in place
- **Recommended Mitigations:** What should be added
- **Priority:** Fix now / Next sprint / Backlog
### 5. Data Flow Diagram (Text)
Describe the main data flows in text form:
User → [HTTPS] → Load Balancer → [HTTP] → App Server → [TLS] → Database
### 6. Recommendations Summary
Ordered by priority:
1. Critical: ...
2. High: ...
3. Medium: ...
development
Run a comprehensive security audit against a codebase. Covers OWASP Top 10, secrets exposure, dependency vulnerabilities, misconfigurations, and insecure patterns. Language-agnostic.
development
Security-focused code review for staged changes or specified files. Checks for injection, auth flaws, crypto misuse, data exposure, and insecure patterns. Works with any language.
development
Manage Trello boards, lists, and cards via the Trello REST API.
tools
Manage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database). Use when a user asks OpenClaw to add a task to Things, list inbox/today/upcoming, search tasks, or inspect projects/areas/tags.