Skip to content

Commit

Permalink
fix: fix products with no identified vulnerabilities (#3300)
Browse files Browse the repository at this point in the history
Products with no identified vulnerabilities are broken since commit
6b0f36e because products_with_cves will
always contain a dictionnary of all products. So replace the broken
lamba function with a more clear way of computing products with CVEs
(i.e. len(cve_data["cves"]))

Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine authored Sep 11, 2023
1 parent 19fd0e8 commit de850a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cve_bin_tool/output_engine/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,11 @@ def validate_cell_length(cell_name, cell_type):
table.add_column("Product")
table.add_column("Version")

products_with_cves = list(map(lambda x: x[1], all_cve_data))
products_with_cves = []
for product_info, cve_data in all_cve_data.items():
if len(cve_data["cves"]):
products_with_cves.append(product_info.product)

for product_data in all_product_data:
if (
all_product_data[product_data] == 0
Expand Down

0 comments on commit de850a6

Please sign in to comment.