Replies: 1 comment 2 replies
-
Hello @F-exf We currently have statuses for advisories. @knqyf263 wdyt? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Trivy uses the official Alpine Linux secdb to report on vulnerabilities affecting Alpine Linux. In the first paragraph of the Alpine Linux Security Issue Tracker page its mentioned that the secdb database only includes the Alpine fixes. The complete list of vulnerabilities being provided by Alpine Linux Security Issue Tracker.
Therefore, Trivy only reports fixed Alpine vulnerabilities.
Desired Behavior
Report "all vulnerabilities affecting" Alpine Linux components and not only the fixed one of the secdb.
As Alpine Linux Security Issue Tracker contains vulnerabilities which could potentially affect components reporting all those vulnerabilities would lead to many false positive. Example of such false positive is the CVE-2023-28118 on the snappy package. The CVE-2023-28118 affect the knplabs/snappy php component and not the google snappy which is provided by Alpine.
That being said, Trivy should at least report vulnerabilities for which there is a fix in other version of Alpine Linux (see the reproduction steps) and vulnerabilities for which there is no fix like CVE-2018-14628 affecting Samba.
Actual Behavior
Only vulnerabilities listed in the Alpine Linux fixed vulnerabilities database of in Alpine Linux secdb are reported by Trivy.
Reproduction Steps
As reported here, the
cups
component with versions below 2.4.7 is not fixed in Alpine 3.17 but is fixed in Alpine 3.18.Search the CVE-2023-4504 in the Apline 3.18 secdb and in the Apline 3.17 secdb confirm the vulnerability have been fixed in 3.18 and not in 3.17.
One can create an image based on Alpine 3.17 with cups version 2.4.2-r3 and scan using Trivy as follows:
Create the following Dockerfile named
Dockerfile.cups_3.17
Build the Dockerfile
docker build --tag LOCAL_REGISTRY_IP:LOCAL_REGISTRY_PORT/cups:3.17 -f Dockerfile.cups_3.17 .
Push the image to a registry running locally
Scan the image using Trivy latest version and database and acknowledge that there is no vulnerability reported.
Then one can create an image based on Alpine 3.18 with cups version 2.4.2-r3 and scan using Trivy as follows:
Dockerfile.cups_3.18
docker build --tag LOCAL_REGISTRY_IP:LOCAL_REGISTRY_PORT/cups:3.18 -f Dockerfile.cups_3.18 .
Operating System
WSL
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions