-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
trivy fails to scan apk-based containers without /etc/os-release matching alpine #1975
Comments
Thanks for the report. How can we identify Alpine version? |
Figuring out which security feeds apply to a given image is what the new /etc/secfixes.d stuff is supposed to address, but you could also figure it out from |
Thanks. I played with
We should take |
BTW, I was curious how Grype detects Alpine version and took a quick look at their source code. They try to find advisories from Alpine secfixes, but it cannot do since the distro is "busybox". I inspected the value in debugging and confirmed it was not "alpine". Then, they fall into CPE matching. If Grype shows some vulnerabilities in apk-based distributions, I guess they come from CPE, not Alpine secfixes. |
We haven't added secfixes.d feeds for the distroless images yet. It's coming soon. |
Oh, I see. I thought |
v0.26.0 is out. |
Description
Trivy fails to scan packages in the apk database unless it thinks the image is alpine-derived. This makes trivy incapable of scanning many containers based on APK distributions that do not use
alpine-base
package, such as containers based on Adelie Linux or Distroless Alpine.What did you expect to happen?
Trivy successfully scans packages in any container with a
/lib/apk/db/installed
file.What happened instead?
Trivy fails to detect the package content of the container when an Alpine
/etc/os-release
file is not present.Output of run with
-debug
:Output of
trivy -v
:Additional details (base image name, container registry info...):
An example is ghcr.io/distroless/busybox
The text was updated successfully, but these errors were encountered: