Skip to contentSkip to conversation

] cve-update-nvd2-native: new CVE database fetcher

RFC In review Marta Rybczynska 2 participants 4 messages Feb 24, 2023 – Mar 14, 2023 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

RFC 1/1 ] cve-update-nvd2-native: new CVE database fetcher

Add new fetcher for the NVD database using the 2.0 API [1]. The implementation changes as little as possible, keeping the current database format (but using a different database file for the transition period), with a notable exception of not using the META table.

Minor changes that could be visible:
- the database starts in 1999 instead of 2002
- the complete fetch is longer (30 minutes typically)

[1] https://nvd.nist.gov/developers/vulnerabilities

---
 meta/classes/cve-check.bbclass                |   4 +-
 .../meta/cve-update-nvd2-native.bb            | 300 ++++++++++++++++++
 2 files changed, 302 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/meta/cve-update-nvd2-native.bb
meta/classes/cve-check.bbclass +2 -2
index 41fdf8363f..1f16683c32 100644
@@ -32,7 +32,7 @@ CVE_PRODUCT ??= "${BPN}"
 CVE_VERSION ??= "${PV}"
 
 CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
-CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_1.1.db"
+CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2.db"
 CVE_CHECK_DB_FILE_LOCK ?= "${CVE_CHECK_DB_FILE}.lock"
 
 CVE_CHECK_LOG ?= "${T}/cve.log"
@@ -161,7 +161,7 @@ python do_cve_check () {
 }
 
 addtask cve_check before do_build
-do_cve_check[depends] = "cve-update-db-native:do_fetch"
+do_cve_check[depends] = "cve-update-nvd2-native:do_fetch"
 do_cve_check[nostamp] = "1"
 
 python cve_check_cleanup () {
meta/recipes-core/meta/cve-update-nvd2-native.bb new file +300 -0

300 lines not on this page · raw message

Signature · 1 line
2.35.1
#1 lore raw
Quoted 10 lines · Marta Rybczynska

Add new fetcher for the NVD database using the 2.0 API [1]. The implementation changes as little as possible, keeping the current database format (but using a different database file for the transition period), with a notable exception of not using the META table.

Minor changes that could be visible:
- the database starts in 1999 instead of 2002
- the complete fetch is longer (30 minutes typically)

Tests VERY MUCH welcome, I have found some bugs today still.

Docs (with a mandatory note according to the terms of use) will come with v2.

For the swap between v1 and v2 I'm not sure what will be the best solution:
- a configuration option allows to migrate when the user decides to do so
- ... but does not protect the day they disconnect the feed

What do you think?

Kind regards,
Marta

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 17 lines · Marta Rybczynska via lists.openembedded.org
Quoted 10 lines · Marta Rybczynska

Add new fetcher for the NVD database using the 2.0 API [1]. The implementation changes as little as possible, keeping the current database format (but using a different database file for the transition period), with a notable exception of not using the META table.

Minor changes that could be visible:
- the database starts in 1999 instead of 2002
- the complete fetch is longer (30 minutes typically)

Tests VERY MUCH welcome, I have found some bugs today still.

Quoted 10 lines

Docs (with a mandatory note according to the terms of use) will come with v2.

For the swap between v1 and v2 I'm not sure what will be the best solution:
- a configuration option allows to migrate when the user decides to do so
- ... but does not protect the day they disconnect the feed

What do you think?

Still interested in your opinions on this. Currently I'm investigating some differences between
both fetchers.

Kind regards,
Marta

#4 lore raw
Quoted 15 lines · Marta Rybczynska

On Fri, Feb 24, 2023 at 5:16 PM Marta Rybczynska <[email protected]> wrote:
Add new fetcher for the NVD database using the 2.0 API [1].
The implementation changes as little as possible, keeping the current database format (but using a different database file for the transition period), with a notable exception of not using the META table.

Minor changes that could be visible:
- the database starts in 1999 instead of 2002
- the complete fetch is longer (30 minutes typically)

Tests VERY MUCH welcome, I have found some bugs today still.

Docs (with a mandatory note according to the terms of use) will come with v2.

Quoted 8 lines

For the swap between v1 and v2 I'm not sure what will be the best solution:
- a configuration option allows to migrate when the user decides to do so
- ... but does not protect the day they disconnect the feed What do you think?

Still interested in your opinions on this. Currently I'm investigating some differences between both fetchers.

Sorry, I utterly failed to actually reply.

I did some basic code review and had some tweaks, and grumbled at the performance of NIST’s servers… I’m in meetings for the rest of today but I’ll actually write my reply tomorrow.

Ross