prometheus-safety-exporter

by Wiremind

Helm chartv0.6.0App 0.7.0Verified publisher

A Helm chart for Kubernetes

About this chart

Safety Prometheus Exporter Helm Chart

What it is

Safety CLI is a Python dependency vulnerability scanner designed to enhance software supply chain security by detecting packages with known vulnerabilities and malicious packages in local development environments, CI/CD, and production systems. Safety CLI can be deployed in minutes and provides clear, actionable recommendations for remediation of detected vulnerabilities.

Please refer to https://github.com/pyupio/safety.

This Helm Chart allows to convert safety output to prometheus metrics.

It requires your python container image containing requirements.txt and safety >= 3.0.0. This must be set in values.yaml.

Note: it means that requirements.txt should not be ignored in .dockerignore file.

It exposes a new metric named safety_vulnerabilities_severity.

Internally, this is roughly a glue between:

  • Safety ran once per day or per deployment
  • A simple HTTP server (currently python SimpleHTTPServer)
  • json_exporter reading the JSON file generated by Safety.

You can find in grafana-dashboard directory a reference Grafana dashboard to be used with Prometheus Operator.

Deploy prometheus-safety-exporter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has prometheus-safety-exporter on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartprometheus-safety-exporter is pinned at v0.6.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply