A Prometheus Exporter that collects all vulnerabilities detected by aquasecurity/trivy in kubernetes clusters.
Inspirated by kube-trivy-expoter.
This exporter is written on top of cobra library and trivy cli.
- Kubernetes cluster
- Install the exporter using helm to setup the RBAC
- Prometheus
- Grafana
- Access the helm repository here for more details abount installation process.
helm repo add helm-trivy-vulnerability-exporter https://lucasafonsokremer.github.io/helm-trivy-vulnerability-exporter
helm upgrade -i trivyvulnerabilityexporter helm-trivy-vulnerability-exporter/trivyvulnerabilityexporter
helm upgrade -i trivyvulnerabilityexporter helm-trivy-vulnerability-exporter/trivyvulnerabilityexporter -f values-custom.yaml
Image Scan scans for vulnerabilities in container images of workloads deployed in kubernetes.
trivy_image_vulnerabilities
Image Scan scans vulnerabilities of the nodes of kuberntes cluster.
trivy_node_vulnerabilities
- You could upgrade trivy version on the Dockerfile:
ENV TRIVYVERSION=v0.22.0
- After that, import the new trivy library:
go get github.com/aquasecurity/[email protected]
go mod tidy
- Create liveness and readiness probes
- Support different namespace
- Add tolerations
- Bump golang version
- Bump trivy version
- Create a makefile for development environment
- Improve the unit tests