---
title: "Governance"
subtitle: "Structural Dependency Criticality via PageRank: classification rule, scorecard and recommendations"
---
```{r load}
#| include: false
for (f in sort(list.files("R", pattern = "^[0-9].*\\.R$", full.names = TRUE))) source(f)
res <- load_results()
s <- res$scores
gov <- res$governance
th <- res$params$thresholds
n_class <- \(k) sum(gov$vulnerability_class == class_levels[k])
spof <- gov |> filter(vulnerability_class == class_levels[1])
db <- s |> filter(asset_type == "database")
svc_spof <- spof |> filter(asset_type == "service")
mc_top <- res$mc$by_asset |> slice_max(expected_value_lost, n = 2, with_ties = FALSE)
top2_first <- res$perturbation |>
summarise(hit = any(rank == 1 & name %in% s$name[s$rank_custom <= 2]), .by = rep) |>
pull(hit) |>
mean()
```
## Classification rule
Each system is classified by the share of business value its failure disables through hard dependencies, using the cascade model on the [Failure Cascades](cascades.qmd#sec-blast) page. The thresholds are set once, in `params.yaml`:
| Class | Rule | Systems |
|:-------------------------|:-------------------------------------------|:------:|
| Extreme (systemic SPOF) | Failure disables at least `r pct(th$spof_value_share, 1)` of business value | `r n_class(1)` |
| Elevated (cluster bottleneck) | Failure disables at least `r pct(th$elevated_value_share, 1)` | `r n_class(2)` |
| Standard | Everything else | `r n_class(3)` |
**How to read the table.** Each row is one class. The rule column gives the test a system must pass to be placed in it, based on the share of business value that stops when the system fails, counting hard dependencies only. The last column counts how many of the `r nrow(gov)` systems fall into each class. Systems are tested from the top row down, so each lands in the first class whose rule it meets.
**What the table tells you.** `r n_class(1)` of the `r nrow(gov)` systems are systemic single points of failure, `r n_class(2)` are cluster bottlenecks, and the remaining `r n_class(3)` need only standard care. The `r pct(th$spof_value_share, 1)` and `r pct(th$elevated_value_share, 1)` thresholds are illustrative choices, set once in `params.yaml` so they can be changed in one place; the file also records a plausible range for each. Moving either threshold would change these counts and the actions attached to them.
This replaces the original study's rule that a PageRank share above $2/n$ marks a single point of failure. That rule had no derivation and halves whenever the number of systems modeled doubles. PageRank share is still reported in the scorecard as a measure of how much a system is relied on.
The recommended control follows from the system's **type** (its failure mode), and the class sets the **priority**: mandatory, planned or standard. A database therefore always gets a database control, whatever its rank.
## Scorecard
```{r executive-scorecard}
gov |>
select(vulnerability_class, name, tier, rank_custom, p_custom, blast_value_hard, governance_action) |>
gt_house(title = "Resilience governance scorecard", subtitle = "Class from business value disabled; action from asset type") |>
cols_label(
vulnerability_class = "Class", name = "Asset", tier = "Tier", rank_custom = "PageRank rank",
p_custom = "PageRank share", blast_value_hard = "Value disabled on failure",
governance_action = "Recommended action"
) |>
fmt_percent(columns = p_custom, decimals = 2) |>
fmt_percent(columns = blast_value_hard, decimals = 0) |>
data_color(columns = blast_value_hard, palette = c("#ffffff", "#2a78d6"), domain = c(0, 1)) |>
tab_style(style = cell_text(weight = "bold"), locations = cells_body(columns = vulnerability_class))
```
**How to read the table.** Each row is one system, grouped by class and sorted within each class by impact. PageRank rank and share show how much the system is relied on. "Value disabled on failure" is the share of business value that stops when it fails; it decides the class, and darker shading marks larger shares. The recommended action pairs a priority taken from the class with a control chosen for that type of system.
**What the table tells you.** `r n_class(1)` systems are systemic single points of failure. They include the two highest-PageRank systems, `r knitr::combine_words(s$name[s$rank_custom <= 2])`, but also `r knitr::combine_words(svc_spof$name)`, which PageRank ranks `r knitr::combine_words(svc_spof$rank_custom)`; under the original rank-based rule they would have received only standard monitoring. Controls follow system type, so both databases get a standby-and-replica control and the application services get circuit breakers, each aimed at the way that type of system actually fails.
## Recommendations
1. **Treat the vault and cloud IAM as joint systemic single points of failure.** Both disable `r pct(min(s$blast_value_hard[s$rank_custom <= 2]), 1)` of business value on failure ([Blast radius](cascades.qmd#sec-blast)). They are the top two by PageRank at every damping factor tested ([Sensitivity](sensitivity.qmd#sec-alpha)), and one of them ranks first in `r pct(top2_first, 1)` of rewired maps ([Random rewiring](sensitivity.qmd#sec-perturbation)). Multi-region replication of both, with break-glass access that does not depend on either, is the priority. Any circular recovery dependency between them, as in the v2 map ([v2](sensitivity.qmd#sec-v2-compare)), should be found and broken.
2. **Put circuit breakers in front of the shared services that the cascade model flags.** When they fail, `r knitr::combine_words(paste0(svc_spof$name, " (", pct(svc_spof$blast_value_hard, 1), ")"))` stop that share of business value, because their callers treat them as hard dependencies ([Blast radius](cascades.qmd#sec-blast)). Making callers degrade gracefully turns these hard edges into soft ones, which is exactly the change that removed the cache and search systems from the high-impact list. `r knitr::combine_words(mc_top$name)` also lead expected annual loss under the illustrative failure rates ([Monte Carlo](cascades.qmd#sec-montecarlo)).
3. **Isolate traffic to the core data stores.** When they fail, `r knitr::combine_words(paste0(db$name, " (", pct(db$blast_value_hard, 1), ")"))` disable that share of business value ([Blast radius](cascades.qmd#sec-blast)). Moving reporting and other non-essential reads to replicas reduces the chance that background load causes such a failure. The size of the benefit is not modeled here, so this part is **general engineering good practice (not derived from this model)**.
4. **Complete the dependency map before acting on the ranking below the top two.** One added dependency changes the first-ranked system ([Single-edge scenarios](sensitivity.qmd#sec-scenarios)), and the middle of the ranking spans several places under random rewiring ([Random rewiring](sensitivity.qmd#sec-perturbation)). DNS, shared cloud services and federation links are the gaps most likely to matter.
5. **Review exposure separately.** The CDN and web application firewall rank lowest for dependency but highest for exposure ([Dependency criticality and exposure](scores.qmd#dependency-criticality-and-exposure)). Their controls should come from a security review, which this model does not perform.
## How to use this scorecard
The scorecard is a reproducible, structured starting point for a resilience review on an illustrative estate. It complements expert judgment and does not replace it: the dependency map, the hard/soft flags, the business weights and the thresholds are all expert inputs, and the classification moves when they move. Before using it for real budget decisions, replace the synthetic map with one drawn from service discovery or a configuration database, calibrate failure probabilities from incident history, and add outage duration and the cost of each control. The [Known limitations](reproducibility.qmd#sec-limitations) section lists what each assumption would need.