mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
feat(CVE): add CVE severity counters to returned images and CVE list calls (#2131)
For CLI output is similar to: CRITICAL 0, HIGH 1, MEDIUM 1, LOW 0, UNKNOWN 0, TOTAL 2 ID SEVERITY TITLE CVE-2023-0464 HIGH openssl: Denial of service by excessive resou... CVE-2023-0465 MEDIUM openssl: Invalid certificate policies in leaf... Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
@@ -634,7 +634,7 @@ func TestCVESort(t *testing.T) {
|
||||
str := space.ReplaceAllString(buff.String(), " ")
|
||||
actual := strings.TrimSpace(str)
|
||||
So(actual, ShouldResemble,
|
||||
"ID SEVERITY TITLE "+
|
||||
"CRITICAL 1, HIGH 1, MEDIUM 2, LOW 1, UNKNOWN 0, TOTAL 5 ID SEVERITY TITLE "+
|
||||
"CVE-2023-3446 CRITICAL Excessive time spent checking DH keys and par... "+
|
||||
"CVE-2023-2975 HIGH AES-SIV cipher implementation contains a bug ... "+
|
||||
"CVE-2023-2650 MEDIUM Possible DoS translating ASN.1 object identif... "+
|
||||
@@ -652,7 +652,7 @@ func TestCVESort(t *testing.T) {
|
||||
str = space.ReplaceAllString(buff.String(), " ")
|
||||
actual = strings.TrimSpace(str)
|
||||
So(actual, ShouldResemble,
|
||||
"ID SEVERITY TITLE "+
|
||||
"CRITICAL 1, HIGH 1, MEDIUM 2, LOW 1, UNKNOWN 0, TOTAL 5 ID SEVERITY TITLE "+
|
||||
"CVE-2023-1255 LOW Input buffer over-read in AES-XTS implementat... "+
|
||||
"CVE-2023-2650 MEDIUM Possible DoS translating ASN.1 object identif... "+
|
||||
"CVE-2023-2975 HIGH AES-SIV cipher implementation contains a bug ... "+
|
||||
@@ -670,7 +670,7 @@ func TestCVESort(t *testing.T) {
|
||||
str = space.ReplaceAllString(buff.String(), " ")
|
||||
actual = strings.TrimSpace(str)
|
||||
So(actual, ShouldResemble,
|
||||
"ID SEVERITY TITLE "+
|
||||
"CRITICAL 1, HIGH 1, MEDIUM 2, LOW 1, UNKNOWN 0, TOTAL 5 ID SEVERITY TITLE "+
|
||||
"CVE-2023-3817 MEDIUM Excessive time spent checking DH q parameter ... "+
|
||||
"CVE-2023-3446 CRITICAL Excessive time spent checking DH keys and par... "+
|
||||
"CVE-2023-2975 HIGH AES-SIV cipher implementation contains a bug ... "+
|
||||
|
||||
Reference in New Issue
Block a user