Skip to content

Commit 04c47b8

Browse files
authored
fix: HTML report does not include all CVEs correctly (#4936)
* Fix:HTML report does not include all CVEs correctly * fix: black linters Signed-off-by: arnav <[email protected]> --------- Signed-off-by: arnav <[email protected]>
1 parent 19dcafa commit 04c47b8

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

cve_bin_tool/output_engine/html.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,7 @@ def output_html(
416416
vendor=product_info.vendor,
417417
name=product_info.product,
418418
version=product_info.version,
419-
cve_count=(
420-
0
421-
if cve_data["cves"][0][1] == "UNKNOWN"
422-
else len(cve_data["cves"])
423-
),
419+
cve_count=(len(cve_data["cves"])),
424420
severity_analysis=analysis_pie.to_html(
425421
full_html=False, include_plotlyjs=False
426422
),

cve_bin_tool/output_engine/print_mode/templates/content.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{% else %}
2222
<span class="h5">{{ product_info.product }} {{ product_info.version }}</span>
2323
{% endif %}
24-
<span class="h5 float-end mr-5">CVE Count: {{ 0 if (not cve_data["cves"] or cve_data["cves"][0][1] == "UNKNOWN") else cve_data['cves'] | length }}</span><hr \>
24+
<span class="h5 float-end mr-5">CVE Count: {{ 0 if (not cve_data["cves"]) else cve_data['cves'] | length }}</span><hr \>
2525
</div>
2626
<!-- If CVE Number UNKNOWN don't render -->
2727
{% if cve_data["cves"] and cve_data["cves"][0][1] != "UNKNOWN" %}

0 commit comments

Comments
 (0)