How melmorabity/trivy-plugin-epss works
This small Python Trivy plugin accepts scan JSON on stdin, refreshes a local EPSS cache when missing or older than 24 hours, parses the EPSS CSV, adds matching scores and metadata to vulnerabilities, and emits JSON to stdout or a file. The README documents Trivy plugin invocation, configurable data URL and cache directory, and JSON-only input. The graph reflects the sampled epss.py behavior and README; internal details outside the excerpts are not inferred.
Main entry points: epss.py CLI entry point
Components 9
Plugin runtime
- CLI entry point
epss.py - Scan JSON input
epss.py - Vulnerability enrichment
epss.py - Updated JSON output
epss.py
EPSS data
- Cache refresh
epss.py - EPSS CSV parser
epss.py - EPSS CSV cache
Other components
- Trivy / caller
- EPSS dataset service
Connections 11
- Trivy / caller → CLI entry point: invokes plugin
README.md - CLI entry point → Scan JSON input: reads stdin
epss.py - CLI entry point → Cache refresh: refreshes cache
epss.py - Cache refresh → EPSS dataset service: downloads gzip
epss.py - Cache refresh → EPSS CSV cache: writes CSV
epss.py - CLI entry point → EPSS CSV parser: loads cache
tests.py - EPSS CSV cache → EPSS CSV parser: reads CSV
epss.py - CLI entry point → Vulnerability enrichment: passes EPSS data
tests.py - Scan JSON input → Vulnerability enrichment: provides scan JSON
epss.py - Vulnerability enrichment → Updated JSON output: writes enriched JSON
epss.py - CLI entry point → Updated JSON output: selects output
tests.py