From 9843c0f5aa94d1d08e8212dd2b8c35142080d82b Mon Sep 17 00:00:00 2001 From: ayush_gitk Date: Thu, 29 Dec 2022 02:52:27 +0530 Subject: [PATCH 1/2] improve output of cve-scan github action for unexplored cve Signed-off-by: ayush_gitk --- test/test_requirements.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_requirements.py b/test/test_requirements.py index 7005992481..d3fb20b6ab 100644 --- a/test/test_requirements.py +++ b/test/test_requirements.py @@ -149,7 +149,10 @@ def test_requirements(): with open(OUTPUT_JSON) as f: output_json = json.load(f) for entry in output_json: - assert entry["remarks"] in ["Mitigated", "Ignored"] + assert entry["remarks"] in [ + "Mitigated", + "Ignored", + ], f"Component {entry['product']} has a unexplored potential CVE. " # Disabled until we fix how ignored/mitigated issues are listed # See https://github.com/intel/cve-bin-tool/issues/1752 From 85b43b306ab73c29871c47abec9e43f6b0ebb48b Mon Sep 17 00:00:00 2001 From: Ayush Sharma Date: Thu, 29 Dec 2022 09:43:52 +0530 Subject: [PATCH 2/2] change the assert message --- test/test_requirements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_requirements.py b/test/test_requirements.py index cd14d1ccdc..991347923b 100644 --- a/test/test_requirements.py +++ b/test/test_requirements.py @@ -152,7 +152,7 @@ def test_requirements(): assert entry["remarks"] in [ "Mitigated", "Ignored", - ], f"Component {entry['product']} has a unexplored potential CVE. " + ], f"Component {entry['product']} has a {entry['remarks']} potential CVE. " # Disabled until we fix how ignored/mitigated issues are listed # See https://github.com/intel/cve-bin-tool/issues/1752