From 1fd9caf52906ff41300f8a13e8d1f28fbdefef6d Mon Sep 17 00:00:00 2001 From: nscuro Date: Sat, 19 Mar 2022 13:50:25 +0100 Subject: [PATCH] fix: make vuln rating score optional fixes #25 BREAKING CHANGE: the type of `VulnerabilityRating.Score` changed from `float64` to `*float64`. Signed-off-by: nscuro --- cyclonedx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyclonedx.go b/cyclonedx.go index 5ebc7c0..d8672dd 100644 --- a/cyclonedx.go +++ b/cyclonedx.go @@ -634,7 +634,7 @@ type VulnerabilityAnalysis struct { type VulnerabilityRating struct { Source *Source `json:"source,omitempty" xml:"source,omitempty"` - Score float64 `json:"score" xml:"score"` + Score *float64 `json:"score,omitempty" xml:"score,omitempty"` Severity Severity `json:"severity,omitempty" xml:"severity,omitempty"` Method ScoringMethod `json:"method,omitempty" xml:"method,omitempty"` Vector string `json:"vector,omitempty" xml:"vector,omitempty"`