Skip to content

Commit

Permalink
update cve fields, add date
Browse files Browse the repository at this point in the history
  • Loading branch information
mgpb committed Nov 10, 2017
1 parent 763f6fc commit 3ff8168
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/checkcves.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python

from datetime import datetime
import os
import sys
import json
Expand Down Expand Up @@ -30,9 +31,11 @@ def print_cves(result):
for pkg,info in result.iteritems():
for cve in info:
print('\nRecipe: %s' % pkg)
print('Version: %s' % cve['version'])
print('CVE ID: %s' % cve['cve_id'])
print('URL: %s%s' % (NVD_BASE_URL, cve['cve_id']))
print('CVSS: %s' % cve['cvss'])
print('CVSSv2: %s' % cve['cvss'])
print('Vector: %s' % cve['vector'])
print('Status: %s' % cve['status'])
if cve['status'] == 'Fixed':
patches = cve.get('fixedby')
Expand Down Expand Up @@ -69,6 +72,7 @@ def print_cves(result):
if not result:
print('No results.')
else:
print('Date: %s' % datetime.utcnow())
print_cves(result)
else:
print('No packages found in manifest.\nPlease confirm %s is a valid image' % manifest_json["image"])

0 comments on commit 3ff8168

Please sign in to comment.