Examples¶
Threat Model Spec includes complete examples demonstrating real-world threat modeling scenarios.
Available Examples¶
| Example | Description | Diagram Types |
|---|---|---|
| OpenClaw | WebSocket localhost takeover | DFD, Attack Chain, Sequence |
OpenClaw Case Study¶
The OpenClaw example demonstrates a critical vulnerability in a popular AI agent application:
- Vulnerability: WebSocket localhost takeover
- Severity: Critical (CVSS 9.3)
- Discovered by: Oasis Security
- Impact: Full agent compromise, data exfiltration
What You'll Learn¶
- Creating Data Flow Diagrams (DFD) with trust boundaries
- Building attack chains with MITRE ATT&CK mapping
- Documenting attack sequences
- Mapping to multiple security frameworks (STRIDE, OWASP, CWE)
- Generating D2 diagrams and STIX 2.1 exports
Quick Start¶
# Navigate to the example
cd examples/openclaw
# Generate attack chain diagram
tms generate attack_chain.json -o attack_chain.d2 --svg
# Export to STIX 2.1
tms generate attack_chain.json --stix -o attack_chain.stix.json
Creating Your Own Examples¶
Follow this pattern for new threat models:
- Define the threat model in JSON
- Generate diagrams with
tms generate - Validate with
tms validate --strict - Export to STIX for threat intelligence sharing