Developers / 06
Attack Tree
The attack tree is a third threat generator, alongside per-element and per-interaction STRIDE. It emits ThreatReferences, not a parallel risk type — there is one risk register, regardless of which generator produced the threat.
01
Core model
- One attack path (ROOT → leaf; under an AND gate one combination of its legs) is one threat scenario.
StrideMethodgains a third value,"attack-path", alongside"per-element"/"per-interaction"— audit everyswitchon it for exhaustiveness - Anchor determines behavior, independent of ISO/Standard mode:
threat-anchored trees refine an existing STRIDE threat's feasibility (emit no new threat);asset-anchored trees emit a genuinely new threat for attacks STRIDE has no element to hang on (supply chain, physical access, social engineering);standalonetrees are Cl. 8.5 vulnerability analysis only, feeding nothing downstream - Only asset-anchored trees emit threats at all (3.1.33 — a threat scenario is by definition the compromise of a property of an asset); threat-anchored and standalone trees never create a
Riskrow on their own - Fixed tab order as a consequence of the data flow, not an ergonomic choice:
DFD → Assets → Threats → Attack Tree → Risks— the tree refines Threats and informs Risks, in both methods, regardless of project criticality (the old "Critical System" slider that drove ordering is removed)
02
Path identity
- Content-derived, not index-based:
pathKey= 64-bit FNV-1a over the chain of node names, 12 hex chars (shared/utils/fnv1a.ts— byte-identical in renderer and CLI, synchronous, no crypto API); a combination under an AND gate hashes the gate and its legs (computeCombinedPathKey);threatId = buildThreatId(treeId, pathKey, stride)="AT-${treeId}-${pathKey}-${stride}"— an unrelated DSL edit (reordering, comments, re-rating) must never reassign an analyst's confirm/rate/ticket-link decisions to the wrong path - Renaming a node is a new scenario by design — its identity is meant to change
- Sync policy mirrors the existing DFD↔Threat pattern: Class A (silent) for a new path → new
unratedthreat; Class B (banner) when a path backing an already-confirmed threat disappears or changes identity — never silently drop an assessment - Parser-generated node ids are likewise stable/content-derived, not timestamp-based, so every keystroke doesn't rewrite unrelated parts of the persisted project file
03
Feasibility & the dual likelihood model
LikelihoodModel = "feasibility-only" | "feasibility-x-motivation"— project-wide; ISO/SAE 21434 projects usefeasibility-only. In ISO 21434 mode, feasibility alone is the likelihood axis (3.1.29); attacker motivation/benefit is deliberately excluded from the number (unattributable, and a license to argue a risk away) but is still parsed and used for path plausibility, ordering, and CRA "reasonably foreseeable misuse" reasoning. In IEC 62443/classic mode, benefit counts toward likelihood alongside feasibilityFeasibilityMethod = "quick" | "attack-potential" | "cvss" | "attack-vector"— onlyquickandattack-potentialare implemented, the others are declared — recorded project-wide onAttackTreeProjectConfiguration.feasibilityConfigurationand printed in the report — a mixed-method TARA isn't comparable and is an audit finding- ISO mode's validator enforces an implemented, audit-grade RC-15-11 method (today: attack-potential per Annex G.2 — elapsed time, expertise, knowledge, window of opportunity, equipment); the quick
f,b,i/p,iDSL forms are rejected as syntax errors in ISO mode, not warnings — narrowing is keyed off the project'sFeasibilityConfigurationand only fires on explicit opt-in, so an unconfigured project (and the bundled templates) default to Standard and are never rejected - Gate aggregation follows the quantity, not a config switch, and is deliberately not user-configurable: attack potential (effort) sums under AND, takes the minimum under OR; probability multiplies under AND, unions under OR; a bare ordinal level (no number behind it) takes the bottleneck (min/max) — applying min() to attack potential would claim two weeks of work plus two weeks equals two weeks, which is a math error, not a conservative default. Banding to a
FeasibilityLevelhappens once, at the end, on the raw aggregated quantity — never band-then-aggregate - Mixing methods under one gate (an attack-potential child next to a quick-mode child) is a calculator error, not a silently invented number
04
Impact — shared with STRIDE
- Impact is anchored to (Asset × Security Goal), identically in both likelihood modes — a confidentiality loss and an availability loss on the same asset can carry different impact, matching ISO 21434 3.1.22/3.1.24's damage-scenario definition and IEC 62443's consequence analysis
- The tree contributes likelihood only; a leaf's impact never enters the risk — impact belongs to the (asset × goal) damage scenario, not to a tree node, or the one shared impact would fork per leaf
- Impact aggregates by category via MAX across contributing criteria, never averaged — one severe criterion (e.g. safety) can't be diluted into a mild-looking mean
05
Sync into the Risk register
- The tree's likelihood contribution is written by a dedicated
syncRisksFromAttackTreespass, chained aftersyncRisksFromThreats— not routed through the threat sync, whosereconcileFactorRatingsrebuilds factors from enabledactiveFactorsand would discard it;source: "attack-tree"factor ratings are explicitly exempted from that rebuild - Asset-anchored trees emit risk contribution per path; threat-anchored trees aggregate into the referenced threat's existing risk (MAX over paths) — optionally, the other paths that reach the anchor's STRIDE category are split off as threats of their own; risk-anchored and standalone trees feed no likelihood; an unrated path contributes nothing
- Both anchors and both likelihood modes feed risk — treatment (accept/mitigate/won't-fix) lives entirely in the Risk tab, the tree stays a before-mitigation instrument
- Emission is fully manual: every rated path is a candidate the analyst confirms, dismisses, or leaves uncertain directly in the assessment dialog — there is no automatic "cheapest path per goal" pre-selection
06
Where mitigations live
- Attack Tree owns where a mitigation bites — which node, which paths it eliminates, what becomes the next-cheapest path; the Risk tab only mirrors this read-only
- Risks owns whether the risk is accepted — treatment, MoSCoW, residual sign-off, ticket, verification; the tree mirrors
MitigationStatus/ticketIdread-only viaextractMitigationReferences - "Risk after mitigation" = feasibility of the cheapest path counting only mitigations marked
implemented/verified— computed by the tree, displayed by the Risk tab