/appsec:modelfrom appsec
Creates architecture-level threat models with automated component discovery, data flow mapping, STRIDE-per-component analysis, and attack tree generation. Stores models in `.appsec/model/` for incremental updates.
Ships in appsec. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Full architecture-level threat modeling with automated discovery, data flow
mapping, STRIDE-per-component analysis, and attack tree generation. Produces
persistent, incremental threat models stored in .appsec/model/ that evolve
as the codebase changes.
Read ../../shared/schemas/flags.md for the full flag specification.
| Flag | Model Behavior |
|---|---|
--scope | Default full. Threat models benefit from whole-system visibility. Narrow scopes produce partial models with a warning. |
--depth quick | Component inventory and trust boundary identification only. |
--depth standard | Full threat model: components, data flows, STRIDE analysis, mitigations. |
--depth deep | Standard + attack trees, cross-component threat chains, external dependency threats. |
--depth expert | Deep + DREAD scoring, attack simulation narratives, compliance mapping. |
--severity | Filter reported threats by severity in output. |
--format | Default md. Use json for structured model data. |
--diff | Incremental mode: only analyze changes since last model. Compare against .appsec/model/current.json. |
Automatically discover the application architecture by analyzing the codebase:
Identify all significant components:
Identify boundaries where trust levels change:
Generate Mermaid data flow diagrams (DFDs) at two levels:
Generate Mermaid DFDs at two levels: Level 0 (system context -- actors, application, external systems) and Level 1 (component detail with trust boundary subgraphs showing internal services, data stores, and message queues).
Annotate each data flow with:
Apply STRIDE to each component and data flow:
| STRIDE | Question |
|---|---|
| Spoofing | Can an attacker impersonate this component or a user of it? |
| Tampering | Can data in transit or at rest be modified without detection? |
| Repudiation | Can actions be performed without an audit trail? |
| Information Disclosure | Can sensitive data leak from this component? |
| Denial of Service | Can this component be made unavailable? |
| Elevation of Privilege | Can an attacker gain higher access through this component? |
For each component, generate a threat table:
For each component, produce a table with columns: #, STRIDE category, Threat description, Severity, Mitigation, Status (Mitigated/Partial/Gap/Accepted).
At --depth deep and above, generate attack trees for high-value targets:
For each high-value target (e.g., "Exfiltrate User PII"), produce a numbered attack tree with branches for direct access, application-layer attacks, and infrastructure attacks. Each leaf node references severity and mitigation status from the STRIDE analysis.
For each threat identified:
Mitigated: Security control exists and is properly implemented.Partial: Control exists but is incomplete or has known weaknesses.Gap: No mitigation found. This becomes a finding.Accepted: Risk acknowledged and accepted (noted in threat model).When --diff flag is set:
.appsec/model/current.json.Output a changelog showing NEW, CHANGED, and REMOVED components with threat counts for each.
Save the threat model to .appsec/model/:
| File | Contents |
|---|---|
current.json | Full structured model (components, flows, threats, mitigations) |
threat-model.md | Human-readable report with Mermaid diagrams |
dfd-level0.mmd | Level 0 Mermaid DFD source |
dfd-level1.mmd | Level 1 Mermaid DFD source |
attack-trees.md | Attack tree documentation |
history/<timestamp>.json | Snapshot for diffing (incremental mode) |
For each threat with status Gap, emit a finding using ../../shared/schemas/findings.md:
references.stride value.Findings follow ../../shared/schemas/findings.md.
Finding ID prefix: TM (e.g., TM-001).
metadata.tool: "model"metadata.framework: "stride" (or specific framework if used)references.stride: The STRIDE category letter--diff) rather than full rebuilds.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub florianbuetow/claude-code --plugin appsec62 skills in this plugin
/access-controlThis skill should be used when the user asks to "check for access control issues", "analyze authorization", "find IDOR vulnerabilities", "audit CORS configuration", "check for privilege escalation", or mentions "access control", "authorization", "IDOR", "CORS", "JWT tampering", or "directory traversal" in a security context. Maps to OWASP Top 10 2021 A01: Broken Access Control.
/apiThis skill should be used when the user asks to "check API security", "audit REST API", "find BOLA vulnerabilities", "check for mass assignment", "analyze API rate limiting", "detect excessive data exposure", or mentions "API security", "BOLA", "IDOR", "mass assignment", "rate limiting", "broken function-level authorization", "excessive data exposure", or "OWASP API Top 10" in a security context.
/Other plugins' skills for the same job