QuickRisk is a quantitative cyber-risk assessment tool designed to express cyber exposure in financial terms. Rather than reducing risk to a single qualitative rating, it uses probabilistic modelling to estimate potential loss ranges and illustrate how different assumptions affect the result. The objective is to provide a more useful basis for discussing cyber risk, investment priorities and risk appetite with business and executive stakeholders.
Rapid, probabilistic estimation of financial cyber-risk exposure across five common scenarios, using a model inspired by FAIR and an optional deterministic real-time SOC overlay.
Published at: https://quickrisk.iliadis.net/ · Designed and built by Dr. John ILIADIS (iliadis.net)
The problem, in one sentence: security is still argued to the board in colour-coded ratings that cannot be set against the money being requested, so "how exposed are we?" and "is this spend worth it?" end up answered with opinion instead of with a number.
▶ Watch the few-seconds demo — https://www.youtube.com/watch?v=4uHBT-c80IM
What this solves, and for whom
| Role | What QuickRisk gives them |
|---|---|
| Executive, board, CFO | An indicative annual exposure and a "bad year (1 in 10)" figure per scenario, in euros, that can be set against budget, insurance cover and a stated risk appetite — not an ordinal rating |
| CISO / risk manager | A transparent, reproducible chain from two answers per scenario to a distribution, so the number can be defended, challenged and re-run rather than asserted |
| Security team | A sensitivity analysis per result, so the conversation moves to the assumption that actually moves the number |
| Risk committee / audit | Versioned model and calibration identifiers on every result, zero retention of assessment content, and deterministic test vectors in the test suite |
QuickRisk is a rapid screening and discussion instrument. It is not an audit, a certification, an assurance opinion, or a substitute for a full FAIR analysis.
Everything described here is implemented in this repository and pinned by tests. The
authoritative technical record is docs/MODEL_DOCUMENTATION_FAIR-QK-2.0.md; runtime calibration
metadata lives in fairquickmodel/parameters.json (server-only), and the fitted posterior package
lives in fairquickmodel/inference/ with source, assumption, validation and integrity records.
| Input | Question | Role in the model |
|---|---|---|
| QP1 | Organisation size | Economic scale, and the fallback prior for the loss anchor |
| QP2 | Critical-service dependency | Primary-loss modifier |
| QP3 | Internet-facing exposure | Frequency modifier for S1, S2, S3 and S5 |
| QP4 | Sensitive-information exposure | Secondary-loss frequency modifier, all scenarios |
| QP5 | Third-party dependency | Frequency and secondary-loss modifier, S4 only |
| QP6 | Recovery capability | Primary-loss modifier |
| QP7 | Control maturity | Susceptibility — applied once |
| QP8 | Daily disruption cost | Operational downtime-cost anchor (optional, and the most influential input) |
| QP9 | Employee count | Selects the reference class (the published evidence is reported by employee count). Required; UNKNOWN widens the distribution instead of guessing a class |
| QP10 | Response and recovery cost | Direct response/recovery component of primary loss per material event (optional) |
| QP11 | Secondary consequence cost | Direct stakeholder-consequence magnitude when secondary loss occurs (optional) |
| SQA — per scenario | How likely the scenario is to be attempted or contacted in a typical 12 months, answered as one of five likelihood words, before considering controls | Threat event frequency (TEF) |
| SQB — per scenario | Effective full-disruption-equivalent downtime if it succeeds | Downtime-duration multiplier for the operational-loss component |
The five scenarios are fixed: S1 ransomware / destructive extortion, S2 identity, phishing or social-engineering compromise, S3 exploitation of a public-facing vulnerability, S4 third-party / supplier compromise, S5 DDoS or externally driven service disruption. They are a practical rapid-assessment set chosen from current public threat evidence, not a mathematical ranking of the five most frequent cyber risks.
Any answer may be Unknown. In the active posterior engine an Unknown scenario answer keeps the
scenario's reference rate as its centre and widens its dispersion in log space, using a form that
preserves the expected multiplier: the range reflects the missing answer without a favourable shift
or an adverse extreme, and the input-confidence score is lower. The normalisation is anchored to an
answer-free reference allocation, so the neutral shares sum to one and the reference identity
attackRate × exposure holds on every draw when every factor is neutral. It does not make an
arbitrary answer set total-preserving: an answer changes its own numerator while the reference
denominator remains fixed, so the portfolio total moves without redistributing loss across other
scenarios (measured: a single Unknown
likelihood answer changes the per-draw total factor by up to 0.51 in the medium class, while the
aggregate ratio over 2,000 particles stays within 0.3% of 1). The legacy fallback instead models an
Unknown answer as a mixture of the available answers and caps the added width so it cannot inflate
the mean (mean-shift cap 1.5×).
For each scenario, per simulated year:
Joint posterior draw -> scenario material-event rates
Poisson event count -> per-event loss magnitude -> annual scenario total
Joint portfolio total = year-by-year sum of scenario totals
The sum is only meaningful because the model publishes an attribution rule: every incident belongs to
exactly one scenario, chosen by how it was realised. The five scenarios mix outcome definitions (S1, S5)
with attack-vector definitions (S2, S3, S4), so one incident can match several descriptions; the rule is
what stops the portfolio total from counting it twice, and the response echoes it as portfolio.attribution.
The active 2.0 engine samples a count of material-loss events for each simulated year, samples a
loss for every event and sums them. Since CAL-3.4, primary loss is operational downtime loss
(QP8 daily disruption-cost anchor multiplied by the SQB downtime-duration answer) plus the separately
elicited response/recovery cost (QP10). Each scenario's rate is a normalised factor of the shared draw:
the documented frequency scale, the likelihood factor, the scenario weight, the draw's own
log-space offset and the profile exposure answer, divided by the same draw's answer-free denominator.
Because that denominator is fixed before answers are applied, a likelihood or exposure answer changes
its own scenario rate without redistributing loss across the other scenarios; neutral answers reproduce
the reference organisation rate, while non-neutral answers deliberately move the portfolio total. Scenario totals use the same posterior draw in a
year, so portfolio percentiles are computed from joint annual totals rather than by adding
independent scenario percentiles. Every response declares
meta.annualisationMethod = posterior-predictive-compound-poisson-annual-total and
meta.realisedAnnualTotalsModelled = true. If no validated posterior package is available, the
legacy engine falls back explicitly to frequency-times-severity-annualised-exposure and declares
that it does not model realised annual totals.
FAIR's core separation is borrowed deliberately: how often is kept apart from how costly, ranges replace single numbers, and primary loss is kept apart from secondary (knock-on) loss. What is simplified is stated in §13.
| Setting | Active posterior engine | Why |
|---|---|---|
| Attack probability | Beta reference-class posterior | Survey prevalence with capped effective sample size for transportability |
| Material-loss probability | Beta posterior | Published non-zero-cost bases |
| Scenario weights | Weak Dirichlet prior | No public source supplies all five annual rates |
| Scenario rate composition | Normalised factor of the draw's own answer-free reference denominator | Neutral answers reproduce the reference organisation rate; a non-neutral answer changes its own scenario rate without redistributing loss across other scenarios |
| Unknown likelihood answer | Mean-preserving dispersion widening in log space | Widens the range without shifting the expected rate |
| Annual event count | Poisson | Gives zero-loss years and count uncertainty |
| Per-event primary loss | Downtime anchor × downtime duration plus separately elicited response/recovery cost | Separates interruption cost from work-required cost; reference-class severity quantiles are sensitivity only |
| Secondary loss | Independent per-event SLEF Bernoulli plus directly elicited consequence cost (QP11), scenario-scaled | FAIR factor decomposition: consequential occurrence and cost are separate factors, not a fixed share of primary loss |
| Dependence | Shared posterior draw | Joint annual totals without claiming an estimated correlation matrix |
| Randomness | Seeded object-local MT19937: one evidence stream plus independent primary and secondary-magnitude streams per scenario | Reproducible, no global RNG state, no questionnaire-persisted seed |
| Confidence | Heuristic input-quality indicator | Explicitly not statistical confidence |
Both engines clip each primary and secondary loss component at
sampling.clamps.lossMagnitude (€1,000 – €500,000,000 per component). The active engine reports how
many components were clipped (clampedPrimaryCount, clampedSecondaryCount) so a censored tail is
visible rather than implied. The legacy fallback (the retained 1.3 behaviour, used only when no
validated posterior package is active) keeps the bounds below.
| Setting | Value | Why |
|---|---|---|
| Sampling distribution | Triangular for frequency, susceptibility and multipliers; moment-matched lognormal for primary and secondary loss magnitude | The questionnaire supports min / most-likely / max reasoning, while loss magnitude needs heavy right tails |
| Modifier uncertainty | Triangular {min, mode, max} ranges sampled each iteration (the mode sets the central estimate) |
Propagates calibration uncertainty, not only input uncertainty |
| Widening mean-shift cap | 1.5× | Stops an Unknown answer from inflating only the central estimate |
| TEF | 0.001 – 100 events/year | Prevents degenerate extremes |
| Susceptibility | 0.005 – 0.99 | It is a probability |
| Impact multiplier | 0.05 – 60 | Bounds the interval arithmetic |
| Loss magnitude | €1,000 – €500,000,000 per component | Legacy component clamp |
| Secondary-loss probability | 0.01 – 0.99 | Keeps the Bernoulli draw meaningful |
The active 2.0 engine does not sample these frequency bands. It derives scenario material-event rates from the reference posterior and applies the elicitation multipliers in
fairquickmodel/inference/reference-classes.json. Sections 4, 5 and 7 document the retained 1.3 fallback, which is used only when no validated posterior package is active. Section 6 (loss magnitude) describes the CAL-3.4 decomposition implemented by both engines — downtime duration × daily disruption-cost anchor plus separately elicited response/recovery cost — while noting where the posterior and legacy sampling paths differ.
Base bands (externally-evidenced), events per year, derived from DSIT 2025/2026 prevalence and
material-cost probability by tools/calibrate-frequency-bands.php:
| Answer | Min | Most likely | Max |
|---|---|---|---|
| Very unlikely | 0.0038 | 0.0127 | 0.0316 |
| Unlikely | 0.0114 | 0.0380 | 0.0949 |
| Possible | 0.0380 | 0.1266 | 0.3165 |
| Likely | 0.0949 | 0.3165 | 0.7912 |
| Very likely | 0.2279 | 0.7596 | 1.8989 |
Each band is multiplied by a scenario scale (heuristic): S1 ×1.00 (reference), S2 ×1.15,
S3 ×1.15, S4 ×0.85, S5 ×1.50. Incident volume is therefore not treated as business risk: a
frequent scenario is not automatically ranked highly, because magnitude is modelled too.
The likelihood question asks for attempts or contact, before controls. Controls are applied once, as susceptibility — they are never counted twice. This was corrected after an independent audit found that the earlier wording double-counted control effectiveness.
Probability that a threat event becomes a loss event (externally-evidenced), per scenario,
anchored to DSIT P(material cost | breach) and refined with IBM/Ponemon control-effectiveness
differentials. In the active engine, QP7 changes the material-loss odds and the scenario posterior
supplies the base rate:
| Scenario | Min | Most likely | Max | Rationale |
|---|---|---|---|---|
| S1 Ransomware | 0.12 | 0.35 | 0.65 | Success needs access, privilege, opportunity and a failure of detection or recovery |
| S2 Identity compromise | 0.15 | 0.40 | 0.70 | Phishing succeeds often enough even with MFA, and account takeover is common |
| S3 Vulnerability exploitation | 0.08 | 0.28 | 0.58 | Requires a reachable, unpatched or misconfigured component |
| S4 Third-party compromise | 0.05 | 0.22 | 0.52 | Propagation into our environment is the exception |
| S5 DDoS / disruption | 0.18 | 0.38 | 0.65 | Mitigation is common, but material disruption still occurs |
Control maturity (QP7) is an organisation-level modifier expressed as a triangular uncertainty range (mode): Very limited ×2.00, Limited ×1.50, Moderate ×1.00, Strong ×0.60, Very strong ×0.40, Unknown ×1.00 (with ×1.50 widening). The active posterior engine applies the mode and clamps the resulting material-loss probability to 0.005 – 0.99; the legacy fallback samples the triangular uncertainty range per iteration. The other profile modifiers are likewise stored as ranges — for example internet-facing exposure Limited 0.50–0.90, Very extensive 1.15–2.00.
Since CAL-3.4, the model does not treat the scenario impact answer as the whole per-event loss. The answer is a duration measure: full-disruption-equivalent days of critical-service or operational degradation. Primary loss per material event is:
primary loss = downtime/operational loss + direct response and recovery cost
downtime/operational loss = QP8 daily disruption-cost anchor × SQB downtime-duration band
response/recovery cost = QP10, or its disclosed organisation-size fallback when Unknown
Downtime anchor — QP8. The anchor is euros per full-disruption-equivalent day:
| Answer | Min (€/day) | Most likely | Max |
|---|---|---|---|
| Less than €25k | 5,000 | 12,000 | 25,000 |
| €25–100k | 25,000 | 45,000 | 100,000 |
| €100–500k | 100,000 | 200,000 | 500,000 |
| €500k–€2m | 500,000 | 900,000 | 2,000,000 |
| €2–10m | 2,000,000 | 3,500,000 | 10,000,000 |
| More than €10m | 10,000,000 | 14,000,000 | 40,000,000 |
| Unknown / skipped | 8,000 | 60,000 | 1,500,000 |
When QP8 is Unknown, both engines use the fallback band above and scale it by organisation size
(QP1): <€10m ×0.25, €10–50m ×0.60, €50–250m ×1.20, €250m–€1bn ×3.00, >€1bn ×8.00. The posterior
engine applies the same modifier through QkModifiers::TARGET_ANCHOR_FALLBACK; widening is bounded
by sampling.wideningMeanShiftCap and input confidence is reduced.
Downtime duration — SQB. The scenario duration band is applied to the daily anchor, so "Significant" means roughly one to five full-disruption-equivalent days, not a vague severity label for every kind of cost:
| Answer | Min days | Most likely | Max |
|---|---|---|---|
| Minor | 0.25 | 0.50 | 1.00 |
| Moderate | 0.50 | 1.00 | 2.00 |
| Significant | 1.00 | 2.20 | 5.00 |
| Severe | 3.00 | 6.00 | 15.00 |
| Critical | 8.00 | 16.00 | 40.00 |
Critical-service dependency (QP2) and recovery capability (QP6) remain primary-loss modifiers. The posterior engine applies them at their mode and adds shared posterior scenario offsets; the legacy fallback samples their triangular uncertainty ranges.
Response and recovery cost — QP10. QP10 separately elicits incident response, investigation, containment, restoration and recovery-work cost per serious material event. The answer bands are less than €10k, €10–50k, €50–250k, €250k–€1m, €1–5m and more than €5m. Unknown uses a disclosed organisation-size fallback rather than silently deriving the cost from the disruption anchor. The optional in-memory worksheet helps the user add internal response hours, external response/forensics and restoration expense without mixing them into downtime loss.
Both engines represent downtime and response/recovery components with heavy-tailed lognormal components and sum them mean-preservingly. Reported quantiles therefore describe a tail. An Unknown duration answer preserves the mean of the duration band and widens its range.
The active posterior engine implements the FAIR decomposition per material event: every event
carries its primary loss, and an independent Bernoulli secondary-event draw (SLEF) decides whether
a consequential loss is added. Since CAL-3.4 the secondary-loss magnitude (SLM) is anchored to the
direct secondary-consequence cost elicited in QP11 — notification, compensation, contractual,
legal/crisis-management and other stakeholder consequences — then scaled by the scenario's relative
secondary-loss multiplier. Unknown QP11 uses a disclosed organisation-size fallback. Sensitive-information
exposure (QP4) scales SLEF only; it is not another magnitude estimate.
The legacy fallback uses the same conceptual decomposition but, because it does not draw event counts,
applies knock-on loss once per simulated trial rather than once per material event; its
secondaryLossOccurrenceRate is therefore a share of simulated years, which the response declares.
The scenario bands below are relative allocations, not absolute costs:
| Scenario | SLEF min | mode | max | SLM min | mode | max |
|---|---|---|---|---|---|---|
| S1 Ransomware | 0.25 | 0.45 | 0.70 | 0.50 | 1.20 | 2.50 |
| S2 Identity compromise | 0.20 | 0.38 | 0.60 | 0.40 | 0.90 | 2.00 |
| S3 Vulnerability exploitation | 0.15 | 0.32 | 0.55 | 0.40 | 1.00 | 2.50 |
| S4 Third-party compromise | 0.15 | 0.35 | 0.60 | 0.40 | 0.90 | 2.00 |
| S5 DDoS / disruption | 0.10 | 0.22 | 0.45 | 0.30 | 0.60 | 1.50 |
Sensitive-information exposure (QP4) scales SLEF in every scenario (×0.50 – ×1.70), and third-party
dependency (QP5) scales it again for S4 (×0.60 – ×1.60). The response reports
expectedSecondaryLossFrequency, expectedSecondaryLossPerSecondaryEvent and secondaryLossShare,
so occurrence and magnitude remain visible. Statutory fines, regulatory penalties and specific
legal liabilities are not calculated or predicted.
| Setting | Value |
|---|---|
| Joint simulated years | 10,000 in the questionnaire, evaluating all five scenarios in each year. Internal harnesses may supply another count; the engine clamps it to 1,000–50,000 |
| Reported percentiles | P10, P25, P50, P75, P90 of simulated annual total losses |
| Indicative annual exposure | Exact weighted-particle expectation of annual total loss, including zero-loss years; the raw simulated mean is disclosed as a numerical check |
| Portfolio total | Year-by-year sum of scenario totals under shared posterior draws; joint percentiles are reported |
| Loss thresholds | €100k, €500k, €1m, €5m, €10m |
| Threshold probability | Share of simulated years above the threshold, with integer counts and Wilson intervals (a binomial approximation over cycled posterior particles) |
| Histogram | 40 bins, the last one an overflow bin above the 99th percentile |
| Sensitivity | Exact expected loss re-computed over active weighted posterior particles for one-at-a-time answer alternatives. Frequency allocations, severity moments and loss-component parameters are cached only within one request under keys restricted to the inputs that can mathematically affect them, so magnitude-only variants reuse frequency allocations and frequency-only variants reuse magnitude moments exactly. Impact-answer alternatives use scenario-local exact integration; likelihood alternatives use full-portfolio exact integration because they alter the normalised rate allocation. drawsUsed and method disclose the integration path. Employee-count alternatives are reassessed on their own reference-class particles |
| Replay | meta.replayDigest covers the validated input, seed, iterations, versions, package hash, engine/evidence status and the rounded statistics (including threshold probabilities and the uncertainty decomposition); calculatedAt is declared volatile. parametersHash, parametersCalculationHash and parametersProvenanceHash distinguish complete artifact identity, calculation-relevant identity and provenance metadata identity |
| Failure mode | An invalid or missing inference package fails closed with 503 MODEL_UNAVAILABLE unless the deployment explicitly opts into the legacy engine (inferenceFallback); meta.engine always states which estimator produced the numbers |
The reported words matter: indicative annual exposure is the posterior-predictive mean under the model assumptions (not a forecast); typical year is P50; bad year (1 in 10) is P90; best case (1 in 10) is P10. Percentiles are predictive intervals, not confidence intervals. The mean standard error and low-exceedance warnings are returned with the statistics.
A heuristic measure of answer completeness and calibration status — not statistical
confidence, not a confidence interval, and not a probability that the result is correct. Separately,
portfolio.inputQualityWarnings may contain heuristic cost-combination review warnings (for example
response/recovery cost implausibly far above or below the modelled downtime component). These warnings never
reject an answer, never alter the calculation and are displayed as review prompts only. Start
at 100 and subtract:
| Condition | Penalty |
|---|---|
| Scenario likelihood answer Unknown | −18 |
| Scenario impact answer Unknown | −20 |
| Daily disruption cost (QP8) Unknown, so derived from organisation size | −15 |
| Each Unknown organisation-profile answer | −5 |
| Calibration still provisional | −15 |
The width of the simulated distribution is disclosed but not deducted: a volatile risk is a
property of the exposure, not evidence that the answers were poor. Each scenario reports
confidence.distributionWidth with the coefficient of variation, the band (contained, wide at
≥ 1.20, veryWide at ≥ 2.00), affectsScore: false and the configured penalty that is withheld, so
a wide distribution is visible without being scored as a bad answer (audit P2-2).
Levels: High ≥ 85, Medium ≥ 62, Low below 62 — capped at Medium while the calibration is provisional, because the calibration values are heuristics that have not been externally validated. A complete set of answers therefore shows "Medium", never "High".
- When no seed is supplied, the server derives one deterministically from the canonical validated input,
package digest, versions, iteration count and
parametersCalculationHash— a hash of the numeric and structural calculation projection ofparameters.json. Provenance, source citations, evidence-package labels and explanatory annotations are hashed separately asparametersProvenanceHashand do not reseed an otherwise identical calculation.parametersHashremains the complete artifact hash for audit identity. The same payload therefore reproduces the same distribution exactly; the test suite asserts this against the recorded baseline intests/expected/. - The browser requests an opt-in NDJSON progress stream. It reports deterministic weighted progress and returns the result in the same stateless POST; no job, queue, session, stored progress or persistent result URL is created. Non-streaming clients receive the ordinary atomic JSON response.
meta.replayDigesthashes the validated input (profile and scenario answers, and organisation-evidence object), seed, iterations, versions, package hash, engine and evidence status, the distinct-particle count and the rounded statistics, including threshold probabilities and the uncertainty decomposition. It excludescalculatedAt, histogram bins, confidence reasons, driver narratives and the sensitivity factor list, which are presentation rather than the identity of the simulated result, so it is a replay tripwire for inputs and numbers — not a whole-response checksum.meta.distinctParameterDrawsis the number of genuinely distinct particles the run used, computed by hashing each selected draw.meta.inference.evidenceUpdate.uniqueParticlesis the number of particles supplied to the likelihood update, andeffectiveSampleSizeSharecompares the effective sample with that count: below0.05the response reportsevidenceStatus = evidence-incompatibleand the results screen warns that the supplied evidence does not fit the reference model.portfolio.uncertaintyreports the conditional mean, the epistemic spread of that mean, the predictive mean and the Monte Carlo standard error as four separate quantities. A wider predictive interval is not evidence of a less certain organisation.- The response carries the model identifier, model version, schema version, calibration version, methodology version, iteration count, annualisation method and the retention mode.
- Calibration changes create a new version; the meaning of a published version is never edited in place.
- The questionnaire and its results are zero-retention: processed in memory for one request
and discarded. No database row, file, PHP session, cookie, browser storage, cache entry or log
line is written containing assessment answers or results, and no result URL exists. Abuse
controls may retain only a salted client hash, request counter or concurrency lock outside the
web root; they never store assessment content. See
requirements/ZERO_RETENTION_PROOF.md.
QuickRisk Live is a separate, deterministic layer that shows how current SOC observations and response actions could change the operational risk state. It never re-does the risk mathematics: the baseline indicative annual exposure comes from the model above (or from a saved assessment that recorded it).
rawTelemetry = IOCs × 12 × confidence + stageScore + (velocity − 1) × 10
telemetry = 100 × (1 − exp(−rawTelemetry / 120)) soft-capped
mitigation = (1 − EDR) × (1 − network) × (1 − identity) 0.75, 0.50, 0.60
multiplier = clamp(1 + telemetry/100 × (4 × mitigation − 1), 0.20, 4.00)
riskIndex = min(100, round(telemetry × mitigation))
thirtyDayExposureOverlay = annualEAL × 30/365 × multiplier
Bounds and limiting behaviour: zero raw telemetry with any controls gives ×1.00 (the prorated
baseline is preserved). Because telemetry approaches 100 asymptotically rather than jumping to it,
the mandatory maximum-telemetry test vector gives ×3.72 with no controls and ×0.27 with full
controls; the hard multiplier bounds remain ×0.20–×4.00. Bands: 0–19 Low,
20–44 Medium, 45–74 High, 75–100 Critical. The engine is a pure TypeScript module with published
test vectors (requirements/QUICKRISK_LIVE.md), and the SOC data is synthetic — no production SIEM,
EDR, SOAR or SOC feed is connected.
A treatment never claims "reduce risk by 40%". It declares which causal component it changes:
material-event frequency, primary magnitude, secondary-loss probability or secondary-loss magnitude.
A legacy magnitude input maps once to primary magnitude only. The active posterior engine reuses the
year's stored count uniform for frequency, applies component effects to latent pre-clamp magnitudes,
and reuses the recorded Bernoulli uniform for secondary-probability counterfactuals. Treated figures
reuse the baseline sample, so no second simulation is needed:
- exact common random numbers: treated figures reuse the baseline draws, with no second simulation;
- candidate treatments compared from that one sample within an anonymous server-side compute budget: 10,000 iterations, 30 candidate treatments and 256 portfolios per request (a larger request is rejected, and a bounded enumeration says so instead of dropping a candidate);
- effect uncertainty expressed as per-iteration effect series. Curated frequency and legacy magnitude
effects use assumption-only posterior draws when the package provides them; otherwise the declared
three-point estimate is sampled. Each treatment/lever owns a deterministic stream derived from
(simulationSeed, treatmentId, version, lever); - overlap handled by independent coverage: within a mechanism group the largest realised effect in each simulated year takes full credit and every further overlapping treatment adds only 0.65 of its effect by default. Ordering by realised value rather than by identifier keeps a recommendation unchanged when a treatment is renamed (audit P2-1); percentages are never added;
- a primary-magnitude treatment scales the primary operational loss component, while the separate
secondary-probability and secondary-magnitude levers act only on their own FAIR components. Effects
are applied to latent pre-clamp values where recorded and the documented component clamp is
re-applied. Each scenario
reports
primary/secondary component mapping,kappaBasis(simulated-meanon the posterior path,analytic-expected-valueon the legacy path) andclampBoundwhen a component reached a bound; - deterministic decision rules: the exact comparison may test EAL, P90 and exceedance probability, but portfolio selection uses indicative annual exposure only and requires an exposure limit. High-end loss and exceedance criteria are sensitive to joint-tail and dependence assumptions, so they are displayed and evaluated for the exact comparison but excluded from portfolio ranking and recommendation;
- portfolio ranking by cost, then EAL, then delivery time, then a deterministic portfolio id;
Recommended,Viable alternative,High value / above appetite,DominatedandInfeasiblelabels, each with a one-sentence reason; break-even effectiveness by bisection on real runs, rounded up; and a Risk Reduction Efficiency ratio (ΔEAL / annualised cost, never called ROI).
Decision Lab sends the disclosed assessment seed and the iteration count the results response reports, so the server replays the results page simulated path. The assessment seed is deterministic for identical input unless explicitly supplied, so unchanged answers reproduce the same simulated years; Decision Lab therefore reconciles against the disclosed simulated-path mean rather than the headline exact weighted-particle mean. When the returned baseline differs beyond the applicable replay tolerance, the screen states that the answers or calculation identity changed and asks for the assessment to be recalculated.
A nine-month rollout earns a transition year rather than an immediate full benefit. If a
documented input clamp or component loss cap binds, the analysis says so (clampWarning) instead
of pretending the effect is exact. If a recorded event lacks its latent pre-clamp component, the
paired-year approximation is disclosed; that limitation is stated in the Decision Lab and Board Pack.
- A full FAIR analysis decomposes frequency and magnitude into many factors; this uses a small, fixed factor set.
- Only five scenarios are assessed; other material scenarios are out of scope.
- Dependence is represented by shared posterior draws, not by an empirically estimated correlation matrix. Portfolio percentiles are model-dependent, and Decision Lab still selects portfolios on indicative annual exposure rather than joint P90.
- The active engine simulates annual counts and event-level loss magnitudes. The legacy fallback uses one annualised-exposure magnitude per trial and is clearly labelled.
- Secondary loss in the posterior engine is an independently drawn per-event occurrence (
SLEF) and magnitude (SLM), but both are elicitation assumptions rather than empirically estimated models; the interval bands are published infairquickmodel/parameters.json. - Control effectiveness is one organisation-level answer, not a per-scenario control assessment.
- Statutory fines, regulatory penalties and specific legal liabilities are excluded.
- The model does not capture all uncertainty about its own structure, distribution shapes, calibration or organisation-specific scenario dependence. Shared posterior draws are a documented structural approximation, not an estimated correlation matrix.
- Results are estimates, not facts; they depend on the quality of the answers and on the documented assumptions, and must not be the sole basis for a material business decision.
php tools/validate-model.php # model structure, bands, clauses, package identity and evidence atlas
php tests/run-tests.php # full PHP suite, including Live and Decision Lab
php tools/simulate-assessment.php # one end-to-end assessment, printed
php tools/benchmark.php # timing at 5,000, 10,000 and 50,000 joint simulated years
php tools/dump-model.php # the effective model after loading and overridesReference: docs/MODEL_DOCUMENTATION_FAIR-QK-2.0.md (evidence roles, posterior model and known
validation gap), calibration/ (offline fitting and validation), and /methodology.html (the same
explanation, in plain language, for users).
- Five predefined scenarios, two questions each, plus eleven organisation-profile questions (eight required; daily disruption, response/recovery and secondary consequence costs optional).
- A server-side Monte Carlo simulation (10,000 joint simulated years by default) in PHP, with exact weighted-particle headline means and optional streamed calculation progress.
- Results expressed as indicative annual exposure, P10/P50/P90 ranges and threshold exceedance probabilities, with an explicit confidence indicator.
- QuickRisk Live (optional add-on): a deterministic SOC overlay that turns synthetic telemetry into a Real-Time Risk Index, a bounded SOC Threat Multiplier and an illustrative 30-day exposure overlay, with anonymous sessions, assessment history, timelines, shareable read-only assessments, a six-scenario demonstration library and an executive report.
- Decision Lab (optional add-on): a treatment-analysis layer over the same model, with a curated and session-owned treatment library, deterministic portfolio rules, a Risk Reduction Efficiency ratio, saved analyses, shareable Board Risk Packs and a read-only owner history.
- Three workspace tabs — Risk Calculator, Board Brief and Saved Packs — with methodology, data handling and the disclaimer available as dialogs rather than as separate destinations.
- Three entry paths on the entry page: a server-calculated 60-second sample, a one-scenario quick
check (the other four scenarios are submitted as
Unknown) and the full five-scenario assessment. - A static React/TypeScript frontend, compiled to plain HTML/CSS/JavaScript, with no Node.js runtime in production.
- Not a full FAIR analysis, audit, certification, compliance assessment or assurance opinion.
- Not a calculation or prediction of statutory fines or legal liabilities.
- Not a basis, on its own, for material business decisions.
- Not endorsed by the FAIR Institute, ENISA, Verizon, IBM or any regulator.
QuickRisk estimates baseline cyber-loss exposure. QuickRisk Live demonstrates how current SOC
observations and response actions could change the operational risk state. Its Live risk engine is
a pure TypeScript module (the only Live numerical implementation); for Live, PHP and MySQL only
validate, store and return what that engine calculated. QuickRisk Live methodology v1.1, coefficients
and the mandatory test vectors are documented in requirements/QUICKRISK_LIVE.md. The SOC data is synthetic: no
production SIEM, EDR, SOAR or SOC feed is connected.
| QuickRisk questionnaire | QuickRisk Live | Decision Lab | |
|---|---|---|---|
| Storage | none (in memory only) | MySQL, anonymous session | MySQL, anonymous session |
| Identity | none | none (no name, email, organisation) | none (no name, email, organisation) |
| Lifetime | page lifetime | session TTL (default 30 days) | session TTL (default 30 days) |
| Sharing | none | explicit read-only link, revocable | explicit read-only Board Risk Pack link, revocable |
The session TTL is sliding: reading or refreshing the anonymous session extends its expiry by the configured TTL; once it expires, saved work becomes inaccessible.
Assessment answers and results for the questionnaire are processed transiently and are not
persisted by the application — not in a database, file, PHP session, cookie, browser storage,
cache, queue, log, report or third-party service. There is no account, no assessment token, no
save/resume and no persistent results URL. See requirements/ZERO_RETENTION_PROOF.md for the evidence and
the exit test. QuickRisk Live and Decision Lab are the two deliberate exceptions: each stores only
anonymous technical state the user explicitly saves. Decision Lab stores the computed comparison,
portfolio search and treatment selection, not the questionnaire answers, and cannot recompute a
saved analysis from them.
The interface states these three models rather than leaving them to the documentation. The header
carries three workspace tabs — Risk Calculator (the questionnaire, the results and both
simulation branches), Board Brief (the print-ready summary of the result in this tab) and
Saved Packs (the saved-work list with archive and revoke controls) — while methodology, data
handling and the disclaimer open as dialogs rather than as destinations. Above them the
Assess → Results → Explore stepper keeps Live and Decision Lab unavailable until a baseline
exists. A persistent status line says what the tab is currently holding; a "Where your data goes"
dialog lists, per surface, what is stored, what ends access to it and what can be exported; and "Start
over" confirms exactly what will be discarded. The entry page offers three paths — a
server-calculated 60-second sample, a one-scenario quick check and the full five-scenario
assessment — and says that none of them persists assessment content. The wording is defined once in
frontend/src/content/dataLifecycle.ts and pinned by frontend/tests/data-lifecycle.test.ts and
frontend/tests/journey.test.ts, so an interface change cannot silently contradict
tests/zero_retention.test.php.
requirements/ local working notes (git-ignored; not published)
fairquickmodel/ authoritative model -> deployed to ~/fairquickmodel/
manifest.json identifiers, versions, iterations, thresholds
content.json disclaimer, methodology, privacy, positioning
questions.json organisation-profile questions + scenario templates
answer-options.json answer option sets
scenarios.json scenario presentation and wording
parameters.json CALIBRATION - server only, never sent to the browser
versions/2.5.0.json active model version record (1.x–2.4.x records are superseded)
server/ PHP -> deployed to ~/public_html/quickrisk/
api/calculate.php the questionnaire endpoint (POST, JSON, no-store)
includes/ config, model loader, engine, validation, hardening
includes/live/ QuickRisk Live: config, db, repository, validation, handlers
includes/decision/ Decision Lab: config, engine, validation, treatment library
live/api/*.php Live and Decision Lab endpoints (same-origin JSON)
live/api/.htaccess allow-list for those endpoints
.htaccess deny rules, headers, caching policy
database/ QuickRisk Live and Decision Lab migrations and seeds
001_initial_schema.sql anonymous_sessions, assessments, events, shares, library
002_seed_methodology.sql methodology_versions row for 1.0
003_seed_scenarios.sql Ransomware Outbreak
004_seed_scenarios_more.sql the other five demonstration scenarios
005_decision_lab.sql treatment library, custom treatments, saved analyses, shares
006_posterior_inference.sql Decision Lab methodology 2.0 identity (superseded by 008)
007_live_methodology_1_1.sql Live methodology 1.1 seed
008_decision_methodology_2_1.sql Decision Lab methodology 2.1 seed
frontend/ React + TypeScript + Vite (build-time only)
shared/publicModel.ts build-time model adapter (public files only)
src/ domain, state, api, validation, components, styles
src/live/ QuickRisk Live: engine, store, api client, views
live/share/index.html the read-only share shell (second HTML entry)
public/ robots.txt, sitemap.xml, the static methodology page,
the licence and notice copies, the branded error pages and
live/share/.htaccess (the share-token rewrite rules)
static-pages/ hand-deployed pages, outside the build and never shipped
UnderConstruction.html temporary holding notice (self-contained, noindex)
images/ the README banner and the GitHub social-preview card
(never shipped to the site)
tests/ PHP test suite (no framework required)
tools/ validation, audit dump, benchmark, baseline, guards,
live-smoke.php, serve-local.mjs, local-router.php
docs/ deployment runbook, model documentation, security and
privacy notes (the plans, proofs and release checklist are
held in requirements/)
Requirements: Node.js LTS and npm for the frontend; PHP 8.x for the API, tests and tools.
# Frontend: type-check, guard checks, unit tests and the production build
cd frontend
npm ci
npm run build # emits frontend/dist (static assets only, no source maps)
npm run test:e2e # browser UI tests; install Chromium first if no local browser
cd ..
# PHP: engine tests, model validation gate and an end-to-end smoke test
php tests/run-tests.php
php tools/validate-model.php
php tools/simulate-assessment.php
php tools/benchmark.php
python -m unittest discover -s calibration/tests -v # offline calibration and evidence-atlas tests
# QuickRisk Live and Decision Lab: request/compute paths end to end
php tools/live-smoke.php
php tools/decision-smoke.php
# On the host: check the deployed configuration, database and web-root .htaccess
php tools/preflight.php --web-root="$HOME/public_html/quickrisk" --origin=https://quickrisk.iliadis.netBuild gate (required for every change). No change is complete until the frontend build passes
without errors: cd frontend && npm run build runs the type-check, the boundary/storage/licence
guards, the unit tests and vite build. frontend/dist is a build artefact (not version
controlled) and must be regenerated after any model or frontend change — a stale bundle embeds the
previous model identifiers and the server rejects its calculations with a version mismatch. The
packaging and deploy tools refuse to ship a bundle that does not embed the active model.
Deployment is documented in requirements/DEPLOYMENT_FIRST_TIME.md and
docs/DEPLOYMENT_QUICKRISK_LIVE.md; the runbook includes MySQL, the Live and Decision Lab
configuration file and the acceptance checks. The short version:
# 1 + 2. the model, the compiled application and the rendered web-server policy
./tools/deploy.sh
# Without shell access (cPanel / FTP): assemble an upload tree, then upload its contents
php tools/prepare-upload.php --append-beta-gate
# 3. QuickRisk Live and Decision Lab storage (once; run as a MySQL administrator)
mysql -u MYSQL_ADMIN -p iliadis_quickrisk < database/001_initial_schema.sql
mysql -u MYSQL_ADMIN -p iliadis_quickrisk < database/002_seed_methodology.sql
mysql -u MYSQL_ADMIN -p iliadis_quickrisk < database/003_seed_scenarios.sql
mysql -u MYSQL_ADMIN -p iliadis_quickrisk < database/004_seed_scenarios_more.sql
mysql -u MYSQL_ADMIN -p iliadis_quickrisk < database/005_decision_lab.sql
mysql -u MYSQL_ADMIN -p iliadis_quickrisk < database/006_posterior_inference.sql
mysql -u MYSQL_ADMIN -p iliadis_quickrisk < database/007_live_methodology_1_1.sql
mysql -u MYSQL_ADMIN -p iliadis_quickrisk < database/008_decision_methodology_2_1.sqlThe web-root .htaccess is rendered at publish time, never copied: the versioned
server/.htaccess is deliberately fail-closed, and tools/render-apache-policy.php injects
the Cloudflare origin secret. Copying server/.htaccess by hand locks the site — that is the
intended failure mode, not a bug.
No database, no Node.js process and no background service is required for the questionnaire. The database is required only by QuickRisk Live and Decision Lab; without it, the questionnaire works normally and those modules report that storage is unavailable.
You need Node.js 20+ and PHP 8.2+ (any web server is optional — PHP's built-in
server is enough). If PHP is not on PATH, the local runner looks for a portable CLI at
.tmp/php/php.exe (downloaded into the git-ignored .tmp/ directory, not shipped in the
repository); set QUICKRISK_PHP to use any PHP binary.
Run the questionnaire and calculation API from one terminal:
node tools/serve-local.mjsThe script, in order: loads the PHP CLI, runs the model deployment gate
(tools/validate-model.php), builds the frontend if frontend/dist is missing (add --build
to force a fresh build, or --no-validate to skip the gate), then serves the compiled React app and
the questionnaire API from one origin — so the endpoint's same-origin protection works exactly as it
does in production. It also routes the core QuickRisk Live endpoints. It does not start MySQL and
it does not route the Decision Lab decision-*.php endpoints; full Live and Decision Lab
persistence therefore requires the deployed PHP/MySQL setup described above.
- Open http://127.0.0.1:8000/ (change the port with
--port 8080). - Methodology: http://127.0.0.1:8000/methodology.html.
- The questionnaire calculation API lives at
/api/calculate.phpand answers POST only. The same local runner also routes the core QuickRisk Live endpoints; Decision Lab endpoints require the deployed PHP/MySQL setup.
What the local runner does not do: it never starts Apache or a database, and it never stores an
assessment. It writes one generated override to .tmp/local-config.php that allows plain HTTP
and localhost origins (the production defaults require HTTPS and only allow the iliadis.net
origins), plus in-memory rate limiting so nothing touches disk. That override is gitignored and
must never be deployed.
node tools/serve-local.mjs --port 8080 # different port
node tools/serve-local.mjs --build # force a fresh frontend build first
node tools/serve-local.mjs --no-validate # skip the model gate (faster, less safe)
set QUICKRISK_PHP=C:\path\to\php.exe # use an explicit PHP binary (Windows)For UI development with live reload: keep the PHP server running and run cd frontend && npm run dev for the Vite dev server, but note the API rejects cross-origin calls by design, so the page
you actually use for calculations must be the one served by the PHP server above.
- Application release:
1.4.0. - Model:
FAIR-QK-2.0· model version2.5.0· schema2.5.0· calibrationCAL-3.4· methodologyMETH-2.1· disclaimerDISC-2.0· posterior packagePINF-QK-3.4.0(EVID-QK-2.1.0) · parameters schema1.5.0. parameters.jsonnames the posterior package, evidence package and draw count it was written against, andtools/validate-model.phpfails when any of them disagrees with the active hash-verified manifest.- Calibration changes require a new calibration version and a new version record; the meaning of an existing version is never edited in place.
- Public evidence, weak elicitation assumptions and the posterior package are documented in
docs/MODEL_DOCUMENTATION_FAIR-QK-2.0.md.fairquickmodel/evidence-atlas.jsonis the authoritative machine-checkable public evidence atlas;frontend/public/evidence-atlas.jsonis a byte-identical public copy carrying source roles, permitted/prohibited uses, EM-1.0 populations/windows/locators, transportability limits and SHA-256 evidence-file hashes. National evidence is not organisation-specific validation, and questionnaire multipliers remain explicit assumptions. - Version 1.2.0 corrected defects found by an independent quantitative audit; 1.3.0 preserved those corrections. Version 2.0 changes the active inference and annual-total simulation. Historical 1.x calculations retain their original model and methodology identifiers.
- Because no assessment is retained, a calibration change cannot alter any past result.
The origin answers only traffic that Cloudflare forwards. A Cloudflare Transform Rule sets
an X-Origin-Secret request header, and the deployed web-root policy refuses every request
that does not carry it. There is exactly one exemption: RFC 8615 /.well-known/, which must
stay reachable so that Let's Encrypt and cPanel AutoSSL can renew the certificate.
- The secret is never in this repository. It is read at publish time from
%USERPROFILE%\.quickrisk\cloudflare-origin-secretorQK_ORIGIN_SECRET; on the host,~/quickrisk-config/cloudflare-origin-secret(mode 600). server/.htaccesscontains a fail-closed stub, not a placeholder value: the repository is public, and a committed placeholder would be a known bypass.tools/render-apache-policy.phpperforms the substitution;tools/deploy.shandtools/prepare-upload.phpboth call it and refuse to publish without a valid secret.- The renderer also refuses an
--outpath that git tracks, so the secret cannot be written into a versioned file: publish to the web root, or to an untracked build tree such as the temporary upload folder. - Branded
ErrorDocumentpages for 403, 404, 500 and 503 ship infrontend/public/errors/.
Verified by tests/apache_policy.test.php and tests/error_pages.test.php, and by the
post-deployment checks in tools/preflight.php.
One policy serves the static site, the JSON endpoints and the local development server, so a scan of any of them sees the same controls.
| Finding a passive scan reports | Control |
|---|---|
| Cookie No HttpOnly Flag | The only cookie (the QuickRisk Live/Decision Lab session) is HttpOnly, Secure, SameSite=Lax; the session ini options are hardened in includes/bootstrap.php |
| Strict-Transport-Security Not Set / Disabled | max-age=31536000; includeSubDomains on every response, in the origin policy and (over TLS) from PHP |
| X-Content-Type-Options Header Missing | nosniff on every response, including error documents and JSON |
| Content Security Policy Not Set | Content-Security-Policy from Apache, from QkHttp and from the development router |
| CSP: directive with no fallback | frame-ancestors 'none', form-action 'self' and base-uri 'self' are stated explicitly, with no wildcard |
| CSP: style-src unsafe-inline | No inline keyword: the inline <style> blocks of the static pages are allowed by sha256 hash |
| Cross-Domain Misconfiguration | Every Access-Control-Allow-* header is removed; the application is same-origin only |
| Missing Anti-clickjacking Header | X-Frame-Options: DENY and frame-ancestors 'none' |
| Sub Resource Integrity Attribute Missing | The build writes integrity="sha384-…" on every emitted script and stylesheet |
| Big Redirect Detected | The application issues no redirect at all; the only 3xx is the host's or the CDN's HTTPS redirect |
Where each control lives:
server/.htaccessis the browser policy (the error documents are served without PHP).includes/security_headers.phpis the same directive list for PHP; a test compares them.- Inline styles are hashed, never allowed inline.
tools/render-apache-policy.phpreads the<style>block of each document it is about to publish (--web-root) and writes its sha256 intostyle-src. Editing that CSS changes the hash, so the policy must be re-rendered:php tools/render-apache-policy.php --checkreports a mismatch, and so does the test suite. The check needs the deploy secret (or--secret-file/QK_ORIGIN_SECRET); without a usable gate it exits without writing a policy. - The beta gate must not restate a header. It is appended after the policy, so its values
win; the renderer now refuses such a fragment instead of publishing an HSTS
max-age=0,X-Frame-Options: SAMEORIGINor a CORS wildcard.
Two settings live outside this repository and are the only ones a deploy cannot fix:
- Cloudflare HSTS. The origin states one year, but Cloudflare's SSL/TLS → Edge
Certificates → HSTS setting is what a visitor actually receives. It must be enabled
with a max-age of at least 12 months (and Include subdomains), never left at
0. - No minifying proxy. Subresource Integrity compares the bytes the browser receives with the digest in the HTML, so a CDN feature that rewrites JavaScript or CSS will break the page. Leave Auto Minify and Rocket Loader off.
Check the result from outside, with no shell account needed:
node tools/verify-live-headers.mjs --url https://quickrisk.iliadis.net/
node tools/verify-live-headers.mjs --url https://quickrisk.iliadis.net/ --check-cookieIt verifies the headers a browser receives (transport security, CSP, framing, cross-origin,
cookie flags, Subresource Integrity) plus the size of the HTTP→HTTPS redirect body, prints a
PASS/FAIL line for each control and exits non-zero on any failure. The --check-cookie
flag starts one anonymous QuickRisk Live session to inspect its Set-Cookie line.
QuickRisk is licensed under the Apache License, Version 2.0 (LICENSE); the
copyright and attribution statement is in NOTICE.
The compiled browser assets bundle third-party packages. Their licence texts and attribution
notices are reproduced in THIRD-PARTY-NOTICES.txt, served at /THIRD-PARTY-NOTICES.txt;
/LICENSE.txt serves the Apache licence. Both are generated from the production dependency
tree:
cd frontend
npm run notices # regenerate after a dependency change
npm run verify:licenses # fails when the published copies are staleNo copyleft dependency is bundled: verify:licenses fails the build if one appears.
"FAIR" is a trademark of the FAIR Institute. This project is independent and is not endorsed,
certified or validated by the FAIR Institute, ENISA, Verizon, IBM or any regulator.
- Read the requirements document before changing behaviour.
- Never add a persistence mechanism for assessment content.
- Never add a third-party analytics, telemetry or session-replay service.
- Never import the calibration file into the browser build (the build fails if you try).
- Keep the model explicit, documented, versioned, testable and separate from the UI.
- Report a security problem privately, as described in SECURITY.md — never in a public issue.

