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
Some findings in the vulnerabilities section of generated CycloneDX SBOMs have a bom-ref of NaN. This looks to be caused by a difference in derivation parsing between sbomnix and vulnix
I think a fix would either be to remove vulnix as a scanner and rely on grype's and osv's SBOM scans or an update to vulnix parsing to match this projects parsing. Let me know what you think 😄
The text was updated successfully, but these errors were encountered:
andrew-myer
changed the title
NaNs in bom-ref for findings in vulnerabilities section in CycloneDX SBOMs
sbomnix - NaNs in bom-ref for findings in vulnerabilities section in CycloneDX SBOMs
Oct 17, 2024
andrew-myer
changed the title
sbomnix - NaNs in bom-ref for findings in vulnerabilities section in CycloneDX SBOMs
sbomnix: NaNs in bom-ref for findings in vulnerabilities section in CycloneDX SBOMs
Oct 17, 2024
I would like to fix this in vulnix, but I assume it will take some time to get it fixed there.
Maybe we merge your fix in #133 first. I could take care of pushing the fix to vulnix, then re-enable the vulnix scan on the cdx sbom vulnerabilities section once the fix is available in the vulnix upstream.
Some findings in the
vulnerabilities
section of generated CycloneDX SBOMs have abom-ref
ofNaN
. This looks to be caused by a difference in derivation parsing betweensbomnix
andvulnix
vulnix
parses thepname
andversion
of a package by splitting thename
of a derivationhttps://github.com/nix-community/vulnix/blob/master/src/vulnix/derivation.py#L71
https://github.com/nix-community/vulnix/blob/master/src/vulnix/derivation.py#L20-L27
sbomnix
reads thepname
andversion
values from a derivation which seems more correcthttps://github.com/tiiuae/sbomnix/blob/main/src/sbomnix/derivation.py#L67-L73
The difference in parsing for
pname
andversion
causesNaN
s when the results are merged if thepname
andversion
don't match.https://github.com/tiiuae/sbomnix/blob/main/src/sbomnix/sbomdb.py#L243-L249
I think a fix would either be to remove
vulnix
as a scanner and rely ongrype
's andosv
's SBOM scans or an update tovulnix
parsing to match this projects parsing. Let me know what you think 😄The text was updated successfully, but these errors were encountered: