-
Notifications
You must be signed in to change notification settings - Fork 213
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-operator has stopped exposing image_digest
label in metric trivy_image_vulnerabilities
#1763
Comments
@d-mankowski-synerise nothing has been changed in this area I'll have a look anyway to double check |
@chen-keinan IMO the problem is not related to metrics, but to creation of vulnerability reports - the |
@d-mankowski-synerise I do not think that digest info is always available for trivy. this is how digest info is set |
This wasn't the case with operator |
wired its look like the logic is the same for 0.16.4 |
It was ok in 0.16.4 and every version above had the same issue, which me and @d-mankowski-synerise decided to nail down now with 0.18.1 version. So my guess it that one of commits for 0.17.0 version probably by some mistake broke logic for digests. |
I will rollback to 0.16.4 with the same Trivy version (0.48.2) to make sure it is not related to Trivy itself. With 0.16.4 we used |
@d-mankowski-synerise do you have a specific public image which produce |
this query: returns the following:
which gets even weirder - metrics regarding vulnerabilities of image |
maybe there is a bug where one metric override the other? |
IMO 2 candidates for introduction of such bug would be 2 changes in 0.17.0 related to metrics - addition of OS Info metrics and addition of clusterCompliance_info metrics. |
@d-mankowski-synerise @LesSyner thanks I'll try to reproduce it and fix it |
@d-mankowski-synerise are you sure its duplicate metric , should be on metric for each severity , example:
can you please share the full metric for |
@chen-keinan yup, I am sure:
where |
I see you are using the labels |
yup
|
@d-mankowski-synerise I do not this the error you mention related to missing digest. |
@d-mankowski-synerise looking again at the example of duplicate metric you put above, if you take a look at the resource name you'll see its has a different name meaning its not the same resource, could be that the data is coming from an old report before upgrade:
let me know wdyt |
What steps did you take and what happened:
After upgrading trivy-operator to the latest version (
0.18.1
, chart version:0.20.1
) from0.16.4
, labelimage_digest
is missing in metrictrivy_image_vulnerabilities
(deployment of a new version was around midnight):This is problematic, because we can have, for example, two images
alpine:latest
, and one can be a year old, while the other - a recent one. And this makes dashboards regarding CVEs in Grafana difficult to maintain, since there is no convenient way to group images by some label.I haven't seen this change mentioned anywhere in the changelog, hence this should be considered as a bug.
The problem, I think, is caused by the lack of
digest
field invulnerabilityreports
. For example, report created by operator 0.16.4:while one created by
0.18.1
:What did you expect to happen:
trivy_image_vulnerabilities
exposesimage_digest
labelAnything else you would like to add:
I haven't made any changes to the config when upgrading:
Environment:
trivy-operator version
): 0.18.1kubectl version
): 1.27.7The text was updated successfully, but these errors were encountered: