summaryrefslogtreecommitdiffstats
path: root/meta/classes/cve-check.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/cve-check.bbclass')
-rw-r--r--meta/classes/cve-check.bbclass24
1 files changed, 12 insertions, 12 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index c946de29a4..bc35a1c53c 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -324,8 +324,8 @@ def check_cves(d, patched_cves):
324 # Convert CVE_STATUS into ignored CVEs and check validity 324 # Convert CVE_STATUS into ignored CVEs and check validity
325 cve_ignore = [] 325 cve_ignore = []
326 for cve in (d.getVarFlags("CVE_STATUS") or {}): 326 for cve in (d.getVarFlags("CVE_STATUS") or {}):
327 decoded_status, _, _ = decode_cve_status(d, cve) 327 decoded_status = decode_cve_status(d, cve)
328 if decoded_status == "Ignored": 328 if 'mapping' in decoded_status and decoded_status['mapping'] == "Ignored":
329 cve_ignore.append(cve) 329 cve_ignore.append(cve)
330 330
331 import sqlite3 331 import sqlite3
@@ -507,11 +507,11 @@ def cve_write_data_text(d, patched, unpatched, ignored, cve_data):
507 write_string += "PACKAGE VERSION: %s%s\n" % (d.getVar("EXTENDPE"), d.getVar("PV")) 507 write_string += "PACKAGE VERSION: %s%s\n" % (d.getVar("EXTENDPE"), d.getVar("PV"))
508 write_string += "CVE: %s\n" % cve 508 write_string += "CVE: %s\n" % cve
509 write_string += "CVE STATUS: %s\n" % status 509 write_string += "CVE STATUS: %s\n" % status
510 _, detail, description = decode_cve_status(d, cve) 510 status_details = decode_cve_status(d, cve)
511 if detail: 511 if 'detail' in status_details:
512 write_string += "CVE DETAIL: %s\n" % detail 512 write_string += "CVE DETAIL: %s\n" % status_details['detail']
513 if description: 513 if 'description' in status_details:
514 write_string += "CVE DESCRIPTION: %s\n" % description 514 write_string += "CVE DESCRIPTION: %s\n" % status_details['description']
515 write_string += "CVE SUMMARY: %s\n" % cve_data[cve]["summary"] 515 write_string += "CVE SUMMARY: %s\n" % cve_data[cve]["summary"]
516 write_string += "CVSS v2 BASE SCORE: %s\n" % cve_data[cve]["scorev2"] 516 write_string += "CVSS v2 BASE SCORE: %s\n" % cve_data[cve]["scorev2"]
517 write_string += "CVSS v3 BASE SCORE: %s\n" % cve_data[cve]["scorev3"] 517 write_string += "CVSS v3 BASE SCORE: %s\n" % cve_data[cve]["scorev3"]
@@ -637,11 +637,11 @@ def cve_write_data_json(d, patched, unpatched, ignored, cve_data, cve_status):
637 "status" : status, 637 "status" : status,
638 "link": issue_link 638 "link": issue_link
639 } 639 }
640 _, detail, description = decode_cve_status(d, cve) 640 status_details = decode_cve_status(d, cve)
641 if detail: 641 if 'detail' in status_details:
642 cve_item["detail"] = detail 642 cve_item["detail"] = status_details['detail']
643 if description: 643 if 'description' in status_details:
644 cve_item["description"] = description 644 cve_item["description"] = status_details['description']
645 cve_list.append(cve_item) 645 cve_list.append(cve_item)
646 646
647 package_data["issue"] = cve_list 647 package_data["issue"] = cve_list