Load .trivyignore (or ignore-policy) from ConfigMaps in target namespaces #1857
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
priority/backlog
Higher priority than priority/awaiting-more-evidence.
target/kubernetes
Issues relating to kubernetes cluster scanning
Discussed in #1847
Originally posted by maltemorgenstern February 8, 2024
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? 🙂
The text was updated successfully, but these errors were encountered: