Skip to content

Commit 5d9ec07

Browse files
keshav-spacemichaelehab
authored andcommitted
Handle Snyk advisory with missing CVE
Signed-off-by: Keshav Priyadarshi <git@keshav.space> Signed-off-by: Michael Ehab Mikhail <michael.ehab@hotmail.com>
1 parent d01f058 commit 5d9ec07

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vulntotal/datasources/snyk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ def parse_html_advisory(advisory_html, snyk_id, affected, purl) -> VendorData:
273273
cve_span = advisory_soup.find("span", class_="cve")
274274
if cve_span:
275275
cve_anchor = cve_span.find("a", class_="vue--anchor")
276-
aliases.append(cve_anchor["id"])
276+
if cve_anchor:
277+
aliases.append(cve_anchor.get("id"))
277278

278279
how_to_fix = advisory_soup.find(
279280
"div", class_="vue--block vuln-page__instruction-block vue--block--instruction"

0 commit comments

Comments
 (0)