Skip to content

Commit 0210dd5

Browse files
fix: Unknown CVEs in output (#1429)
1 parent 4cc5438 commit 0210dd5

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

cve_bin_tool/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def main(argv=None):
460460
)
461461
parsed_data = package_list.parse_list()
462462
for product_info, triage_data in parsed_data.items():
463-
LOGGER.warning(f"{product_info}, {triage_data}")
463+
LOGGER.debug(f"{product_info}, {triage_data}")
464464
cve_scanner.get_cves(product_info, triage_data)
465465

466466
if args["input_file"]:
@@ -470,7 +470,7 @@ def main(argv=None):
470470
parsed_data = input_engine.parse_input()
471471
if not args["directory"]:
472472
for product_info, triage_data in parsed_data.items():
473-
LOGGER.warning(f"{product_info}, {triage_data}")
473+
LOGGER.debug(f"{product_info}, {triage_data}")
474474
cve_scanner.get_cves(product_info, triage_data)
475475
if args["directory"]:
476476
version_scanner = VersionScanner(
@@ -504,7 +504,7 @@ def main(argv=None):
504504
f"The number of products to process from SBOM - {len(parsed_data)}"
505505
)
506506
for product_info, triage_data in parsed_data.items():
507-
LOGGER.warning(f"{product_info}, {triage_data}")
507+
LOGGER.debug(f"{product_info}, {triage_data}")
508508
cve_scanner.get_cves(product_info, triage_data)
509509

510510
LOGGER.info("")

cve_bin_tool/cve_scanner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ def get_cves(self, product_info: ProductInfo, triage_data: TriageData):
231231
self.logger.debug(
232232
f"No CVEs found for {product_info}. Is the vendor/product info correct?"
233233
)
234-
self.all_cve_data[product_info]["cves"] = [CVE("UNKNOWN", "UNKNOWN")]
235234

236235
def openssl_convert(self, version: str) -> str:
237236
"""pkg_resources follows pep-440 which doesn't expect openssl style 1.1.0g version numbering

cve_bin_tool/package_list_parser/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def parse_data(self):
164164
self.parsed_data_with_vendor[product_info][
165165
row.get("cve_number", "").strip() or "default"
166166
] = {
167-
"remarks": Remarks(str(row.get("remarks", "")).strip()),
167+
"remarks": Remarks.NewFound,
168168
"comments": row.get("comments", "").strip(),
169169
"severity": row.get("severity", "").strip(),
170170
}

test/test_package_list_parser.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,30 @@ class TestPackageListParser:
2525

2626
REQ_PARSED_TRIAGE_DATA = {
2727
ProductInfo(vendor="httplib2_project*", product="httplib2", version="0.18.1"): {
28-
"default": {"remarks": Remarks.Unexplored, "comments": "", "severity": ""},
28+
"default": {"remarks": Remarks.NewFound, "comments": "", "severity": ""},
2929
"paths": {""},
3030
},
3131
ProductInfo(vendor="python*", product="requests", version="2.25.1"): {
32-
"default": {"remarks": Remarks.Unexplored, "comments": "", "severity": ""},
32+
"default": {"remarks": Remarks.NewFound, "comments": "", "severity": ""},
3333
"paths": {""},
3434
},
3535
ProductInfo(vendor="html5lib*", product="html5lib", version="0.99"): {
36-
"default": {"remarks": Remarks.Unexplored, "comments": "", "severity": ""},
36+
"default": {"remarks": Remarks.NewFound, "comments": "", "severity": ""},
3737
"paths": {""},
3838
},
3939
}
4040

4141
UBUNTU_PARSED_TRIAGE_DATA = {
4242
ProductInfo(vendor="gnu*", product="bash", version="5.0-6ubuntu1.1"): {
43-
"default": {"remarks": Remarks.Unexplored, "comments": "", "severity": ""},
43+
"default": {"remarks": Remarks.NewFound, "comments": "", "severity": ""},
4444
"paths": {""},
4545
},
4646
ProductInfo(vendor="gnu*", product="binutils", version="2.34-6ubuntu1.1"): {
47-
"default": {"remarks": Remarks.Unexplored, "comments": "", "severity": ""},
47+
"default": {"remarks": Remarks.NewFound, "comments": "", "severity": ""},
4848
"paths": {""},
4949
},
5050
ProductInfo(vendor="gnu*", product="wget", version="1.20.3-1ubuntu1"): {
51-
"default": {"remarks": Remarks.Unexplored, "comments": "", "severity": ""},
51+
"default": {"remarks": Remarks.NewFound, "comments": "", "severity": ""},
5252
"paths": {""},
5353
},
5454
}

0 commit comments

Comments
 (0)