Load .trivyignore (or ignore-policy) from ConfigMaps in target namespaces #1847
Closed
maltemorgenstern
started this conversation in
Development
Replies: 2 comments 2 replies
-
@maltemorgenstern sound interesting use case, today we already has metric separation for teams by resource label maybe it will be more flexible to support ignorefile by resource label, wdyt ? |
Beta Was this translation helpful? Give feedback.
1 reply
-
@maltemorgenstern please convert this discussion to issue and we can discuss implementation there, wdyt? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
I started to play around with the
trivy-operator
and wanted to get your thoughts on an issue/question.Current situation
We have a kubernets cluster managed by a platform team. It contains different shared services (logging, metrics, gitops, ...) and can be used by dev teams. They can request their own namespace - and start deploying their applications (pods).
Adding the
trivy-operator
as a managed service would increase the cluster security while reducing efforts for our developers. Trivy would be managed by the platform team and automatically scan new workloads deployed by the teams - and they would not need to worry about how to scan images.The findings could be passed to each team using a grafana dashboard - and even alerting on new findings would be possible out of the box 🚀
The problem
But - as always - there will be false-positive findings that need to be suppressed (in order to actual spot critical vulnerabilities). As far as I can tell this can be done in two ways:
.trivyignore
file that contains CVEs - but would match all workloads in the clustertrivy.ignorePolicy
rego rules - that can be scoped to namespaces or even specific workloadsIn both scenarios the config would have to be placed in the
trivy-operator-trivy-config
ConfigMap - inside the operator namespace.This would mean that the platform team would have to maintain all ignore configs - for each team and each of their workloads, which would be a lot of work.
I think it would be a great feature to allow teams to configure their own
.trivyignore
(ortrivy.ignorePolicy
) inside a ConfigMap deployed to their namespace. This way the teams could manage findings themselves and would not depend on the platform team to maintain a central config.This would require the
trivy-operator
to read multiple ConfigMaps from other namespaces and merge the configs before applying them.What are your thoughts about this? 🙂
Beta Was this translation helpful? Give feedback.
All reactions