transformer: include CPE fields from meta, including possibleCPEs as evidence#172
Merged
nikstur merged 2 commits intonikstur:mainfrom Oct 1, 2025
Merged
transformer: include CPE fields from meta, including possibleCPEs as evidence#172nikstur merged 2 commits intonikstur:mainfrom
nikstur merged 2 commits intonikstur:mainfrom
Conversation
Contributor
Author
|
The failed pipeline was probably caused by the nixpkgs update. That update seems to have changed some stuff about nixfmt, cargo etc., leading to broken checks. Should probably be fixed in a separate PR. |
nikstur
reviewed
Oct 1, 2025
Owner
|
@0xf09f95b4 since you allowed maintainers the freedom to edit the changes I took the freedom to do so:
|
Owner
|
Thank you this is very nice! I wouldn't have thought of including the possibleCPEs as evidence but I think this is great. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the inclusion of "CPE" fields in current nixos unstable based on #150.
The CPE fields were implemented by adding an
identifierfield in themetafield of derivations. This field can includecpeas a "definitive" CPE identifier, as well aspossibleCPEsas a list of possibly fitting CPE identifiers.This PR implements the following:
Identifiers,CPEas structs to deserialize theidentifiersfield.cpeexists, addcpeto the SBOM component. Only one CPE is allowed here in the CycloneDX spec.possibleCPEsexist, add anevidencefield to the SBOM, with an entry for each possible CPE. Each entry get's a proportional "Confidence" score, based on the number ofpossibleCPEsin the metadata.We could make using "evidence" optional.
In an SBOM this would look like:
With a definitive CPE field:
While with evidence: