Skip to content

fix: make VulnerabilityReference arguments mandatory #790

Closed
@indiVar0508

Description

@indiVar0508

This issue is created from this thread re: #786 (comment)

It's been noticed that VulnerabilityReference class in implementation has defined the attributes id and source as optional
ref: https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/cyclonedx/model/vulnerability.py#L486...L497

but if we refer the documentation of cyclonedx

<bom:references      > [0..1] 
	Start Sequence [0..*] 
	<bom:reference            > [1] 
		<bom:id> xs:normalizedString </bom:id> [1] 
		<bom:source> bom:vulnerabilitySourceType </bom:source> [1] 
	</bom:reference> Allow any elements from a namespace other than this schema's namespace (lax validation). [0..*] End Sequence 
</bom:references>

The refrences is optional but if a reference is defined id and source are mandatory, but current implementation treats these as optional

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions