feat: add cvss v4 score and vector in scan response (#7968)

This commit is contained in:
Gunesh Shanbhag
2024-11-21 16:21:55 +05:30
committed by GitHub
parent de523ffb76
commit e0f2054f9d
4 changed files with 185 additions and 143 deletions

View File

@@ -299,6 +299,14 @@ func TestConvertToRpcVulns(t *testing.T) {
V2Score: 7.2,
V3Score: 7.8,
},
vulnerability.NVD: {
V2Vector: "AV:L/AC:L/Au:N/C:C/I:C/A:C",
V3Vector: "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
V40Vector: "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/U:Green",
V2Score: 7.2,
V3Score: 7.8,
V40Score: 8.7,
},
},
References: []string{"http://example.com"},
PublishedDate: &fixedPublishedDate,
@@ -335,6 +343,14 @@ func TestConvertToRpcVulns(t *testing.T) {
V2Score: 7.2,
V3Score: 7.8,
},
"nvd": {
V2Vector: "AV:L/AC:L/Au:N/C:C/I:C/A:C",
V3Vector: "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
V40Vector: "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/U:Green",
V2Score: 7.2,
V3Score: 7.8,
V40Score: 8.7,
},
},
References: []string{"http://example.com"},
Layer: &common.Layer{