How to rerun the analysis from the pinned data

Every number on this site is computed at render time from dated data snapshots stored in data/. Nothing is downloaded during a render, so rendering the same commit with the same package versions gives the same results. This page lists the inputs, explains how the pipeline and its cache work, and records the software environment.

Quick start

The code and data are in the GitHub repository patrick-lefler/time-to-exploit-survival-analysis. To rebuild everything from a clean copy:

git clone ttps://github.com/patrick-lefler/time-to-exploit-survival-analysis
cd time-to-exploit-survival-analysis
Rscript -e 'renv::restore()'   # once: install the package versions pinned in renv.lock
quarto render

The rendered site is written to docs/. To run the analysis in an R console without rendering, source the three scripts in order from the project root:

source("R/00_setup.R")
source("R/01_data.R")
source("R/02_core.R")

R/01_data.R uses packages and helpers defined in R/00_setup.R, so sourcing it on its own in a fresh session fails with errors such as could not find function "str_extract".

Pipeline

Script What it does Main outputs
R/00_setup.R Loads packages, sets the ggplot2 theme and color palettes, and defines shared helpers (formatting, Wilson intervals, vendor-name normalization, table styling) Helper functions, palettes
R/01_data.R Reads the pinned snapshots, joins KEV, Exploit-DB, vendor, weakness-class and EPSS data to the NVD file, and builds the survival cohort survival_cohort, d_post, recon_tbl, vel_sens
R/02_core.R Fits the survival, cure, Cox and out-of-time models and evaluates the SLA policies Model summaries, policy_tbl, oot_tbl, and the objects used in the text

Each page (index.qmd, methods.qmd, policy.qmd, technical-appendix.qmd and this one) sources all three scripts in a hidden first chunk, so every page works from the same objects.

Data snapshots

All inputs are public and pinned to dated files. The retrieval date is in the file name where one was recorded.

File in data/ Source Retrieved Role
cve_cisa_epss_enriched_dataset.csv.zip Kaggle NVD/CISA/EPSS dataset (see license note) 2026-09-03 (file date) CVSS v3 metrics, NVD publication dates, observation cutoff
cve_corpus.csv.zip Same Kaggle dataset, corpus file 2026-09-03 (file date) First CPE vendor and CWE identifiers
kev_2026-10-02.json CISA KEV catalog, catalog version 2026.10.02 2026-10-02 KEV listing dates (the event)
epss_at_publication_2026-10-03.csv.gz FIRST EPSS daily archive 2026-10-03 EPSS score and percentile on the publication date
exploitdb_files_exploits_2026-10-02.csv Exploit-DB files_exploits.csv 2026-10-02 Earliest public exploit (sensitivity analysis)
cveorg_date_published_2026-10-02.csv CVE.org records (datePublished) for KEV-listed CVEs 2026-10-02 Alternative time origin
cna_cvss_sample_2026-10-03.csv CNA-provided CVSS scores from CVE.org records: all listed CVEs plus 20,000 unlisted 2026-10-03 Check on the NVD score

The two Kaggle files are stored as zip archives because the raw CSVs (42 MB and 306 MB) are too large for the repository. The scripts read the archives directly: readr::read_csv() reads the first file in a zip, and the corpus file is streamed with unzip -p so that only the needed columns are loaded. The raw CSVs are listed in .gitignore.

The scripts that pulled the EPSS, CVE.org and CNA extracts are not in the repository, so those three files can be checked against their sources but not regenerated from code here.

The checksums below identify the exact files used in this render. A different checksum means a different input.

Code
data_files <- c(
  "cve_cisa_epss_enriched_dataset.csv.zip", "cve_corpus.csv.zip", "kev_2026-10-02.json",
  "epss_at_publication_2026-10-03.csv.gz", "exploitdb_files_exploits_2026-10-02.csv",
  "cveorg_date_published_2026-10-02.csv", "cna_cvss_sample_2026-10-03.csv"
)
data_paths <- file.path("data", data_files)

tibble(
  File = data_files,
  `Size (MB)` = file.size(data_paths) / 1e6,
  MD5 = unname(tools::md5sum(data_paths))
) |>
  gt() |>
  tab_header(
    title = md("**Input files used in this render**"),
    subtitle = paste0("Rendered ", Sys.Date())
  ) |>
  fmt_number(columns = `Size (MB)`, decimals = 1) |>
  cols_align(align = "left", columns = c(File, MD5)) |>
  gt_house()
Input files used in this render
Rendered 2026-11-20
File Size (MB) MD5
cve_cisa_epss_enriched_dataset.csv.zip 6.1 7f94373b10bc31b8c6e4ac974c9d4f60
cve_corpus.csv.zip 46.4 9519661fdcea9797eb68bdb4ee36e2bb
kev_2026-10-02.json 1.8 313c0150f68bfa59a9f85571589cb2d4
epss_at_publication_2026-10-03.csv.gz 1.3 d1df722fdfdb2962096b1fe3ea5fa499
exploitdb_files_exploits_2026-10-02.csv 10.2 905caabf14f8bf55e159300a399d77f9
cveorg_date_published_2026-10-02.csv 0.0 8a588846f8047e88bc5e82b41b20afb8
cna_cvss_sample_2026-10-03.csv 1.4 75c6a62bd9557b0c52576aa2751e1041

