|
| 1 | +# Creating the bundled CVE Record Format JSON schema files |
| 2 | +Use the scripts in this directory to create the bundled CVE Record Format JSON schema files. |
| 3 | + |
| 4 | +## Steps |
| 5 | +1. Create a directory structure where all of these files, and no others, exist and |
| 6 | +the files correspond to the current version of the CVE Record Format: |
| 7 | +- schema/tags/reference-tags.json |
| 8 | +- schema/tags/adp-tags.json |
| 9 | +- schema/tags/cna-tags.json |
| 10 | +- schema/CVE_Record_Format.json |
| 11 | +- schema/imports/cvss/cvss-v4.0.json |
| 12 | +- schema/imports/cvss/cvss-v2.0.json |
| 13 | +- schema/imports/cvss/cvss-v3.0.json |
| 14 | +- schema/imports/cvss/cvss-v3.1.json |
| 15 | +- schema/docs/cnaContainer-rejected-example.json |
| 16 | +- schema/docs/full-record-advanced-example.json |
| 17 | +- schema/docs/full-record-basic-example.json |
| 18 | +- schema/docs/cnaContainer-basic-example.json |
| 19 | +- schema/docs/cnaContainer-advanced-example.json |
| 20 | +- schema/support/schema2markmap/package.json |
| 21 | +- schema/support/schema2markmap/schema-bundle.js |
| 22 | + |
| 23 | +2. Run the Linux or Windows Bash script |
| 24 | + |
| 25 | +5. Observe that the bundled files are created in schema/docs/, and that all of the example files are valid according to the schema files. |
| 26 | + |
| 27 | +6. In the process, several types of error messages will occur, which can be ignored at least temporarily. There should be no other distinct types of errors: |
| 28 | + |
| 29 | +- A. Complaints about EOL software packages: |
| 30 | + npm warn deprecated json-schema-ref-parser@9.0.9: Please switch to @apidevtools/json-schema-ref-parser |
| 31 | + |
| 32 | +- B. Complaints about unfixed vulnerabiliies: |
| 33 | + 11 vulnerabilities (2 moderate, 9 high) |
| 34 | + |
| 35 | +- C. Complaints about performance/usability: |
| 36 | + npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. |
| 37 | + |
| 38 | +- D. Complains about EOL versions: |
| 39 | + npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported |
| 40 | + |
| 41 | +- E. "strict mode" errors related to https://github.com/CVEProject/cve-schema/issues/272 such as: |
| 42 | + strict mode: missing type "object" for keyword "additionalProperties" at "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json#" (strictTypes) |
| 43 | + strict mode: missing type "object" for keyword "properties" at "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json#" (strictTypes) |
| 44 | + strict mode: missing type "object" for keyword "required" at "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json#" (strictTypes) |
| 45 | + strict mode: missing type "object" for keyword "properties" at "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json#" (strictTypes) |
| 46 | + strict mode: missing type "object" for keyword "required" at "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json#" (strictTypes) |
| 47 | + strict mode: missing type "object" for keyword "properties" at "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json#" (strictTypes) |
0 commit comments