| Item | Value |
|---|---|
| R | R version 4.5.2 (2025-10-31) |
| Platform | aarch64-apple-darwin20 |
| Quarto | 1.8.26 |
| Packages | In sync with renv.lock |
| igraph | 2.2.1 |
| Matrix | 1.7.4 |
| tidyverse | 2.0.0 |
| gt | 1.3.0 |
| visNetwork | 2.1.4 |
Reproducibility
Structural Dependency Criticality via PageRank: how to rerun the analysis and where the results can mislead
Every number on this site is computed from a synthetic dependency map defined in R/01_topology.R and parameters in params.yaml. Nothing is downloaded during a render, and every random draw is seeded, so rendering the same commit with the same package versions gives the same results. This page explains how to rebuild the site, records the environment it was built in, and states where the results can mislead.
Quick start
The code is in the GitHub repository patrick-lefler/google-pagerank-vulnerability-criticality-scoring. To rebuild everything from a clean copy:
git clone https://github.com/patrick-lefler/google-pagerank-vulnerability-criticality-scoring
cd google-pagerank-vulnerability-criticality-scoring
Rscript -e 'renv::restore()' # once: install the package versions pinned in renv.lock
quarto renderThe rendered site is written to docs/.
Environment
How to read the table. Each row is one piece of software this page was built with and its version. The “Packages” row says whether the installed R packages match the versions pinned in renv.lock.
What the table tells you. If your versions match these and the packages are in sync, rebuilding the project should give the same numbers. If they differ, small differences in the results may come from the software rather than the analysis.
Pipeline
| Script | What it does | Main outputs |
|---|---|---|
R/00_setup.R |
Loads packages, sets the plot theme, tier palette and class labels, defines gt_house() and load_params() |
Helper functions, palettes |
R/01_topology.R |
Defines the 25 systems, the v1 and v2 dependency maps and the hard/soft flags | build_nodes(), edges_v1_raw(), edges_v2_raw(), index_edges() |
R/02_pagerank.R |
Sparse power-iteration PageRank with dangling-node, personalization and edge-weight options | compute_custom_pagerank(), pr_scores() |
R/03_cascade.R |
Failure cascade, blast radius, dominators, Monte Carlo and the PageRank knockout | simulate_cascade(), blast_radius(), simulate_annual_losses(), simulate_node_knockout() |
R/04_sensitivity.R |
Damping-factor sweep, dangling-node options, edge scenarios and random rewiring | alpha_sweep(), run_edge_scenarios(), perturb_topology() |
R/05_governance.R |
Classification thresholds and the asset-type control lookup | governance_table() |
R/06_analysis.R |
Runs everything above for both maps and caches the result | build_results(), load_results() |
R/repro_env.R |
Builds the Environment table on this page | repro_env_table() |
Each page sources the numbered scripts in order in a hidden first chunk and calls load_results(), so every page works from the same objects. Each script depends on objects from the ones before it, so sourcing a later script on its own in a fresh session fails.
Data
There are no input data files. The dependency map is written out in R/01_topology.R, and the business weights, soft-dependency list, thresholds and failure probabilities are in params.yaml. Both are synthetic and illustrative. Every result can be regenerated from code in the repository.
Parameters and seeds
All assumptions live in params.yaml, each labelled as an assumption or a convention. The two random streams are seeded explicitly: the Monte Carlo simulation with seed 20260730 and the random rewiring with seed 2026, each set with set.seed() inside the function that uses it. All other calculations are deterministic.
Tests
Core functions are covered by testthat tests in tests/testthat/. Run them with Rscript -e "testthat::test_dir('tests/testthat')". The table below is produced by running the tests during the render.
| File | Test | Expectations | Result |
|---|---|---|---|
| test-cascade.R | all-edge cascades match the review's blast radius | 2 | Pass |
| test-cascade.R | cascade agrees with igraph reachability | 1 | Pass |
| test-cascade.R | knockout RDI uses vertex deletion and survivor-renormalized baseline | 3 | Pass |
| test-cascade.R | Monte Carlo per-asset loss agrees with q x value | 1 | Pass |
| test-pagerank.R | uniform solver matches igraph and converges | 4 | Pass |
| test-pagerank.R | personalized solver matches igraph | 1 | Pass |
| test-pagerank.R | unit weights leave results unchanged and weighted solver matches igraph | 2 | Pass |
| test-pagerank.R | non-convergence warns and is flagged | 3 | Pass |
| test-pagerank.R | headline scores reproduce the independent review | 2 | Pass |
| test-sensitivity.R | named edge scenarios match the review | 5 | Pass |
| test-sensitivity.R | governance actions follow asset type, not rank | 2 | Pass |
How to read the table. Each row is one automated test of the project’s code, grouped by the file it lives in. “Expectations” counts the individual checks inside the test, and “Result” shows whether every check passed when this page was built. The tests run during every render, so the table always reflects the code that produced the numbers on this site, not an earlier version of it.
What the table tells you. 11 of 11 tests pass, covering 26 individual checks. They confirm that the solver matches igraph, that the cascade reproduces the independent review’s counts of failed systems, that the corrected rank distortion index matches the review’s value, and that the single-edge scenarios match the review to two decimals. A failed check would appear as a “Fail” row, flagging results not to trust until it is fixed.
Caching
- Results cache (
_cache/results.rds).load_results()inR/06_analysis.Rsaves every result the first time any page runs, and reuses it on later pages. The cache key is the MD5 checksum of every file inR/plusparams.yaml, so editing any script or parameter rebuilds it automatically. Delete_cache/to force a rebuild. The folder is not in git. - Quarto freeze (
_freeze/)._quarto.ymlsetsfreeze: auto, so a fullquarto renderre-executes a page only when that page’s.qmdfile changes. Edits to theR/scripts do not count as a change. After editing a script, render each page explicitly (for examplequarto render index.qmd), because Quarto always executes a page that is rendered on its own.
Known limitations
Limits of reproducibility
- Bit-for-bit equality is expected only on the same platform and package versions. Floating-point and BLAS differences across machines can change low-order digits. They cannot change the ranks reported here, except possibly between systems that tie exactly in theory.
- The interactive dependency map uses a physics layout with a fixed seed. Its exact positions can vary between visNetwork versions.
- Quarto versions affect rendering, not the numbers.
Model limitations
- Synthetic topology. The 25 systems and their dependencies were drawn by hand to illustrate the method. Every ranking on this site is a property of that map. A real application needs a map taken from service discovery, a configuration management database or tracing data.
- Results partly designed in. Dependencies run mostly from outer tiers toward the core, so the core tier was always likely to rank highest. Agreement between the scores and the tier labels is not independent evidence.
- Incomplete map. v1 omits dependencies most estates have (DNS, vault authentication, identity federation). Adding any one of them changes the first-ranked system (Sensitivity).
- Binary, unweighted edges. PageRank treats a blocking payment call and a cacheable lookup the same. The cascade model separates hard from soft dependencies, but the flag is a judgment applied to three target systems.
- No redundancy. Replicas, failover and multi-zone deployment are not modeled. The cascade is therefore pessimistic, and the dominator analysis gives the optimistic bound.
- Dangling-node convention. Uniform redistribution raises every score’s floor and has no operational meaning. Alternatives change the scale of the scores more than their order.
- Relative scores. PageRank shares sum to 100% across the systems modeled, so they fall when systems are added and cannot be compared across estates.
- Availability only. The model has no attacker, vulnerabilities or exploitability, so it says nothing about cyber risk. Reverse PageRank is a rough proxy for exposure, not an attack model.
- Illustrative business weights and failure probabilities. The Monte Carlo results depend entirely on them, and outage duration and recovery time are not modeled.
What would change the conclusions
| Change | Likely effect |
|---|---|
| Recording every system’s DNS dependency | Root_DNS becomes the most critical system |
| Vault authenticating through IAM | Cloud_IAM overtakes the vault |
| Callers degrading gracefully when a service fails | Services such as the fraud and risk engines drop out of the SPOF class |
| Redundant deployments of the vault or IAM | Their blast radius falls toward the dominator bound |
| Different business weights | Business-weighted PageRank and the SPOF class change; uniform PageRank does not |
| Failure rates from incident history | The expected-loss ranking changes; the cascade and PageRank results do not |
What real data would replace each assumption
| Assumption | Real-data replacement |
|---|---|
| Hand-drawn dependency map | Service-dependency graph from tracing, service mesh or a configuration management database |
| Hard/soft flags | Timeout, retry and fallback configuration of each caller |
| Business weights | Revenue or transaction volume by channel and service |
| Annual failure probabilities | Incident and outage history by system |
| No redundancy | Deployment topology (zones, regions, replicas) |
| No outage duration | Recovery-time objectives and actual recovery times |
How to use the results. Use them to show how dependency structure can be scored reproducibly, to compare a ranking against a direct cascade model, and to see how sensitive the conclusions are to the map. Do not use them as a measure of the probability or cost of failure, as a cyber-risk score, or as a basis for budget decisions on a real estate without replacing the synthetic inputs.
Licenses
The code on this site is released under the MIT License. The data are synthetic, generated by the project’s own code, and carry the same license. Third-party software keeps its own terms; the packages the results depend on most are listed below, with the license stated in each package’s DESCRIPTION file.
| Source | Terms |
|---|---|
| igraph (graph algorithms, reference PageRank) | GPL (>= 2) |
| Matrix (sparse matrices) | GPL (>= 2) |
| ggrepel (plot labels) | GPL-3 |
| visNetwork (interactive map) | MIT |
| tidyverse, gt, scales, testthat | MIT |
Session information
The site was built with R and Quarto. The analysis loads tidyverse, igraph, Matrix, visNetwork, gt and scales, and also calls yaml, ggrepel, knitr, testthat and sessioninfo. Package versions are pinned in renv.lock; run renv::restore() to install them.