Open drupol opened 8 months ago
- Isn't a patch by definition a buildtime input because it modifies the source code?
From that perspective, that's true. However, it would be nice to have this information in the SBOM.
- We'd probably need to include the graph information in the SBOM. Cyclonedx already can do this. The question is how we can extract this nicely from Nix.
What kind of graph, do you have an example ?
Hello,
I'm exploring SBOM generation with Nix, using this tool. I've encountered an issue where patches specified in the Nix flake do not appear in the generated SBOM. Below is a flake example demonstrating the issue. This flake aims to generate an SBOM that should include at least two patches; however, these patches are missing from the final SBOM file.
To reproduce this issue, execute
nix build .#sbom
(note: PHP compilation may take 5 to 10 minutes). For convenience, I have already generated the SBOM, which you can download here: sbom.json.Interestingly, when I add the flag
includeBuildtimeDependencies = true;
, the patches appear in the SBOM. The updated SBOM can be downloaded here: sbom.json.Taking Composer as an example, the current version of Nixpkgs applies a patch for CVE-2024-24821, which can be found at this link. This patch is included in the SBOM as follows:
However, the SBOM does not clearly indicate that the patch is associated with Composer.
I have two questions: