How cveproject/cve-schema works
Main components
a. Schema Artifacts
• schema/CVE_Record_Format.json (latest schema)
• schema/archive (historical versions)
• schema/imports (shared CVSS definitions)
• schema/tags (tag definitions)
b. Support & Tooling
• support/Python3.x_Validator (D7Validator.py + CVSS JSON)
• support/Node_Validator (build.js, validate.js, dist/cve5validator.js)
• support/CVE_4_to_5_converter (cve4to5up.py, mapping files)
• support/schema2markmap (JS scripts to generate mindmap)
• support/qualityReport (report.js for coverage/quality)
• tools/ (ad hoc scripts like cmdlinejsonvalidator.py, mitre-cna-assignment-info.js)
c. Documentation Pipeline
• schema/docs (HTML, CSS, examples, mindmap)
• schema/archive/vX.X/docs (version-specific docs)
d. CI/CD
• .github/workflows/validate-schema.yml (GitHub Actions schema validation)
Relationships & data flows
• Schema files import shared CVSS definitions → feed into validators.
• Python3.x_Validator and Node_Validator consume schema bundles and produce pass/fail reports.
• CVE_4_to_5_converter reads older v4 schemas → outputs v5 schema artifacts.
• schema2markmap reads JSON Schema → emits mindmap HTML.
• qualityReport aggregates test coverage from validators and scripts.
• CI workflow triggers on push/PR → runs all validators, conversion tests, docs build verifications.
• Final artifacts (bundled JSON, HTML docs, mindmaps) published to GitHub Pages or npm.
• External consumers (CVE Services, CNAs, ADPs) pull the released bundled schema and docs.
Architectural patterns & design principles
• Monorepo structure grouping schemas, tools, and docs.
• Separation of concerns:
– Data (schemas & imports)
– Validation (Node, Python)
– Conversion (v4→v5)
– Documentation (schema2markmap, static HTML)
• Reuse: shared CVSS definitions imported by all versions.
• Versioning: historical archives alongside the canonical “latest.”
• CI-driven quality gate: GitHub Actions ensures every PR maintains schema validity.
Relevant technologies & frameworks
• JSON Schema (draft-07 or later)
• Node.js (build.js, validate.js, schema2markmap)
• Python 3.x (D7Validator)
• GitHub Actions (YAML workflows)
• Static site assets (HTML/CSS for docs and mindmap)
• Perl & custom scripts in tools/ for ad hoc conversions