Skip to content

Commit

Permalink
attempt to fix cve and title for new component logic
Browse files Browse the repository at this point in the history
  • Loading branch information
testaccount90009 committed Dec 21, 2024
1 parent 5ad78cb commit 1d0b778
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dojo/tools/mend/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def _build_common_output(node, lib_name=None):
)
cvss3_score = node["vulnerability"].get("score", None)
component_path = node["component"].get("path", None)
cve = node["vulnerability"].get("name")
title = "CVE-None | " + lib_name if cve is None else cve + " | " + lib_name
if component_path:
locations.append(component_path)
if "topFix" in node:
Expand Down Expand Up @@ -108,6 +110,8 @@ def _build_common_output(node, lib_name=None):
component_name = node["library"].get("artifactId")
component_version = node["library"].get("version")
cvss3_score = node.get("cvss3_score", None)
cve = node.get("name")
title = "CVE-None | " + lib_name if cve is None else cve + " | " + lib_name
if "topFix" in node:
try:
topfix_node = node.get("topFix")
Expand All @@ -120,8 +124,8 @@ def _build_common_output(node, lib_name=None):
else:
description = node.get("description", "Unknown")

cve = node.get("name")
title = "CVE-None | " + lib_name if cve is None else cve + " | " + lib_name
# cve = node.get("name")
# title = "CVE-None | " + lib_name if cve is None else cve + " | " + lib_name
# cvss2 by default in CLI, but cvss3 in UI. Adapting to have
# homogeneous behavior.
if "cvss3_severity" in node:
Expand Down

0 comments on commit 1d0b778

Please sign in to comment.