Files
Christoph Reiter da03cb0a01 sbom: fix component name values for purl components
In case of components with purl the name has to match the name of
the project as encoded in the prul (for whatever reason) or otherwise
grype will not find any CVEs for them.

Currently we are using the name match pkgbase, so we can connect
vulns to packages in msys2-web.

With this no longer working add a "msys2:pkgbase" property to the SBOM.
But since grype throws out everything non-essential from the input SBOM
add a command that merges the property from the source to the enriched
SBOM. And since we can't even have an ID to connect components there
match by comparing various fields (name, version, cpe, purl).

This means the new process is like this:

* Generate SBOM with "sbom create"
* Run grype to generate cdx SBOM with VEX
* Add properties to grype SBOM via "sbom merge"
* In msys2-web instead of taking "name" look for a property called "msys2:pkgbase"

While at it also use the CPE project name for the SBOM component name, and
remove the version from the CPE, since grype doesn't seem to use it, and
we avoid having to escape things in the CPE.

And also try to normalize versions a bit.
2024-12-23 14:13:52 +01:00
..
2023-04-11 07:42:01 +02:00
2023-04-11 07:42:01 +02:00