Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to match pkg/nix/* PURLs to Vulnerabilities? #135

Open
blitz opened this issue Sep 16, 2024 · 4 comments
Open

How to match pkg/nix/* PURLs to Vulnerabilities? #135

blitz opened this issue Sep 16, 2024 · 4 comments

Comments

@blitz
Copy link
Contributor

blitz commented Sep 16, 2024

Bombon generates Package URLs, such as these:

As far as I can see, there is no CVE data source for these PURLs. Is there any advice on how to handle these for vulnerability analysis?

@nikstur
Copy link
Owner

nikstur commented Sep 16, 2024

There's no official PURL spec yet for Nix. However, there is a draft PR open: package-url/purl-spec#314

Not super clear to me, how to use this for vulnerability analysis.

Happy to change the PURL if there is a good proposal.

See also how syft creates Nix PURLS: anchore/syft#1696

@0xf09f95b4
Copy link
Contributor

For a more short-term solution for vulnerability-scan-compatibility, would it be possible to "guess" CPEs instead, similar to how sbombix does it?

@blitz
Copy link
Contributor Author

blitz commented Sep 30, 2024

For a more short-term solution for vulnerability-scan-compatibility, would it be possible to "guess" CPEs instead, similar to how sbombix does it?

Correct CPEs would help, but sbomnix generates wrong CPEs. For glibc it generates cpe:2.3:a:glibc:glibc:2.39-52:*:*:*:*:*:*:* while actual CVEs are filed under cpe:2.3:a:gnu:glibc:2.37:*:*:*:*:*:*:* (note glibc vs gnu). Manually adding the correct CPE makes DependencyTrack find vulnerabilities, though.

I'm not sure whether the CPEs can be autogenerated, but adding the relevant fields to the meta attributes of derivations could be feasible.

@nikstur
Copy link
Owner

nikstur commented Oct 6, 2024

I'm not opposed to guessing, however, we could also guess PURLs as I don't see why CPEs would be better.

Adding a CPE or PURL meta field seems like the even better solution though. It's probably worth it to coordinate with the security tracker team on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants