This folder retains evidence and reproducible derivations used to
assess the correspondence between CVE claims and source artifacts in
data/index.csv. Its main output is validation.csv; its evidence
text corpus also feeds labeling and localization.
Validation asks whether retained evidence supports the dataset's
mapping from a CVE description to a source artifact and, where given,
a deployment. A match does not independently confirm that the code
is vulnerable; a non_match rejects the indexed correspondence rather
than the CVE claim itself.
Validation only applies to index rows with kind=contract. Library
rows express source-level claims without a specific deployment and are
outside this contract-claim classification.
Install and activate the shared environment once:
bash scripts/install_dependencies.sh
source .venv/bin/activateRebuild all derivations from retained inputs with:
python validation/scripts/build_validation.pyThe entry point runs these scripts in order:
extract_etherscan_interfaces.pycompiles retained verified sources into contract function interfaces.extract_runtime_selectors.pyextracts selectors from deployed runtime.build_cve_evidence_index.pyindexes CVE relationships in retained reference evidence.collect_cve_texts.pybuilds a provenance-preserving evidence corpus.match_index_claim_texts.pymatches indexed identities, addresses, functions, and code against that corpus.check_index_contracts.pychecks source, deployment, function, and runtime invariants.reduce_index_claim_text_matches.pyreduces observations to one assessment per contract row.build_validation_csv.pyexports the compact summary.classify_validation.pyapplies reviewed decisions and classifications tovalidation.csv.
Missing compiler releases are installed automatically with solc-select. The
build fails if a required release cannot be installed or selected, or if it
cannot compile the retained source.
validation.csvis the compact per-CVE result;validation.mdspecifies its checks and columns.evidence/contains acquired or manually captured inputs, including call results, manually saved sources, and supporting documents referenced by CVE records.decisions/CVE-*.jsoncontains current manual classifications. Each file has adecisionofmatchornon_matchand anotecopied intovalidation.csv.decision.schema.jsondescribes those reviewed decision files.generated/contains reproducible interfaces, runtime selectors, the text corpus, match observations, contract checks, and reduced assessments.scripts/contains the pipeline entry point, its stages, and shared helpers.
Evidence and decisions persist; generated files can be rebuilt. Decisions are edited in place and represent current state. Stored paths are repository-relative, while external URLs remain absolute identifiers.
Archive acquisition is extra work and must be requested explicitly:
python validation/scripts/build_validation.py --update-archiveThis first runs build_reference_archive.py, which calls the fetch,
normalization, evidence-following, and image-archiving stages, and then runs the
nine derivation stages above. Network refreshes can change retained evidence.
Use --refresh-documents or --refresh-images with --update-archive to
replace already retained material. Manually saved pages belong in
evidence/manual_sources/.
OCR is also explicit and requires macOS:
python validation/scripts/build_validation.py --update-archive --perform-ocrUse --refresh-ocr together with --perform-ocr and --update-archive to
replace retained OCR. OCR is stored beside its archived image because it is
platform-specific evidence that may not regenerate identically.
The derivation scripts may be run individually in the order listed above.
Interface and selector extraction accept selected input files for targeted
updates. check_index_contracts.py --fail-on-mismatch gives a nonzero exit for
CI-style checking; without it, mismatches are recorded in generated output and
carried into validation.csv.