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
While there aren't any 'official' documents detailing what the PURL namespace field should be, it appears that the expected value for OpenSUSE Leap is just opensuse, and 'Leap 15.6' should be encoded into the distro qualifier (as it correctly is in the above-mentioned cases).
The supporting evidence I have found for the 'correct' namespace simply being opensuse is:
The one opensuse example PURL on the official PURL spec github page: pkg:rpm/opensuse/curl@7.56.1-1.1.?arch=i386&distro=opensuse-tumbleweed
The OpenSUSE PURL entries that currently exist on osv.dev such as this one: pkg:rpm/opensuse/libaom-devel-doc&distro=openSUSE%20Leap%2015.5
It appears that the Syft logic to generate PURLs for such packages simply uses the value of Distro.ID verbatim, with the exception of translating rhel to redhat. I believe that the most straightforward fix would be to add an additional check, something along the lines of "if the Distro.ID value starts with opensuse, set the namespace to be opensuse".
This same issue likely applies to other RPM-based systems (it all depends on how the Distro.ID values they use correspond to the expected PURL namespace values), but I haven't done any additional research yet into other distros.
What you expected to happen:
The PURL namespace value for all OpenSUSE packages should be opensuse.
Other RPM-based distros should be evaluated to determine if similar issues apply to them.
Steps to reproduce the issue:
Run Syft against the official opensuse/leap:15.6 docker image.
The text was updated successfully, but these errors were encountered:
What happened:
Packages created based on RPM database information (such as those from OpenSUSE) sometimes contain incorrect PURL namespace values.
For example, running Syft against the
opensuse/leap:15.6
official Docker image produces PURLs similar to the following:While there aren't any 'official' documents detailing what the PURL
namespace
field should be, it appears that the expected value for OpenSUSE Leap is justopensuse
, and 'Leap 15.6' should be encoded into thedistro
qualifier (as it correctly is in the above-mentioned cases).The supporting evidence I have found for the 'correct' namespace simply being
opensuse
is:pkg:rpm/opensuse/curl@7.56.1-1.1.?arch=i386&distro=opensuse-tumbleweed
pkg:rpm/opensuse/libaom-devel-doc&distro=openSUSE%20Leap%2015.5
It appears that the Syft logic to generate PURLs for such packages simply uses the value of
Distro.ID
verbatim, with the exception of translatingrhel
toredhat
. I believe that the most straightforward fix would be to add an additional check, something along the lines of "if theDistro.ID
value starts withopensuse
, set the namespace to beopensuse
".This same issue likely applies to other RPM-based systems (it all depends on how the
Distro.ID
values they use correspond to the expected PURLnamespace
values), but I haven't done any additional research yet into other distros.What you expected to happen:
The PURL
namespace
value for all OpenSUSE packages should beopensuse
.Other RPM-based distros should be evaluated to determine if similar issues apply to them.
Steps to reproduce the issue:
Run Syft against the official
opensuse/leap:15.6
docker image.The text was updated successfully, but these errors were encountered: