From: Benjamin Robin <benjamin.robin@bootlin.com>
To: openembedded-core@lists.openembedded.org, Paul Barker <paul@pbarker.dev>
Cc: ross.burton@arm.com, peter.marko@siemens.com,
jpewhacker@gmail.com, olivier.benjamin@bootlin.com,
antonin.godard@bootlin.com, mathieu.dubois-briand@bootlin.com,
thomas.petazzoni@bootlin.com
Subject: Re: [OE-core] [PATCH v3 6/6] sbom-cve-check.bbclass: Add class for post-build CVE analysis
Date: Mon, 09 Mar 2026 13:17:33 +0100 [thread overview]
Message-ID: <3036686.e9J7NaK4W3@brobin-bootlin> (raw)
In-Reply-To: <1922651.atdPhlSkOF@brobin-bootlin>
Hello Paul,
On Thursday, March 5, 2026 at 5:22 PM, Benjamin Robin wrote:
> On Thursday, March 5, 2026 at 2:47 PM, Paul Barker wrote:
> > We would prefer not to override do_fetch for sbom-cve-check-update-*.bb.
> > We should be able to use the standard git fetcher here, with a hardcoded
> > SRCREV to allow offline parsing to succeed. A config fragment should
> > then be defined which enables the sbom-cve-check bbclass and sets the
> > srcrevs for the update recipes to ${AUTOREV}.
>
> Honestly, I've been considering the best approach for fetching the CVE
> databases. While using the Yocto internal fetcher is indeed cleaner, it
> raises a few questions:
>
> - Is it possible to implement updates at fixed intervals (e.g., every X
> hours)? If so, how could this be done?
> If this isn't feasible, it's not a major concern, having the latest
> updates is more important than performance.
>
> - Would there be any objections to updating the `RM_WORK_EXCLUDE`
> variable within the database update recipes to exclude the recipe
> itself? Unpacking the CVE database is quite slow, especially given its
> size (~3GB).
>
> - By retaining the unpacked databases, we could store the database index
> in the `$workdir`. This would avoid the need to recompute the database
> index each time, which is something we'd prefer to avoid.
>
> - However, it feels questionable to use an extracted Git repository from
> another recipe: My whole (new) idea on how to fix this looks wrong.
> I checked how `cve-update-nvd2-native.bb` handles this, the database
> is moved to the download directory. But if we do this, the database
> will still be unpacked for every analysis, which we try to avoid.
>
> My primary aim is to avoid extracting the database repeatedly for every
> build, and to be able to keep the database index somewhere.
I am proposing two solutions to address this issue:
- First RFC [1]: A refined version of the original solution using a
custom `do_fetch`. While performance on an NFS-mounted download directory
may not be optimal, this approach now includes a configurable variable to
specify the CVE database storage location.
- Second RFC [2]: An alternative approach leveraging BitBake’s internal
fetcher.
I prefer the first solution, as it appears cleaner to me. It supports
shallow cloning (depth of 1) and allows explicit control over update
intervals.
Once feedback is received, I will prepare a formal patch based on the
chosen solution.
> > Running sbom-cve-check offline should be supported, but manual config
> > may be needed to set an appropriate srcrev. We should provide an example
> > of this in the docs.
For fully offline use of `sbom-cve-check`, there is already a commit in
the main branch that introduces the `--disable-auto-updates` flag. I
plan to release this update for `sbom-cve-check` soon (within one or two
weeks) to integrate it into the OE-core class. If this timeline is not OK,
please let me know.
> I plan to write documentation (in yocto-docs) as soon as this series is
> merged :)
>
> > We should also be able to avoid setting do_sbom_cve_check[nostamp]. With
> > dependencies set correctly, this should only re-run if the image changes
> > or the cve database has been updated.
>
> I am going to fix that (at least try, see discussion above)!
[1] https://lore.kernel.org/r/20260309-add-sbom-cve-check-p2-v1-0-72a0771e1f12@bootlin.com
[2] https://lore.kernel.org/r/20260309-add-sbom-cve-check-p2b-v1-0-09165cddfcf1@bootlin.com
Best regards,
--
Benjamin Robin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2026-03-09 12:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 17:01 [PATCH v3 0/6] sbom-cve-check: add CVE analysis tool and class Benjamin Robin
2026-02-26 17:01 ` [PATCH v3 1/6] maintainers.inc: Sort list in alphabetical order Benjamin Robin
2026-02-26 17:01 ` [PATCH v3 2/6] python3-shacl2code: add recipe Benjamin Robin
2026-02-26 17:01 ` [PATCH v3 3/6] python3-hatch-build-scripts: " Benjamin Robin
2026-02-26 17:01 ` [PATCH v3 4/6] python3-spdx-python-model: " Benjamin Robin
2026-02-26 17:01 ` [PATCH v3 5/6] sbom-cve-check: " Benjamin Robin
2026-02-26 17:01 ` [PATCH v3 6/6] sbom-cve-check.bbclass: Add class for post-build CVE analysis Benjamin Robin
2026-03-05 13:47 ` [OE-core] " Paul Barker
2026-03-05 16:22 ` Benjamin Robin
2026-03-09 12:17 ` Benjamin Robin [this message]
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=3036686.e9J7NaK4W3@brobin-bootlin \
--to=benjamin.robin@bootlin.com \
--cc=antonin.godard@bootlin.com \
--cc=jpewhacker@gmail.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=olivier.benjamin@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul@pbarker.dev \
--cc=peter.marko@siemens.com \
--cc=ross.burton@arm.com \
--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