Skip to content

Commit f59e891

Browse files
Kraemiinichtsfrei
authored andcommitted
Fix: notus advisories
1 parent 301e0a5 commit f59e891

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

ospd_openvas/notus.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,18 @@ def __to_ospd(
119119
cvss = severity.get("cvss_v2", None)
120120
result["severity_vector"] = cvss
121121
result["filename"] = path.name
122-
bid = advisory.get("bid", [])
123-
cve = advisory.get("cve", [])
124-
xref = advisory.get("xrefs", [])
122+
cves = advisory.get("cves", None)
123+
xrefs = advisory.get("xrefs", None)
124+
advisory_xref = advisory.get("advisory_xref", "")
125125
refs = {}
126-
if bid:
127-
refs['bid'] = bid
128-
if cve:
129-
refs['cve'] = cve
130-
if xref:
131-
refs['xref'] = xref
126+
refs['url'] = [advisory_xref]
127+
advisory_id = advisory.get("advisory_id", None)
128+
if cves:
129+
refs['cve'] = cves
130+
if xrefs:
131+
refs['url'] = refs['url'] + xrefs
132+
if advisory_id:
133+
refs['advisory_id'] = [advisory_id]
132134

133135
result["refs"] = refs
134136
result["family"] = meta_data.get("family", path.stem)

0 commit comments

Comments
 (0)