How to read the table. Each row is one input file in the data/ folder. The size is in megabytes, and the MD5 column is a checksum: a short fingerprint computed from the file’s exact contents. Changing even one character in a file produces a completely different fingerprint. The subtitle gives the date this page was rendered.

What the table tells you. Anyone rerunning the analysis can compute the same checksums on their copies of these files. If every fingerprint matches, they are working from identical inputs and should get identical results with the same software. A mismatch means a file differs, for example a newer download, and any differences in the results should be traced to that file first.

Caching

Two caches speed up rendering. Neither changes any result.

  • Model cache (data/derived/core_objects.rds). R/02_core.R saves its computed objects to this file and reloads them on the next run if the file is newer than all three R/ scripts. Editing any script triggers a full recompute. To force one without editing, delete data/derived/. Fitted model objects are not cached, only their summaries. The cache is over 100 MB and is excluded from the repository, so the first render after a fresh clone recomputes everything.
  • 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.

Refreshing the snapshot

To update the analysis with newer data:

  1. Download the new KEV feed, Exploit-DB file and other extracts, and save them in data/ with the new retrieval date in the file name.
  2. Update the file names in R/01_data.R. The KEV retrieval date is parsed from its file name.
  3. Delete data/derived/ so the model cache is rebuilt.
  4. Re-render the site and update the dates in the Data snapshots table above.

The edge-vendor list in R/01_data.R is frozen from KEV listings dated 2021-11-01 to 2023-12-31. Leave it unchanged when refreshing, otherwise the out-of-time test of the edge flag is no longer fair.

Licenses

The code on this site is released under the MIT License. The data keep their own terms:

Source Terms
CISA KEV catalog Public domain dedication, CC0 1.0
FIRST EPSS Free to use without registration; FIRST requests attribution when EPSS data are used in publications or products
Exploit-DB GNU GPL v2.0 or later
CVE.org records (publication dates, CNA scores) CVE Program Terms of Use
Kaggle NVD/CISA/EPSS dataset Kaggle Terms of Use

Software environment

The site was built with R and Quarto. The analysis loads broom, coxme, flexsurvcure, gt, lubridate, reactable, scales, sessioninfo, survival and tidyverse, and also calls data.table, flexsurv, jsonlite and survRM2. Package versions are not pinned with renv, so the session information below is the record of what produced these results.

