mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
cve-update-nvd2-native: Remove rejected CVE from database
When a CVE is updated to be rejected, matching database entries must be removed. Otherwise: * an incremental update is not equivalent the to an initial download. * rejected CVEs might still appear as Unpatched in cve-check. (From OE-Core rev: f276a980b8930b98e6c8f0e1a865d77dfcfe5085) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c698cf6723
commit
789b10030c
@@ -324,6 +324,10 @@ def update_db(conn, elt):
|
|||||||
vectorString = None
|
vectorString = None
|
||||||
cveId = elt['cve']['id']
|
cveId = elt['cve']['id']
|
||||||
if elt['cve']['vulnStatus'] == "Rejected":
|
if elt['cve']['vulnStatus'] == "Rejected":
|
||||||
|
c = conn.cursor()
|
||||||
|
c.execute("delete from PRODUCTS where ID = ?;", [cveId])
|
||||||
|
c.execute("delete from NVD where ID = ?;", [cveId])
|
||||||
|
c.close()
|
||||||
return
|
return
|
||||||
cveDesc = ""
|
cveDesc = ""
|
||||||
for desc in elt['cve']['descriptions']:
|
for desc in elt['cve']['descriptions']:
|
||||||
|
|||||||
Reference in New Issue
Block a user