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.
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.
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.
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:
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.
Update the file names in R/01_data.R. The KEV retrieval date is parsed from its file name.
Delete data/derived/ so the model cache is rebuilt.
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:
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.
---title: "Reproducibility"subtitle: "How to rerun the analysis from the pinned data"---```{r load}#| include: falsesource("R/00_setup.R")source("R/01_data.R")source("R/02_core.R")```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 {#quick-start}The code and data are in the GitHub repository [patrick-lefler/time-to-exploit-survival-analysis](https://github.com/patrick-lefler/time-to-exploit-survival-analysis). To rebuild everything from a clean copy:``` bashgit clone ttps://github.com/patrick-lefler/time-to-exploit-survival-analysiscd time-to-exploit-survival-analysisRscript-e'renv::restore()'# once: install the package versions pinned in renv.lockquarto 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:``` rsource("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 {#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 {#data}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](#licenses)) | 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](https://www.cisa.gov/known-exploited-vulnerabilities-catalog), catalog version 2026.10.02 | 2026-10-02 | KEV listing dates (the event) ||`epss_at_publication_2026-10-03.csv.gz`|[FIRST EPSS](https://www.first.org/epss/) daily archive | 2026-10-03 | EPSS score and percentile on the publication date ||`exploitdb_files_exploits_2026-10-02.csv`|[Exploit-DB](https://gitlab.com/exploit-database/exploitdb)`files_exploits.csv`| 2026-10-02 | Earliest public exploit (sensitivity analysis) ||`cveorg_date_published_2026-10-02.csv`|[CVE.org](https://www.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.```{r data-checksums}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()```**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 {#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 {#refresh}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](#data) 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 {#licenses}The code on this site is released under the [MIT License](license.qmd). The data keep their own terms:| Source | Terms ||:----------------------|:--------------------------------------------------------|| CISA KEV catalog | Public domain dedication, [CC0 1.0](https://github.com/cisagov/kev-data)|| FIRST EPSS | Free to use without registration; FIRST [requests attribution](https://www.first.org/epss/faq) when EPSS data are used in publications or products || Exploit-DB |[GNU GPL v2.0 or later](https://gitlab.com/exploit-database/exploitdb)|| CVE.org records (publication dates, CNA scores) |[CVE Program Terms of Use](https://www.cve.org/Legal/TermsOfUse)|| Kaggle NVD/CISA/EPSS dataset |[Kaggle Terms of Use](https://www.kaggle.com/terms)|## Software environment {#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.::: {.callout-note icon=false collapse="true"}## Full R session information```{r}#| label: session-information#| echo: falsesessioninfo::session_info()```:::