@@ -98,24 +98,12 @@ def to_advisory(advisory_data):
9898 bugzilla = advisory_data .get ("bugzilla" )
9999 if bugzilla :
100100 url = "https://bugzilla.redhat.com/show_bug.cgi?id={}" .format (bugzilla )
101- bugzilla_url = f"https://bugzilla.redhat.com/rest/bug/{ bugzilla } "
102- bugzilla_data = get_data_from_url (bugzilla_url )
103- bugs = bugzilla_data .get ("bugs" ) or []
104- if bugs :
105- # why [0] only here?
106- severity = bugs [0 ].get ("severity" )
107- if severity :
108- bugzilla_severity = VulnerabilitySeverity (
109- system = severity_systems .REDHAT_BUGZILLA ,
110- value = severity ,
111- )
112- references .append (
113- Reference (
114- severities = [bugzilla_severity ],
115- url = url ,
116- reference_id = bugzilla ,
117- )
118- )
101+ references .append (
102+ Reference (
103+ url = url ,
104+ reference_id = bugzilla ,
105+ )
106+ )
119107
120108 for rh_adv in advisory_data .get ("advisories" ) or []:
121109 # RH provides 3 types of advisories RHSA, RHBA, RHEA. Only RHSA's contain severity score.
@@ -126,25 +114,8 @@ def to_advisory(advisory_data):
126114 continue
127115
128116 if "RHSA" in rh_adv .upper ():
129- rhsa_url = f"https://access.redhat.com/hydra/rest/securitydata/cvrf/{ rh_adv } .json"
130- rhsa_data = get_data_from_url (rhsa_url )
131- if not rhsa_data :
132- continue
133- rhsa_aggregate_severities = []
134- if rhsa_data .get ("cvrfdoc" ):
135- # not all RHSA errata have a corresponding CVRF document
136- value = get_item (rhsa_data , "cvrfdoc" , "aggregate_severity" )
137- if value :
138- rhsa_aggregate_severities .append (
139- VulnerabilitySeverity (
140- system = severity_systems .REDHAT_AGGREGATE ,
141- value = value ,
142- )
143- )
144-
145117 references .append (
146118 Reference (
147- severities = rhsa_aggregate_severities ,
148119 url = "https://access.redhat.com/errata/{}" .format (rh_adv ),
149120 reference_id = rh_adv ,
150121 )
0 commit comments