False positives on Bitnami packages due to versions with revisions #5622
Closed
juan131
started this conversation in
False Detection
Replies: 2 comments 3 replies
-
In the branch below on my fork, I implemented a possible solution for this based on a new "comparer" for Bitnami packages: This is based on some changes I introduced at a go-version module fork, see: |
Beta Was this translation helpful? Give feedback.
3 replies
-
I can confirm this issue is solved on 0.48.1 that includes the fix below: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
IDs
none
Description
Bitnami packages use semver for versioning. This versioning is built based on the upstream project's versioning appending a revision (
-X
) to reflect changes on Bitnami packaging (e.g. if the compilation recipe used to build binaries changed).For instance, if we inspect this Dockerfile used to build
bitnami/apache
container, we can see the versioning for "apache" package is2.4.58-1
, where-1
indicates the revision.However, according to the semver spec, these revision are considered pre-releases and this is problematic since the semver package used by Trivy for comparing versions will consider any
x.y.z-R
version lower thanx.y.z
. And, reverting this versioning would have a high cost on Bitnami systems.Currently, this is not a problem given both vulnerabilities listed at Bitnami Vulnerability Database and SPDX files shipped on Bitnami containers ignore revisions when listing packages. That said, we (Bitnami team) would like to start using revisions on both the vulnerability feed and SBOM(s) since there are use cases where a CVE can be fixed at a specific revision (e.g. using certain compilation flags to mitigate it).
Let's use this issue to discuss possible alternatives to avoid false positives detections if revisions are used.
Reproduction Steps
$ trivy -q sbom gdal.spdx
shows no vulnerabilities.$ trivy -q sbom gdal.spdx
again:Target
Container Image or SBOM
Scanner
Vulnerability
Version
Checklist
-f json
that shows data sources and confirmed that the security advisory in data sources was correctBeta Was this translation helpful? Give feedback.
All reactions