Based on this implementation: CVEProject/cve-validation-library#14
This repository provides a CLI to use the CVE Validation Library. Run the cve-validate command for validating CVE
Records and CNA Containers from the shell or a CI pipeline.
Validate one or more files:
npx cve-validate record.json
npx cve-validate record1.json record2.jsonRead from stdin (use - explicitly, or pipe with no arguments):
cat record.json | cve-validateValidate a CNA Container instead of a full CVE Record:
cve-validate --type published-cna published-container.json
cve-validate --type rejected-cna rejected-container.jsonEmit machine-readable JSON for scripting:
cve-validate --json record.jsonAny registered warnings are printed beneath each result (and included in the
--json output). The command exits 0 when every input is valid, 1 when any
input is invalid or unreadable, and 2 on a usage error. Run
cve-validate --help for the full list of options.