mirror of
https://github.com/anchore/grype
synced 2024-11-10 06:34:13 +00:00
add cvss version to metadata constructor
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
96fed8e60c
commit
abc711a6be
1 changed files with 7 additions and 4 deletions
|
@ -13,9 +13,10 @@ type Metadata struct {
|
|||
}
|
||||
|
||||
type Cvss struct {
|
||||
Version string
|
||||
Vector string
|
||||
Metrics CvssMetrics
|
||||
Version string
|
||||
Vector string
|
||||
Metrics CvssMetrics
|
||||
VendorMetadata interface{}
|
||||
}
|
||||
|
||||
type CvssMetrics struct {
|
||||
|
@ -42,12 +43,14 @@ func NewCvss(m []db.Cvss) []Cvss {
|
|||
var cvss []Cvss
|
||||
for _, score := range m {
|
||||
cvss = append(cvss, Cvss{
|
||||
Vector: score.Vector,
|
||||
Version: score.Version,
|
||||
Vector: score.Vector,
|
||||
Metrics: CvssMetrics{
|
||||
BaseScore: score.Metrics.BaseScore,
|
||||
ExploitabilityScore: score.Metrics.ExploitabilityScore,
|
||||
ImpactScore: score.Metrics.ImpactScore,
|
||||
},
|
||||
VendorMetadata: score.VendorMetadata,
|
||||
})
|
||||
}
|
||||
return cvss
|
||||
|
|
Loading…
Reference in a new issue