Skip to content

Commit dee2995

Browse files
committed
Choose which CVE to use based on sorted and initial value
- The current implementation chain parses a CVE from the title. While we could initially send non-CVEs, the difficulty would lie in updating the subsequent code to accomodate that. - For more information, see #387 (comment)
1 parent a1dfbd5 commit dee2995

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

exasol/toolbox/tools/security.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,14 @@ def from_pip_audit(report: str) -> Iterable[Issue]:
172172
cves, cwes, links = identify_pypi_references(
173173
references=refs, package_name=package
174174
)
175-
yield Issue(
176-
cve="None" if not cves else cves[0],
177-
cwe="None" if not cwes else cwes[0],
178-
description=v["description"],
179-
coordinates=f"{package}:{dependency['version']}",
180-
references=tuple(links),
181-
)
175+
if cves:
176+
yield Issue(
177+
cve=sorted(cves)[0],
178+
cwe="None" if not cwes else ", ".join(cwes),
179+
description=v["description"],
180+
coordinates=f"{package}:{dependency['version']}",
181+
references=tuple(links),
182+
)
182183

183184

184185
@dataclass(frozen=True)

0 commit comments

Comments
 (0)