Replies: 2 comments 2 replies
-
|
Since it's another OS, people should not expect Trivy to work with that. Adding support for an OS that is not listed in https://trivy.dev/latest/docs/coverage/os/ should be a feature request. |
Beta Was this translation helpful? Give feedback.
-
|
Is there any way to tell trivy to treat Alpaquita as Alpine (3.23)? I tried to play around with the "distro" scanner option. But it seems like this can only be applied, if the OS is detected in the first place? trivy/pkg/scan/local/service.go Line 88 in a75a468 @knqyf263 Is the "--distro" flag only meat to overrite the version and not the family? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The image liberica-runtime-container is based on Alpine Linux and can be used as secured base image for Java based applications. Currently trivy neither recognizes the underlying Alpine OS not the installed packages (APK).
Desired Behavior
trivy should recognize an OS derived from Alpine Linux. This could be achieved by falling back to
ID_LIKEwhen parsing/etc/os-releaseand theID-entry is unknown.content of
/etc/os-releaseAdditionally the installed APK packages are not recognized, because in this image the APK db is located at
/var/lib/apk/dbwhich is not scanned by trivy. This path could be added to the scanned paths inapk.go.For testing porpose I modified the
os-releasesfile and copied the APK database/usr/lib/apk. Now all packages are identified correctly (verified by-f json --list-all-pkgs). The contained vulnerabilities are still not detected because of the OS version differing from an official Alpine version. I do not know if there is any way around this problem.Actual Behavior
/var/lib/apk/dbReproduction Steps
Target
Container Image
Scanner
Vulnerability
Output Format
Table
Mode
Standalone
Debug Output
Operating System
Microsoft Windows 11 24H2
Version
Checklist
trivy clean --allBeta Was this translation helpful? Give feedback.
All reactions