Skip to content

Commit

Permalink
Fix: notus advisories
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraemii authored and nichtsfrei committed Aug 8, 2022
1 parent 301e0a5 commit f59e891
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ospd_openvas/notus.py
Expand Up @@ -119,16 +119,18 @@ def __to_ospd(
cvss = severity.get("cvss_v2", None)
result["severity_vector"] = cvss
result["filename"] = path.name
bid = advisory.get("bid", [])
cve = advisory.get("cve", [])
xref = advisory.get("xrefs", [])
cves = advisory.get("cves", None)
xrefs = advisory.get("xrefs", None)
advisory_xref = advisory.get("advisory_xref", "")
refs = {}
if bid:
refs['bid'] = bid
if cve:
refs['cve'] = cve
if xref:
refs['xref'] = xref
refs['url'] = [advisory_xref]
advisory_id = advisory.get("advisory_id", None)
if cves:
refs['cve'] = cves
if xrefs:
refs['url'] = refs['url'] + xrefs
if advisory_id:
refs['advisory_id'] = [advisory_id]

result["refs"] = refs
result["family"] = meta_data.get("family", path.stem)
Expand Down

0 comments on commit f59e891

Please sign in to comment.