Who fills what
Three sources populate the model, and it's worth knowing which is which:
- Auto-detected by
wyrm initβ the structure (components, trust zones, and β where the source allows β dataflows and control mitigations). - You annotate β the context infra can't encode: which data is sensitive, what
talks to what, how access is provisioned. Via annotations
(
.threatmodel/data.yamlor inline comments) or by editing the model. - Computed by
wyrm analyzeβ the findings. These are derived from everything above and the rule catalogue; they are not stored in the file, so they're never stale.
The seven objects
| Object | What it is | References | Filled by |
|---|---|---|---|
project | Name/owner of the system being modeled | β | init |
trustZones | Security boundaries, each with a trustRating 0β100 (internetβ10, privateβ80) | β | init (network/zone resources) |
components | Services, datastores, gateways, identities β the nodes | parent.trustZone β a zone Β· assets β assets | init |
assets | The data worth protecting, with CIA ratings 0β100 | referenced by components & dataflows | you (sensitivity isn't in infra) |
dataflows | Traffic between components β the edges. Tags like tls mark encryption | source/destination β components Β· assets β assets | init (compose/k8s) Β· you (Terraform, via flows:) |
mitigations | Controls that reduce risk (WAF, auth, encryption). Link one with appliesTo (element ids) + riskReduction 0β100 and analyze down-ranks matching findings β 100 resolves them. addresses scopes it to specific rules so a WAF can't mute an encryption finding | appliesTo β components/dataflows | init (detected WAF/Armor, untargeted) Β· you (link + rate) |
threats | Manually-declared threats. Findings are NOT here β analyze computes those | β | rarely used; usually [] |
So an empty assets: [] / dataflows: [] on a fresh Terraform
baseline is expected β Terraform describes resources, not sensitivity or traffic. That's the
annotation step. And threats: [] stays empty on
purpose: your threats live in wyrm analyze, computed fresh every run.
How they connect
flowchart LR
P["project"] --- Z["trustZones"]
Z -->|contains| C["components"]
C -->|source / destination| D["dataflows"]
A["assets"] -.->|processed / stored by| C
A -.->|carried on| D
M["mitigations"] -.->|reduce risk on| D
T["threats = computed by analyze,\nnot stored in the file"]
classDef you stroke:#ffd24d,stroke-width:2px;
class A,D you
classDef derived stroke:#5db0ff,stroke-dasharray:4;
class T derived
Amber = the bits you supply (assets, and β for Terraform β dataflows). Blue = derived, never written to the file.
How a finding happens
A rule reads the graph: e.g. a dataflow whose source and
destination live in different trustZones, carrying an asset
with high confidentiality, with no tls tag β WYRM-T001. Every
input to that sentence is an object above. Miss the asset (sensitivity) or the dataflow (traffic)
and the rule can't fire β which is why the annotation step matters, and why a bare Terraform
inventory reports nothing until you add context.