Grype vulnerability matcher for Bomly.
It matches packages in a Bomly scan against the Grype vulnerability database, attaching advisories with severity, CVSS, EPSS, KEV, CWE, and fix data.
Already inside the Bomly CLI. This matcher ships embedded in the
bomlybinary as the built-ingrypematcher — you do not need to install this plugin to use Grype enrichment. This repository is the matcher's home as a standalone module: the Bomly CLI consumes the same code in-process, and the plugin binary serves it to hosts that run matchers as managed subprocesses.
- Plugin id / descriptor name:
grype - Kind: matcher
- Module path:
github.com/bomly-dev/bomly-plugin-grype-matcher
Two build-tag variants exist, mirroring the Bomly CLI's full and lite builds:
- builtin (default, no tags): vendors the Grype Go libraries and matches in-process against a locally managed copy of the Grype DB.
- external (
-tags bomly_external_grype): shells out to agrypeCLI binary found onPATH, feeding it the dependency graph as SPDX JSON on stdin. Requires no vendored DB but does require the binary.
CI tests both variants. Release archives ship the builtin variant.
This matcher performs network calls only during enrichment (bomly scan --enrich), never during audit-only runs:
- builtin:
https://grype.anchore.io/databases(plus the archive URL it returns) to download and refresh the vulnerability database, stored under the OS cache directory (grype/db) ordb_dir. - external: whatever the installed
grypebinary itself does (typically the same database service).
Embedded execution is configured by the Bomly CLI (it constructs
Matcher{Logger: ...} directly). Managed execution reads a JSON block under
plugins.matchers.grype:
| Key | Type | Default | Meaning |
|---|---|---|---|
db_dir |
string | OS cache dir + /grype/db |
Grype vulnerability DB directory (builtin variant) |
This matcher deliberately does not advertise package-updates-v1. It
merges a new advisory into an existing vulnerability with the same
(Source, ID) field by field — filling empty scalars and unioning CVSS
scores, references, aliases, EPSS, CWE, and fix data. Package.MergeFrom
cannot express that: when a delta carries a vulnerability whose (Source, ID)
already exists on the target package, it only fills reachability data and
drops every other enrichment. Until the host merge grows field-level
vulnerability merging, only the in-place registry path preserves this
matcher's semantics. TestDescriptorDoesNotAdvertisePackageUpdates pins the
decision.
make test # builtin variant
go test -tags bomly_external_grype ./... # external variant
make build # build bin/bomly-plugin-grype-matcher