Sanity Checks for redhat import response
@@ -91,6 +91,11 @@ def to_advisory(advisory_data):
if bugzilla:
url = "https://bugzilla.redhat.com/show_bug.cgi?id={}".format(bugzilla)
bugzilla_data = requests.get(f"https://bugzilla.redhat.com/rest/bug/{bugzilla}").json()
+ if (
+ bugzilla_data.get("bugs")
+ and len(bugzilla_data["bugs"])
+ and bugzilla_data["bugs"][0].get("severity")
+ ):
bugzilla_severity_val = bugzilla_data["bugs"][0]["severity"]
bugzilla_severity = VulnerabilitySeverity(
system=scoring_systems["rhbs"],
