Replies: 2 comments 4 replies
-
These are different packages. Are you trying to construct an SBOM based on a Python package directory? I don't think it can work reliably because of conda or private pypi indices. This is a dependency confusion problem. I don't think the same problem is likely with nix or brew. If you install something with either of those, the way that the software is installed is different than if you installed the same software with something else and you're not going to find brew packages in /nix/var/nix/db or nix packages in /opt/homebrew/Cellar. I guess it could happen if you incorporated the files from a nix or brew package into some sort of distribution (eg container image) and then processed that with a tool that just matches the file names. |
Beta Was this translation helpful? Give feedback.
-
I believe the correct Package URL for the package you encountered is:
and not simply:
The latter implicitly refers to the default PyPI index:
The As you're certainly aware, most vulnerability databases today support some form of PURL-equivalent—typically a combination of ecosystem and package name. The example you gave is an excellent illustration of why full, properly qualified PURLs should be supported natively in vulnerability databases. Note Introducing PURLs into vulnerability databases won't immediately resolve the problem of non-default repositories. We will also need to have a way for those non-default repositories to issue their own vulnerability advisories. Sonatype OSS Index is currently one of the few databases that support PURLs. Consider how Sonatype OSS Index (you need to register a free account to see the data) handles the package
Of course, some of those |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have hit an interesting issue with my projects. I am generating an SBOM using a combination of pip commands and private pip api. I arrive at a package named
anaconda-anon-usage
, so come up with a purl prefixpkg:pypi/anaconda-anon-usage
(because pip means pypi?).As per OSV, this package is a malware! However, since the package was originally installed with conda, it must have the type
pkg:conda/anaconda-anon-usage
and magically it is no longer a malware!How are people dealing with such type-based name collisions? I can imagine many such issues with
nix
,brew
, etc.Beta Was this translation helpful? Give feedback.
All reactions