A live text-to-diagram editor for threat modelling. Paste a data-flow model in plain text on the left; get a rendered trust-boundary diagram and multi-framework analysis on the right - STRIDE, LINDDUN, CIA, DREAD risk scoring, an auto-scaffolded attack tree, a Cyber Kill Chain view, and control mapping - all from the same source. Export the diagram as PNG and the threat tables as Markdown/CSV. No build step, no dependencies, nothing leaves the browser.
It speaks the same threatmodel DSL as the threat-modelling
skill, so a model you draft with the skill
renders here unchanged.
- Locally (source): open
threat-studio/index.htmlin any modern browser (double-click, orxdg-open threat-studio/index.html). - Use the included
claudeskill to generate new diagrams from your codebase.
The source lives in threat-studio/
threat-studio/
├── index.html # markup
├── styles.css # styles (light/dark tokens)
├── app.js # parser, renderer, STRIDE analysis, PNG export
├── build.py # inlines the three into ../threat-studio.html
└── CLAUDE.md # working notes for Claude Code (build rule, architecture)
threat-studio.html # generated bundle - do not edit by hand
.claude/skills/threat-modelling/
├── SKILL.md # skill workflow (Four Questions + STRIDE)
├── references/
│ ├── diagram-syntax.md # threatmodel DSL + common mistakes
│ └── stride-per-element.md # STRIDE definitions + mitigations
└── templates/
├── threat-model-template.md # report structure (EN)
└── threat-model-template.nl.md # report structure (NL)
- Pick a starting point from the Example dropdown, or type your own.
- Edit the model source - the diagram, validation status, and Analysis tab update live. Invalid lines are flagged in the gutter and listed under the editor.
- Switch to the Analysis tab and pick one or more frameworks from the chip bar (combine as many as you like): STRIDE, LINDDUN, CIA, DREAD, attack tree, kill chain, control mapping. Each renders from the same DFD.
- Click PNG to export the current diagram (2× resolution, current theme), or -Markdown / -CSV on the Analysis tab to export the threat tables.
- The Docs tab documents the full syntax and every lens.
threatmodel "Title" # header (alias: stride); title optional
external: User # external entity (rectangle) - id optional
process 1.1: Web Server # process (circle)
datastore D1: User DB # data store (open store) - R* if log/audit/journal
User -> 1.1 : "HTTPS Request" # directed flow (label required)
1.1 <-> D1 : Read/Write # bidirectional flow
boundary "Internet" { User } # trust boundary (renders left-to-right)
boundary "DMZ" { 1.1 }
Flows that cross a trust boundary are drawn in red and flagged as priority.
- every flow needs a label
- no store→store or external→external flows
- every flow endpoint must be declared
- an element belongs to at most one boundary
- no duplicate ids
The Analysis tab carries a framework picker - toggle any combination; each
lens renders from the same threatmodel DFD (the DSL is unchanged). Adding a
lens is one entry in the FRAMEWORKS registry in app.js - the pluggable seam.
| Lens | Kind | What it shows |
|---|---|---|
| STRIDE | per-element matrix | Security threats per element (default). |
| LINDDUN | per-element matrix | Privacy threats - Linkability, Identifiability, Non-repudiation, Detectability, Disclosure, Unawareness, Non-compliance. Unawareness maps to the data subject; the rest to processes/stores/flows. |
| CIA | per-element matrix | Confidentiality / Integrity / Availability per data-handling asset. |
| DREAD | interactive scoring | Editable Damage/Reproducibility/Exploitability/Affected-users/Discoverability (each 1–3), pre-filled from a heuristic, ranked by total risk. Session-only; resets on Example change. |
| Attack tree | auto-scaffold | Attacker-goal tree built from high-value assets + boundary-crossing flows - a starting point to refine. |
| Kill chain | phase view | DFD elements mapped to Cyber Kill Chain phases (illustrative). |
| Controls | reference tables | Each category → OWASP ASVS chapters + MITRE ATT&CK techniques; LINDDUN → privacy controls (GDPR/ISO 27701). Indicative. |
Export: on the Analysis tab, -Markdown and -CSV export the active lenses' threat tables (the Markdown feeds the companion skill's report). The PNG button still exports the diagram.
threat-studio/- editable source (index.html,styles.css,app.js) plusbuild.py..claude/skills/threat-modelling/- the companion Claude skill that produces full timestamped threat-model reports (EN/NL) using the same DSL.

