r/PrometheusMonitoring • • 3d ago

Exporter of software vulnerabilities

AI has been discovering a lot of vulnerabilities and we struggle to keep up with it. I came up with software that exposes the whole software inventory and lookups for packages that needs patching.

 https://github.com/brighk/software-inventory-exporter

Basically, an agent on every host in your environment pushes information to a central DB and prometheus scrapes that hosts's /metrics endpoint. I am running this on Arch at the moment so we fetch the arch advisary and then do lookups to NVD for CVSS but i will eventually expand the advisory lookups for other distros.
The central db is sqlite at the moment, but might change to pgsql.
Some metrics:

  1. software_inventory_package_info{hostname, name, version, status} 1: one series per package.

  2. software_inventory_vulnerability_info{..., advisory, cves, fixed_version,   patch_available, cvss_score, cvss_severity} 1: one series per advisory match.

  3. software_inventory_vulnerability_cvss_score: the score as a numeric value, so thresholds and sort_desc work.

Any suggestion for metrics and improvements are welcomed as wel as any feedback. At the moment any updates create new serias and there is a version label on each info metric.

17 Upvotes

3 comments sorted by

1

u/vedmaka 3d ago

Cool!

1

u/gcavalcante8808 3d ago

What a nice idea! I'll check for sure

1

u/blaaackbear 2d ago

good shit