diff options
-rw-r--r-- | meta/recipes-core/meta/cve-update-nvd2-native.bb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb b/meta/recipes-core/meta/cve-update-nvd2-native.bb index 5bba2219d6..4b8d01fe84 100644 --- a/meta/recipes-core/meta/cve-update-nvd2-native.bb +++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb | |||
@@ -357,6 +357,10 @@ def update_db(conn, elt): | |||
357 | [cveId, cveDesc, cvssv2, cvssv3, date, accessVector, vectorString]).close() | 357 | [cveId, cveDesc, cvssv2, cvssv3, date, accessVector, vectorString]).close() |
358 | 358 | ||
359 | try: | 359 | try: |
360 | # Remove any pre-existing CVE configuration. Even for partial database | ||
361 | # update, those will be repopulated. This ensures that old | ||
362 | # configuration is not kept for an updated CVE. | ||
363 | conn.execute("delete from PRODUCTS where ID = ?", [cveId]).close() | ||
360 | for config in elt['cve']['configurations']: | 364 | for config in elt['cve']['configurations']: |
361 | # This is suboptimal as it doesn't handle AND/OR and negate, but is better than nothing | 365 | # This is suboptimal as it doesn't handle AND/OR and negate, but is better than nothing |
362 | for node in config["nodes"]: | 366 | for node in config["nodes"]: |