From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Daniel Lang <dalang@gmx.at>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4 3/6] support/scripts/nvd_api_v2.py: new helper class
Date: Wed, 8 Nov 2023 22:55:50 +0100 [thread overview]
Message-ID: <20231108225550.4555e0b7@windsurf> (raw)
In-Reply-To: <20230901192719.102415-3-dalang@gmx.at>
Hello Daniel,
On Fri, 1 Sep 2023 21:27:11 +0200
Daniel Lang <dalang@gmx.at> wrote:
> The current NVD data feeds used for CVE and CPE checking will be retired
> by 2023-12-05 [0]. Both have to be switched to the new v2 API. Since
> fetching data from both sources workes the same, a common base class is
> used to handle the API interaction.
> With the new API JSON pages are downloaded, meaning that we have to come
> up with a storage solution ourselves. Therefore nvd_api_v2.py manages a
> generic set of methods to initialize and update a sqlite database.
>
> [0]: https://nvd.nist.gov/General/News/change-timeline
>
> Signed-off-by: Daniel Lang <dalang@gmx.at>
Thanks for working into this. I wanted to merge this, but taking a
fresh look at this, I don't quite understand the SW design choices
you've made when it comes to splitting between the NVD_API class and
the CVE_API class.
The NVD_API class implements
- An actual init_db_meta() method
- A dummy init_db() method
- A dummy save_to_db() method
- An actual download() method
- An actual check_for_updates() method
Then the CVE_API class inherits from NVD_API, which provides the actual
implementation of init_db(), save_to_db() among others.
What is the reasoning behind this? One could think that the NVD_API
class was only related to calling the NVD HTTP API, but it does have
knowledge of the local sqlite database.
So I'm really not clear on this design. Could you provide some details?
Now I see that the CPE_API class also inherits from NVD_API, but I'm
still confused.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-11-08 21:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-01 19:27 [Buildroot] [PATCH v4 1/6] support/scripts/pkg-stats: ignore more makefiles that aren't packages Daniel Lang
2023-09-01 19:27 ` [Buildroot] [PATCH v4 2/6] support/scripts/pkg-stats: check all files for warnings Daniel Lang
2023-11-08 21:42 ` Thomas Petazzoni via buildroot
2023-09-01 19:27 ` [Buildroot] [PATCH v4 3/6] support/scripts/nvd_api_v2.py: new helper class Daniel Lang
2023-11-08 21:55 ` Thomas Petazzoni via buildroot [this message]
2023-12-31 10:30 ` Daniel Lang via buildroot
2023-09-01 19:27 ` [Buildroot] [PATCH v4 4/6] support/scripts/cve.py: switch to NVD API v2 Daniel Lang
2024-01-12 19:39 ` Arnout Vandecappelle via buildroot
2024-01-28 19:40 ` Daniel Lang via buildroot
2024-01-30 19:53 ` Arnout Vandecappelle via buildroot
2023-09-01 19:27 ` [Buildroot] [PATCH v4 5/6] support/scripts/pkg-stats: switch CPEs " Daniel Lang
2023-09-01 19:27 ` [Buildroot] [PATCH v4 6/6] support/scripts/pkg-stats: Only match CPE vendor and product Daniel Lang
2023-11-08 21:42 ` [Buildroot] [PATCH v4 1/6] support/scripts/pkg-stats: ignore more makefiles that aren't packages Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231108225550.4555e0b7@windsurf \
--to=buildroot@buildroot.org \
--cc=dalang@gmx.at \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox