Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.5.0 has inconsistent dataVersion across endpoints #1294

Open
ElectricNroff opened this issue Nov 22, 2024 · 0 comments
Open

v2.5.0 has inconsistent dataVersion across endpoints #1294

ElectricNroff opened this issue Nov 22, 2024 · 0 comments

Comments

@ElectricNroff
Copy link
Contributor

SCHEMA_VERSION: '5.1.1',

function createBaseCveMetadata (id, assignerOrgId, state) {
const baseRecord = {
dataType: 'CVE_RECORD',
dataVersion: '5.1',

This means that CVE Records that are created by the POST /cve/:id/cna or POST /cve/:id/reject endpoint, and not subsequently modified, have dataVersion 5.1, but other CVE Records sent to CVE Services v2.5.0 have dataVersion 5.1.1 (except in the unlikely case that the Secretariat uses the POST /cve/:id or PUT /cve/:id endpoint and explicitly sends a wrong version number).

In particular, any CNA is able to publish a CVE Record that has a containers.cna.cpeApplicability property and also has dataVersion 5.1, which may be problematic for downstream consumers, if they expect that any dataVersion 5.1 document can be validated by using the 5.1.0 schema. For example:

https://cveawg-test.mitre.org/api/cve/CVE-2024-22681
...
"dataVersion": "5.1",
...
      "cpeApplicability": [
        {
          "operator": "AND",
          "nodes": [
(etc.)

Is it intentional that some CVE Records that include cpeApplicability have dataVersion 5.1.1 but others have dataVersion 5.1?

Is src/constants/index.js correct, or is src/model/cve.js correct? In CVE Services production today, dataVersion is set to 5.1 even though the schema version in the cve-schema repository is 5.1.0:

SCHEMA_VERSION: '5.1',

Is the value of dataVersion supposed to include the "patch" version of the schema version number, or is it only supposed to include the "major" version and "minor" version (which has been the case in the past)? Do we expect that 5.1 is correct here:
https://github.com/CVEProject/cve-schema/blob/cc1c0214befc0e2ccfb98c8f4306ec116f65fd34/schema/docs/full-record-advanced-example.json#L3
? Or do we expect that 5.1.1 is correct here:
https://github.com/CVEProject/cve-schema/blob/cc1c0214befc0e2ccfb98c8f4306ec116f65fd34/schema/CVE_Record_Format.json#L378
? Which part of the CVE Program decides what number is supposed to be placed in the dataVersion property after each new release of the schema, and how is this number communicated to others? @ccoffin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant