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 render

The rendered site is written to docs/.

Environment

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

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.

# Single source of truth for every analysis parameter.
# status: "assumption" = chosen for illustration, not calibrated to any real enterprise.
# "convention" = standard choice from the PageRank literature.
# The topology itself (nodes and edges) is defined in R/topology.R and is also synthetic.

pagerank:
  alpha: 0.85            # probability the random walk follows a dependency edge rather than restarting; Brin & Page (1998) default
  tol: 1.0e-9            # L1 change between iterates at which the power iteration stops
  max_iter: 500
  status: convention

alpha_sweep:
  values: [0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 0.99]
  status: convention     # range 0.50-0.99 covers the values used in practice

# Share of business value delivered through each client-facing asset (sums to 1).
# Used to seed business-weighted PageRank and to value cascade losses.
business_weight:
  Web_Client_Gateway: 0.15
  Mobile_API_Gateway: 0.15
  Partner_B2B_Gateway: 0.10
  Payment_Execution_API: 0.20
  Order_Routing_Svc: 0.15
  Settlement_API: 0.15
  Invoicing_API: 0.05
  KYC_Verification_API: 0.05
  status: assumption

# Dependencies on these assets are "soft": the dependent degrades but keeps running
# (cache miss falls back to the database, notifications queue, search is non-blocking).
soft_dependency_targets: [Redis_Session_Cache, Notification_Gateway, Elastic_Search]

# Single point of failure (SPOF) rule, applied to the hard-edge cascade:
# an asset whose failure disables at least this share of business value.
thresholds:
  spof_value_share: 0.50       # "Extreme (systemic SPOF)"; range 0.30-0.70
  elevated_value_share: 0.20   # "Elevated (cluster bottleneck)"; range 0.10-0.30
  status: assumption

# Annual probability that an asset of each type suffers a disabling outage.
# Illustrative orders of magnitude only; replace with incident history.
annual_failure_prob:
  identity: 0.02
  secrets: 0.02
  dns: 0.01
  message_bus: 0.05
  database: 0.03
  cache: 0.08
  object_store: 0.01
  search: 0.08
  service: 0.10
  gateway: 0.05
  cdn: 0.02
  status: assumption

monte_carlo:
  n_years: 10000
  seed: 20260730

