summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/meta/cve-update-nvd2-native.bb9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb b/meta/recipes-core/meta/cve-update-nvd2-native.bb
index 2b585983ac..0c627ef262 100644
--- a/meta/recipes-core/meta/cve-update-nvd2-native.bb
+++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb
@@ -323,11 +323,12 @@ def update_db(conn, elt):
323 [cveId, cveDesc, cvssv2, cvssv3, date, accessVector]).close() 323 [cveId, cveDesc, cvssv2, cvssv3, date, accessVector]).close()
324 324
325 try: 325 try:
326 configurations = elt['cve']['configurations'][0]['nodes'] 326 for config in elt['cve']['configurations']:
327 for config in configurations: 327 # This is suboptimal as it doesn't handle AND/OR and negate, but is better than nothing
328 parse_node_and_insert(conn, config, cveId) 328 for node in config["nodes"]:
329 parse_node_and_insert(conn, node, cveId)
329 except KeyError: 330 except KeyError:
330 bb.debug(2, "Entry without a configuration") 331 bb.debug(2, "CVE %s has no configurations" % cveId)
331 332
332do_fetch[nostamp] = "1" 333do_fetch[nostamp] = "1"
333 334