On 7/25/20 4:13 AM, Konrad Weihmann wrote:
Hi all,

I'm just too lazy to check if that has been fixed in master already, but since yesterday cve-check breaks on zeus for me with the following

I think I just saw this on master. We need to check if NVD changed their format again.

-armin


File: '/opt/build/poky/meta/recipes-core/meta/cve-update-db-native.bb', lineno: 91, function: do_populate_cve_db
     0087:            # Update db with current year json file
     0088:            try:
     0089:                response = urllib.request.urlopen(json_url)
     0090:                if response:
 *** 0091:                    update_db(c, gzip.decompress(response.read()).decode('utf-8'))
     0092:                c.execute("insert or replace into META values (?, ?)", [year, last_modified])
     0093:            except urllib.error.URLError as e:
     0094:                cve_f.write('Warning: CVE db update error, CVE data is outdated.\n\n')
     0095:                bb.warn("Cannot parse CVE data (%s), update failed" % e.reason)
File: '/opt/build/poky/meta/recipes-core/meta/cve-update-db-native.bb', lineno: 173, function: update_db
     0169:
     0170:        cveId = elt['cve']['CVE_data_meta']['ID']
     0171:        cveDesc = elt['cve']['description']['description_data'][0]['value']
     0172:        date = elt['lastModifiedDate']
 *** 0173:        accessVector = elt['impact']['baseMetricV2']['cvssV2']['accessVector']
     0174:        cvssv2 = elt['impact']['baseMetricV2']['cvssV2']['baseScore']
     0175:
     0176:        try:
     0177:            cvssv3 = elt['impact']['baseMetricV3']['cvssV3']['baseScore']
Exception: KeyError: 'baseMetricV2'

Cheers
Konrad