for s in SecurityPatch.objects.filter(cve_visible=False):
r = requests.get(s.cvelink, timeout=10)
if r.status_code == 200:
- newly_visible.append(s.cve)
- s.cve_visible = True
- s.save()
+ # RedHat have started requiring both a HTML page and a JSON api call to view
+ # CVEs. Dumb dumb dumb, but what can we do...
+ r = requests.get('https://access.redhat.com/api/redhat_node/CVE-{}.json'.format(s.cve))
+ if r.status_code == 200:
+ newly_visible.append(s.cve)
+ s.cve_visible = True
+ s.save()
if newly_visible:
send_simple_mail(settings.NOTIFICATION_FROM,
settings.NOTIFICATION_EMAIL,