Skip to content
Commit 53d0cc1e authored by Ross Burton's avatar Ross Burton Committed by Richard Purdie
Browse files

cve-check: fetch CVE data once at a time instead of in a single call



This code used to construct a single SQL statement that fetched the NVD data for
every CVE requested.  For recipes such as the kernel where there are over 2000
CVEs to report this can hit the variable count limit and the query fails with
"sqlite3.OperationalError: too many SQL variables".  The default limit is 999
variables, but some distributions such as Debian set the default to 250000.

As the NVD table has an index on the ID column, whilst requesting the data
CVE-by-CVE is five times slower when working with 2000 CVEs the absolute time
different is insignificant: 0.05s verses 0.01s on my machine.

Signed-off-by: default avatarRoss Burton <ross.burton@intel.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent f19253cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment