Skip to content

Commit

Permalink
Update checkcve print based on result changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iancampbell committed Nov 6, 2017
1 parent f354668 commit 8f44640
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions scripts/checkcves.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@ def read_manifest(manifest_file):


def print_cves(result):
for cve in result:
print('\nRecipe: %s' % cve['package'])
print('CVE ID: %s' % cve['cve_id'])
print('URL: %s%s' % (NVD_BASE_URL, cve['cve_id']))
print('CVSS: %s' % cve['cvss'])
print('Status: %s' % cve['status'])
if cve['status'] == 'Fixed':
patches = cve.get('fixedby')
if patches:
print('Patched by:')
for patch in patches:
print('\t%s' % patch)
for pkg,info in result.iteritems():
for cve in info:
print('\nRecipe: %s' % pkg)
print('CVE ID: %s' % cve['cve_id'])
print('URL: %s%s' % (NVD_BASE_URL, cve['cve_id']))
print('CVSS: %s' % cve['cvss'])
print('Status: %s' % cve['status'])
if cve['status'] == 'Fixed':
patches = cve.get('fixedby')
if patches:
print('Patched by:')
for patch in patches:
print('\t%s' % patch)


if __name__ == '__main__':
Expand Down

0 comments on commit 8f44640

Please sign in to comment.