TARAflow
Developers / 07

Risk Engine

Likelihood method per regulation preset, impact aggregation, the safety override, mitigation status and the two sync passes that fill the risk register.

01

Risk Model

  • The regulation preset (shared/models/regulation-preset.ts, derived from the tags by regulationPresetFromTags) sets LikelihoodMethod = weighted-mean (Standard: skill level, motive, opportunity, ease of exploit) | iso-21434 | etsi-tvra (score tables) | en-50742-a (AP = EL × WoO + AC → Table B.5 band → SRSL), the likelihood factors and the ImpactAggregation (harm-floor | max | weighted-mean)
  • The matrix combines the axes numerically (likelihood value × impact value → threshold band), never by a shared label index — likelihood, impact and risk output can carry different vocabularies
  • Impact: the asset's impact ratings per criterion (or a per-goal override), the same criterion set for every risk, aggregated per preset
  • Safety Override (deriveAggregatedImpact): irreversible major or fatal → CRITICAL (direct) / HIGH+ (indirect); irreversible minor → HIGH+ / HIGH; reversible → HIGH / MED+
  • syncRisksFromThreats and syncRisksFromAttackTrees are independent passes; the latter alone owns the attack-tree likelihood factor, which reconcileFactorRatings() leaves alone
02

Risk Treatment

  • MitigationStatus: open | in_progress | in_review | implemented | verified | rejected — mirrors the linked ticket's state in both directions
  • ImplementationProgress of a risk is derived from its mitigations (deriveImplementationProgress): not_started … partial … verified
  • RiskTreatment: eliminate | reduce | accept | transfer | share — shown with the ISO names Avoid / Reduce / Share / Retain in ISO/SAE 21434 projects
  • MoSCoW must | should | could | wont; Won't risks have their own table, a missing justification is flagged
  • Before/after: calculatedRiskBeforeMitigation and calculatedRiskAfterMitigation on the risk