You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Is it expected behavior for patches not to appear in the SBOM when build dependencies are not included?
How can we enhance the representation of patches in the SBOM when including buildtime dependencies to clearly indicate their association with specific derivations?
The text was updated successfully, but these errors were encountered:
Isn't a patch by definition a buildtime input because it modifies the source code?
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.
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.
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:
The text was updated successfully, but these errors were encountered: