-
Notifications
You must be signed in to change notification settings - Fork 208
Description
As mentioned in the #426 issue, 4f536a2 allows one artifactID per element of the affected array. However, each element of the affected array presumably needs to fully describe affected software with other information (e.g., vendor, product, and versions); otherwise, the element could easily be misinterpreted by consumers that do not process artifactID properties. In other words, what would previously be expressed with a wide version range, e.g.,
{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-1900-0001",
"assignerOrgId":"b3476cb9-2e3d-41a6-98d0-0f47421a65b6","state":"PUBLISHED"},
"containers":{"cna":{"providerMetadata":{"orgId":"b3476cb9-2e3d-41a6-98d0-0f47421a65b6"},
"affected":[
{
"vendor":"v","product":"p",
"versions":[{"versionType":"semver","version":"1.0.0","lessThan":"1.0.3","status":"affected"}],
"defaultStatus":"unaffected"
}
],
"descriptions":[{"lang":"en","value":"d"}],"references":[{"url":"https://a.ai"}]}}}
might now be expressed with several narrow version ranges, e.g.,
{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-1900-0002",
"assignerOrgId":"b3476cb9-2e3d-41a6-98d0-0f47421a65b6","state":"PUBLISHED"},
"containers":{"cna":{"providerMetadata":{"orgId":"b3476cb9-2e3d-41a6-98d0-0f47421a65b6"},
"affected":[
{
"artifactID": "gitoid:blob:sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"artifactType": "artifact",
"vendor":"v","product":"p",
"versions":[{"versionType":"semver","version":"1.0.0","lessThan":"1.0.1","status":"affected"}],
"defaultStatus":"unknown"
},
{
"artifactID": "gitoid:blob:sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"artifactType": "artifact",
"vendor":"v","product":"p",
"versions":[{"versionType":"semver","version":"1.0.1","lessThan":"1.0.2","status":"affected"}],
"defaultStatus":"unknown"
},
{
"artifactID": "gitoid:blob:sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"artifactType": "artifact",
"vendor":"v","product":"p",
"versions":[{"versionType":"semver","version":"1.0.2","lessThan":"1.0.3","status":"affected"}],
"defaultStatus":"unknown"
}
],
"descriptions":[{"lang":"en","value":"d"}],"references":[{"url":"https://a.ai"}]}}}
Some of the common consequences may include:
- It is unclear what is meant by mentioning the same vendor and product in multiple array elements, each with different version ranges but no other directly distinguishing details. For example, there is no documentation stating that the conclusion of
unknownfor 1.0.1 in array element 0 is superseded by the conclusion ofaffectedfor 1.0.1 in array element 1. Also, there is no way to express a higher-leveldefaultStatusthat applies across multiple array elements, and thus part of the intended meaning (i.e., there is a fix in version 1.0.3 and later) is lost. - If humans had been visiting the cve.org website to view summary information such as
affected from 1.0.0 before 1.0.3, they would now need to piece together information such asaffected from 1.0.0 before 1.0.1andaffected from 1.0.1 before 1.0.2 - If a producer later needs to add information that applies to every affected version, such as
"platforms": ["Windows"], they now need to add that in multiple places - If there is a large amount of shared information across all affected versions (e.g., many
programRoutines) and many affected versions, the document could become much larger because of the new type of duplication of information - Consumers need to understand that
"defaultStatus":"unknown"or"defaultStatus":"unaffected"does not mean that the gitoid refers to an unknown/unaffected artifact (the schema file at 4f536a2 does not explicitly say that other properties in the sameaffectedarray element are irrelevant to the meaning ofartifactID) - Consumers might incorrectly assume that an
artifactIDmust be related to product and version information in the same array element, e.g., a file matching bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb may normally be found only if version 1.0.1 is installed. However, the above organization ofartifactIDdata might instead mean that the three gitoids correspond to three different files (e.g., large.js, medium.js, and small.js) and those files are exactly the same regardless of whether 1.0.0, 1.0.1, or 1.0.2 is installed. In other words, the schema does not inform producers about whether the data organization is expected to be intuitive to human readers. - Admittedly, a producer could write
"version":"1.0.0","lessThan":"1.0.3"in three different array elements (that have differentartifactIDvalues), but this does not inform consumers about whether the producer is mentioning a set of artifacts that cover all three cases (e.g., whether 1.0.0, 1.0.1, or 1.0.2 is installed) or has instead chosen to mention three artifacts that can only occur if 1.0.2 is installed (e.g., large.js, medium.js, and small.js if those were always different for different versions of the product).
There could, of course, be a later migration to a different data format in which a single array element can mention multiple artifacts, perhaps along with information about what file is associated with each artifact.