feat(scanner): match bypasses and merge findings across advisory aliases

Scanners report one advisory under different ids, such as a GHSA id from
OSV and the CVE id from Trivy. Findings now carry an aliases list.
The merge folds findings that share any id into one finding. A bypass
for any id of a finding now covers it. Stored findings without aliases
still load and match by their own id.
This commit is contained in:
2026-11-24 01:39:51 +00:00
parent 64793f9c7e
commit 43e075baf3
20 changed files with 617 additions and 66 deletions
+1
View File
@@ -222,6 +222,7 @@ type Vulnerability struct {
References []string `json:"references"`
FixedIn string `json:"fixed_in"` // Version where fixed
DetectedBy []string `json:"detected_by,omitempty"` // List of scanners that detected this vulnerability
Aliases []string `json:"aliases,omitempty"` // Other ids of the same advisory; a CVE bypass matches any of them
}
// NormalizeSeverity normalizes severity names to standard values