-
Notifications
You must be signed in to change notification settings - Fork 573
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
False positive with pkg:rpm PURLs #1031
Comments
@edhinard above is an example of the difference in the PURL outputs We tried to reproduce this issue and found that both of those PURL were equally incorrect. They both showed the 2 vulnerabilities that were fixed in an earlier package. When using We'll take a look at the version parsing for the RPM cataloger to make this sure this is not stripped out in a future release of syft. |
I also moved this to syft since it's a purl generation on the SBOM not grype failing to match. |
I got a little more context about this problem since we discussed this yesterday: think this might actually be a Grype problem or both a Syft/Grype problem. The prefix of
In the short term @edhinard you can generate PURLs with an |
Given more discussion, I think this does end up being a Grype issue in the purl_provider that needs to properly handle the |
- To fix this, updated the purl_provider to have an epoch variable: - defaults to 0 - if epoch= set in the purl file it grabs that value - if epoch not in front of version it is added, version=epoch:version Closes anchore#1031 Signed-off-by: Shane Dell <shanedell100@gmail.com>
- To fix this, updated the purl_provider to have an epoch variable: - defaults to 0 - if epoch= set in the purl file it grabs that value - if epoch not in front of version it is added, version=epoch:version Closes anchore#1031 Signed-off-by: Shane Dell <shanedell100@gmail.com>
- To fix this, updated the purl_provider to have an epoch variable: - defaults to 0 - if epoch= set in the purl file it grabs that value - if epoch not in front of version it is added, version=epoch:version Closes anchore#1031 Signed-off-by: Shane Dell <shanedell100@gmail.com>
- To fix this, updated the purl_provider to have an epoch variable: - defaults to 0 - if epoch= set in the purl file it grabs that value - if epoch not in front of version it is added, version=epoch:version Closes anchore#1031 Signed-off-by: Shane Dell <shanedell100@gmail.com>
- To fix this, updated the purl_provider to have an epoch variable: - defaults to 0 - if epoch= set in the purl file it grabs that value - if epoch not in front of version it is added, version=epoch:version Closes anchore#1031 Signed-off-by: Shane Dell <shanedell100@gmail.com>
What happened
I used to have my SBOM done with
rpm -q
. I then change the result in a list of PURLs to feed grype with. The output ofgrype
is sometimes strange:In this example, the CVEs
CVE-2019-12749
andCVE-2020-12049
are fixed in an earlier version of the package.What you expected to happen
I expect to not have
CVE-2019-12749
andCVE-2020-12049
in the outputHow to reproduce it
The solution for me is to use
syft
which then gives satisfactory results.syft
can also be used to reproduce the problem as it is easy to extract PURLs from a JSON output with the commandjq -r '.artifacts[] | select(.name == "dbus") | .purl' syft.json
. We can check that whengrype
process thesyft
output the result is OK:Anything else we need to know?
the
syft
output I am working onthe SBOM with rpm:
The text was updated successfully, but these errors were encountered: