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
{{ message }}
Repository navigation
BUG: Packages being created with inadequate PURL data #275
This problem actually is associated with multiple AboutCode projects, but the impact is most apparent to the DejaCode user. A recent import of an SBOM to a product in DejaCode resulted in the creation of 3 different package definitions for pkg:github/pypa/pip@20.3.1 each with a different download URL. A subsequent search for pip@20.3.1 turned up 2 older package definitions for pkg:pypi/pip@20.3.1 each with a different download URL. We don't have a problem of duplicate packages here, but the PURLs are not well defined and should contain additional details to differentiate them:
The 2 pypi packages should have a file_name qualifier.
The 3 github packages should have a subpath value.
This needs a bit of discussion and design, as I'm assuming you expect the following "missing" values to be automated:
The 2 pypi packages should have a file_name qualifier.
This would mean changing the purl2url library to always return qualifiers such as the file_name for pretty much all the generated PURLs. This will have quite an impact.
but when a PURL is provided in the SBOM, DejaCode imports it as-is and does not try to override the provided data, which could be an unexpected behavior.
Activity
DennisClark commentedon Mar 5, 2025
Further reference:
https://github.com/package-url/purl-spec/blob/main/PURL-TYPES.rst#pypi
and
https://github.com/package-url/purl-spec/blob/main/PURL-TYPES.rst#github
tdruez commentedon Apr 21, 2025
This needs a bit of discussion and design, as I'm assuming you expect the following "missing" values to be automated:
This would mean changing the
purl2urllibrary to always return qualifiers such as thefile_namefor pretty much all the generated PURLs. This will have quite an impact.Currently:
Expected?
The PURL data was likely imported "as provided" in the SBOMS. I'm not sure we want to tamper with the provided PURL values during SBOM import.
For those URLs, the
url2purllibrary already provide the subpath value:but when a PURL is provided in the SBOM, DejaCode imports it as-is and does not try to override the provided data, which could be an unexpected behavior.