#> ─ 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  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2026-11-20
#>  pandoc   3.10 @ /Applications/Positron.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown)
#>  quarto   1.8.26 @ /Applications/quarto/bin/quarto
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package      * version    date (UTC) lib source
#>  archive        1.1.12     2025-03-20 [1] CRAN (R 4.5.0)
#>  backports      1.5.0      2024-05-23 [1] CRAN (R 4.5.0)
#>  base64enc      0.1-6      2026-02-02 [1] CRAN (R 4.5.2)
#>  bdsmatrix    * 1.3-7      2024-03-02 [1] CRAN (R 4.5.0)
#>  bit            4.6.0      2025-03-06 [1] CRAN (R 4.5.0)
#>  bit64          4.8.2      2026-05-19 [1] CRAN (R 4.5.2)
#>  boot           1.3-32     2025-08-29 [1] CRAN (R 4.5.2)
#>  broom        * 1.0.10     2025-09-13 [1] CRAN (R 4.5.0)
#>  cli            3.6.6      2026-04-09 [1] CRAN (R 4.5.2)
#>  commonmark     2.0.0      2025-07-07 [1] CRAN (R 4.5.0)
#>  coxme        * 2.2-22     2024-08-23 [1] CRAN (R 4.5.0)
#>  crayon         1.5.3      2024-06-20 [1] CRAN (R 4.5.0)
#>  data.table     1.17.8     2025-07-10 [1] CRAN (R 4.5.0)
#>  deSolve        1.42       2026-03-20 [1] CRAN (R 4.5.2)
#>  digest         0.6.39     2025-11-19 [1] CRAN (R 4.5.2)
#>  dplyr        * 1.2.1      2026-04-03 [1] CRAN (R 4.5.2)
#>  evaluate       1.0.5      2025-08-27 [1] CRAN (R 4.5.0)
#>  farver         2.1.2      2024-05-13 [1] CRAN (R 4.5.0)
#>  fastmap        1.2.0      2024-05-15 [1] CRAN (R 4.5.0)
#>  flexsurv     * 2.3.2      2024-08-17 [1] CRAN (R 4.5.0)
#>  flexsurvcure * 1.3.3      2025-02-15 [1] CRAN (R 4.5.0)
#>  forcats      * 1.0.1      2025-09-25 [1] CRAN (R 4.5.0)
#>  fs             2.1.0      2026-04-18 [1] CRAN (R 4.5.2)
#>  generics       0.1.4      2025-05-09 [1] CRAN (R 4.5.0)
#>  ggplot2      * 4.0.3      2026-04-22 [1] CRAN (R 4.5.2)
#>  glue           1.8.1      2026-04-17 [1] CRAN (R 4.5.2)
#>  gt           * 1.3.0      2026-01-22 [1] CRAN (R 4.5.2)
#>  gtable         0.3.6      2024-10-25 [1] CRAN (R 4.5.0)
#>  hms            1.1.4      2025-10-17 [1] CRAN (R 4.5.0)
#>  htmltools      0.5.9      2025-12-04 [1] CRAN (R 4.5.2)
#>  htmlwidgets    1.6.4      2023-12-06 [1] CRAN (R 4.5.0)
#>  jsonlite       2.0.0      2025-03-27 [1] CRAN (R 4.5.0)
#>  knitr          1.50       2025-03-16 [1] CRAN (R 4.5.0)
#>  lattice        0.22-7     2025-04-02 [1] CRAN (R 4.5.2)
#>  lifecycle      1.0.5      2026-01-08 [1] CRAN (R 4.5.2)
#>  litedown       0.8        2025-11-02 [1] CRAN (R 4.5.0)
#>  lubridate    * 1.9.4      2024-12-08 [1] CRAN (R 4.5.0)
#>  magrittr       2.0.5      2026-04-04 [1] CRAN (R 4.5.2)
#>  markdown       2.0        2025-03-23 [1] CRAN (R 4.5.0)
#>  Matrix         1.7-4      2025-08-28 [1] CRAN (R 4.5.2)
#>  mstate         0.3.3      2024-07-11 [1] CRAN (R 4.5.0)
#>  muhaz          1.2.6.4    2021-04-21 [1] CRAN (R 4.5.0)
#>  mvtnorm        1.3-3      2025-01-10 [1] CRAN (R 4.5.0)
#>  nlme           3.1-168    2025-03-31 [1] CRAN (R 4.5.2)
#>  numDeriv       2016.8-1.1 2019-06-06 [1] CRAN (R 4.5.0)
#>  pillar         1.11.1     2025-09-17 [1] CRAN (R 4.5.0)
#>  pkgconfig      2.0.3      2019-09-22 [1] CRAN (R 4.5.0)
#>  purrr        * 1.2.2      2026-04-10 [1] CRAN (R 4.5.2)
#>  quadprog       1.5-8      2019-11-20 [1] CRAN (R 4.5.0)
#>  R6             2.6.1      2025-02-15 [1] CRAN (R 4.5.0)
#>  RColorBrewer   1.1-3      2022-04-03 [1] CRAN (R 4.5.0)
#>  Rcpp           1.1.2      2026-07-05 [1] CRAN (R 4.5.2)
#>  reactable    * 0.4.5      2025-12-01 [1] CRAN (R 4.5.2)
#>  readr        * 2.1.5      2024-01-10 [1] CRAN (R 4.5.0)
#>  rlang          1.3.0      2026-07-05 [1] CRAN (R 4.5.2)
#>  rmarkdown      2.30       2025-09-28 [1] CRAN (R 4.5.0)
#>  S7             0.2.2      2026-04-22 [1] CRAN (R 4.5.2)
#>  sass           0.4.10     2025-04-11 [1] CRAN (R 4.5.0)
#>  scales       * 1.4.0      2025-04-24 [1] CRAN (R 4.5.0)
#>  sessioninfo  * 1.2.3      2025-02-05 [1] CRAN (R 4.5.0)
#>  statmod        1.5.1      2025-10-09 [1] CRAN (R 4.5.0)
#>  stringi        1.8.7      2025-03-27 [1] CRAN (R 4.5.0)
#>  stringr      * 1.6.0      2025-11-04 [1] CRAN (R 4.5.0)
#>  survival     * 3.8-6      2026-01-16 [1] CRAN (R 4.5.2)
#>  tibble       * 3.3.1      2026-01-11 [1] CRAN (R 4.5.2)
#>  tidyr        * 1.3.1      2024-01-24 [1] CRAN (R 4.5.0)
#>  tidyselect     1.2.1      2024-03-11 [1] CRAN (R 4.5.0)
#>  tidyverse    * 2.0.0      2023-02-22 [1] CRAN (R 4.5.0)
#>  timechange     0.3.0      2024-01-18 [1] CRAN (R 4.5.0)
#>  tzdb           0.5.0      2025-03-15 [1] CRAN (R 4.5.0)
#>  vctrs          0.7.3      2026-04-11 [1] CRAN (R 4.5.2)
#>  vroom          1.6.6      2025-09-19 [1] CRAN (R 4.5.0)
#>  withr          3.0.3      2026-06-19 [1] CRAN (R 4.5.2)
#>  xfun           0.54       2025-10-30 [1] CRAN (R 4.5.0)
#>  xml2           1.4.1      2025-10-27 [1] CRAN (R 4.5.0)
#>  yaml           2.3.10     2024-07-26 [1] CRAN (R 4.5.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
#>  * ── Packages attached to the search path.
#> 
#> ──────────────────────────────────────────────────────────────────────────────