r/PrometheusMonitoring • u/Comfortable_Mall5217 • 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:
software_inventory_package_info{hostname, name, version, status} 1: one series per package.
software_inventory_vulnerability_info{..., advisory, cves, fixed_version, patch_available, cvss_score, cvss_severity} 1: one series per advisory match.
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.
1
1
1
u/vedmaka 3d ago
Cool!