This repository contains CSAF 2.1 CSD02 documents generated from GCVE-enriched CVE JSON 5 records.
The conversion is performed by tools/gcve_cve_to_csaf.py, a Python script that:
- Converts GCVE-enriched CVE records into CSAF 2.1 CSD02 JSON documents.
- Scans directories recursively for
CVE-*.jsoninputs. - Emits one CSAF output document per input record.
- Maps
x_gcvecontent into CSAFx_extensionsusing a schema URI. - Maps
vulnerability-lookup:meta.epssinto native CSAF metrics. - Optionally preserves full Vulnerability-Lookup metadata as a CSAF note.
tools/gcve_cve_to_csaf.py– converter script.cves/– generated CSAF JSON documents.
- Python 3.10+ (standard library only; no third-party dependencies required).
python3 tools/gcve_cve_to_csaf.py INPUT OUTPUT [options]INPUT– path to a single CVE JSON file or a directory recursively scanned forCVE-*.jsonfiles.OUTPUT– output directory for generated CSAF JSON documents.
--gcve-extension-schema URL- Schema URI used for native
x_gcveextension instances. - Default:
https://gcve.eu/schema/csaf/extensions/gcve-bcp-05-x-01_1.0.0.json
- Schema URI used for native
--publisher-name NAME- CSAF publisher name (default:
GCVE.eu).
- CSAF publisher name (default:
--publisher-namespace URI- CSAF publisher namespace URI (default:
https://gcve.eu/).
- CSAF publisher namespace URI (default:
--publisher-category {coordinator,discoverer,other,translator,user,vendor}- CSAF publisher category (default:
coordinator).
- CSAF publisher category (default:
--category VALUE- CSAF document category (default:
csaf_base).
- CSAF document category (default:
--source-base-url URL- Base URL to link source records from generated documents.
- Pass an empty string to omit source links.
- Default:
https://github.com/gcve-eu/gcve-enriched-dumps/blob/main/
--vl-meta {none,summary,full}- How to preserve
vulnerability-lookup:meta:none: do not keep metadata.summary: map EPSS only (default).full: map EPSS and retain full metadata payload as a note.
- How to preserve
--include-rejected- Include non-
PUBLISHEDrecords as interim CSAF documents.
- Include non-
--overwrite- Overwrite existing output files.
--sha256- Write
.sha256integrity files next to each generated JSON file.
- Write
--fail-fast- Stop on first invalid record or conversion error.
--quiet- Print only final summary and errors.
Convert a directory of CVE JSON files and generate SHA256 sidecar files:
python3 tools/gcve_cve_to_csaf.py ./gcve-enriched-dumps/cves ./csaf-out --sha256Convert a single CVE file while preserving full Vulnerability-Lookup metadata:
python3 tools/gcve_cve_to_csaf.py ./CVE-2024-12345.json ./csaf-out --vl-meta fullConvert and overwrite existing outputs:
python3 tools/gcve_cve_to_csaf.py ./input-cves ./csaf-out --overwrite- This tool is a format converter, not a full publication pipeline.
- Before publication, providers should still address publisher metadata policy, signing, distribution, extension-schema publication, and formal conformance validation.