perturbation:
  n_reps: 1000
  edge_share: 0.10       # share of edges removed and replaced by random tier-respecting edges per replicate
  seed: 2026
  status: assumption

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() in R/06_analysis.R saves every result the first time any page runs, and reuses it on later pages. The cache key is the MD5 checksum of every file in R/ plus params.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.yml sets freeze: auto, so a full quarto render re-executes a page only when that page’s .qmd file changes. Edits to the R/ scripts do not count as a change. After editing a script, render each page explicitly (for example quarto 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

  1. 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.
  2. 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.
  3. Incomplete map. v1 omits dependencies most estates have (DNS, vault authentication, identity federation). Adding any one of them changes the first-ranked system (Sensitivity).
  4. 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.
  5. No redundancy. Replicas, failover and multi-zone deployment are not modeled. The cascade is therefore pessimistic, and the dominator analysis gives the optimistic bound.
  6. 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.
  7. Relative scores. PageRank shares sum to 100% across the systems modeled, so they fall when systems are added and cannot be compared across estates.
  8. 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.
  9. 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.

#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.5.2 (2025-10-31)
#>  os       macOS Tahoe 26.6.2
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  C.UTF-8
#>  ctype    C.UTF-8
#>  tz       America/New_York
#>  date     2026-11-20
#>  pandoc   3.6.3 @ /Applications/quarto/bin/tools/ (via rmarkdown)
#>  quarto   1.8.26 @ /usr/local/bin/quarto
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  ! package      * version date (UTC) lib source
#>  P brio           1.1.5   2024-04-24 [?] CRAN (R 4.5.0)
#>  P cli            3.6.6   2026-04-09 [?] CRAN (R 4.5.2)
#>  P desc           1.4.3   2023-12-10 [?] CRAN (R 4.5.0)
#>  P digest         0.6.39  2025-11-19 [?] CRAN (R 4.5.2)
#>  P dplyr        * 1.2.1   2026-04-03 [?] CRAN (R 4.5.2)
#>  P evaluate       1.0.5   2025-08-27 [?] CRAN (R 4.5.0)
#>  P farver         2.1.2   2024-05-13 [?] CRAN (R 4.5.0)
#>  P fastmap        1.2.0   2024-05-15 [?] CRAN (R 4.5.0)
#>  P forcats      * 1.0.1   2025-09-25 [?] CRAN (R 4.5.0)
#>  P fs             2.1.0   2026-04-18 [?] CRAN (R 4.5.2)
#>  P generics       0.1.4   2025-05-09 [?] CRAN (R 4.5.0)
#>  P ggplot2      * 4.0.3   2026-04-22 [?] CRAN (R 4.5.2)
#>  P glue           1.8.1   2026-04-17 [?] CRAN (R 4.5.2)
#>  P gt           * 1.3.0   2026-01-22 [?] CRAN (R 4.5.2)
#>  P gtable         0.3.6   2024-10-25 [?] CRAN (R 4.5.0)
#>  P hms            1.1.4   2025-10-17 [?] CRAN (R 4.5.0)
#>  P htmltools      0.5.9   2025-12-04 [?] CRAN (R 4.5.2)
#>  P htmlwidgets    1.6.4   2023-12-06 [?] CRAN (R 4.5.0)
#>  P igraph       * 2.2.1   2025-10-27 [?] CRAN (R 4.5.0)
#>  P jsonlite       2.0.0   2025-03-27 [?] CRAN (R 4.5.0)
#>  P knitr          1.50    2025-03-16 [?] CRAN (R 4.5.0)
#>  P lattice        0.22-7  2025-04-02 [?] CRAN (R 4.5.2)
#>  P lifecycle      1.0.5   2026-01-08 [?] CRAN (R 4.5.2)
#>  P lubridate    * 1.9.4   2024-12-08 [?] CRAN (R 4.5.0)
#>  P magrittr       2.0.5   2026-04-04 [?] CRAN (R 4.5.2)
#>  P Matrix       * 1.7-4   2025-08-28 [?] CRAN (R 4.5.2)
#>  P otel           0.2.0   2025-08-29 [?] CRAN (R 4.5.0)
#>  P pillar         1.11.1  2025-09-17 [?] CRAN (R 4.5.0)
#>  P pkgconfig      2.0.3   2019-09-22 [?] CRAN (R 4.5.0)
#>  P pkgload        1.5.3   2026-06-15 [?] CRAN (R 4.5.2)
#>  P purrr        * 1.2.2   2026-04-10 [?] CRAN (R 4.5.2)
#>  P R6             2.6.1   2025-02-15 [?] CRAN (R 4.5.0)
#>  P RColorBrewer   1.1-3   2022-04-03 [?] CRAN (R 4.5.0)
#>  P readr        * 2.1.5   2024-01-10 [?] CRAN (R 4.5.0)
#>    renv           1.1.5   2025-07-24 [1] CRAN (R 4.5.0)
#>  P rlang          1.3.0   2026-07-05 [?] CRAN (R 4.5.2)
#>  P rmarkdown      2.30    2025-09-28 [?] CRAN (R 4.5.0)
#>  P rprojroot      2.1.1   2025-08-26 [?] CRAN (R 4.5.0)
#>  P rstudioapi     0.19.0  2026-06-11 [?] CRAN (R 4.5.2)
#>  P S7             0.2.2   2026-04-22 [?] CRAN (R 4.5.2)
#>  P sass           0.4.10  2025-04-11 [?] CRAN (R 4.5.0)
#>  P scales       * 1.4.0   2025-04-24 [?] CRAN (R 4.5.0)
#>  P sessioninfo    1.2.3   2025-02-05 [?] CRAN (R 4.5.2)
#>  P stringi        1.8.7   2025-03-27 [?] CRAN (R 4.5.2)
#>  P stringr      * 1.6.0   2025-11-04 [?] CRAN (R 4.5.0)
#>  P testthat     * 3.3.2   2026-01-11 [?] CRAN (R 4.5.2)
#>  P tibble       * 3.3.1   2026-01-11 [?] CRAN (R 4.5.2)
#>  P tidyr        * 1.3.1   2024-01-24 [?] CRAN (R 4.5.0)
#>  P tidyselect     1.2.1   2024-03-11 [?] CRAN (R 4.5.0)
#>  P tidyverse    * 2.0.0   2023-02-22 [?] CRAN (R 4.5.0)
#>  P timechange     0.3.0   2024-01-18 [?] CRAN (R 4.5.0)
#>  P tzdb           0.5.0   2025-03-15 [?] CRAN (R 4.5.0)
#>  P vctrs          0.7.3   2026-04-11 [?] CRAN (R 4.5.2)
#>  P visNetwork   * 2.1.4   2025-09-04 [?] CRAN (R 4.5.0)
#>  P waldo          0.6.2   2025-07-11 [?] CRAN (R 4.5.0)
#>  P withr          3.0.3   2026-06-19 [?] CRAN (R 4.5.2)
#>  P xfun           0.54    2025-10-30 [?] CRAN (R 4.5.0)
#>  P xml2           1.4.1   2025-10-27 [?] CRAN (R 4.5.0)
#>  P yaml           2.3.10  2024-07-26 [?] CRAN (R 4.5.0)
#> 
#>  [1] /Users/patricklefler/Claude/r/2026-07-30_rQuarto_google-pagerank-vulnerability-criticality-scoring/renv/library/macos/R-4.5/aarch64-apple-darwin20
#>  [2] /Users/patricklefler/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.5/aarch64-apple-darwin20/4cd76b74
#> 
#>  * ── Packages attached to the search path.
#>  P ── Loaded and on-disk path mismatch.
#> 
#> ──────────────────────────────────────────────────────────────────────────────