There was an error while loading. Please reload this page.
1 parent 4335d98 commit 1234e45Copy full SHA for 1234e45
1 file changed
vulnerabilities/importers/xen.py
@@ -26,9 +26,22 @@ class XenImporter(Importer):
26
27
def advisory_data(self):
28
data = fetch_response(self.url).json()
29
- if not len(data):
+ # The data looks like this
30
+ # [
31
+ # {
32
+ # "xsas": [
33
34
+ # "cve": [
35
+ # "CVE-2012-5510"
36
+ # ],
37
+ # "title": "XSA-1: Xen security advisory",
38
+ # }
39
+ # ]
40
41
42
+ if not data:
43
return []
- xsas = data[0].get("xsas") or []
44
+ xsas = data[0]["xsas"]
45
for xsa in xsas:
46
yield from self.to_advisories(xsa)
47
0 commit comments