Skip to content

[BUG] VulnerabilityReference contradicting definition in JSON and XML #154

@jkowalleck

Description

@jkowalleck

In XML schema definition for CDX-1.4 vulnerabilityType.references.reference the id and source are defined optional (minOccurs="0")
see

<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="id" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>The identifier that uniquely identifies the vulnerability. For example:
CVE-2021-39182, GHSA-35m5-8cvj-8783, and SNYK-PYTHON-ENROCRYPT-1912876.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="source" type="bom:vulnerabilitySourceType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>The source that published the vulnerability.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>

In JSON schema definition for CDX-1.4 the /definitions/vulnerability/properties/references/items the id and source are mandatory (they are in list of required)
see

"required": [
"id",
"source"
],

these both definitions contradict each other.

please clarify which one is correct (a discussion/comment in here would be great for the start)
and have the XSD & JSON-schema alligned.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions