-
Notifications
You must be signed in to change notification settings - Fork 86
/
vulnerabilityreport.go
24 lines (22 loc) · 1.17 KB
/
vulnerabilityreport.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package claircore
import "encoding/json"
// VulnerabilityReport provides a report of packages and their
// associated vulnerabilities.
type VulnerabilityReport struct {
// the manifest hash this vulnerability report is describing
Hash Digest `json:"manifest_hash"`
// all discovered packages in this manifest keyed by package id
Packages map[string]*Package `json:"packages"`
// all discovered distributions in this manifest keyed by distribution id
Distributions map[string]*Distribution `json:"distributions"`
// all discovered repositories in this manifest keyed by repository id
Repositories map[string]*Repository `json:"repository"`
// a list of environment details a package was discovered in keyed by package id
Environments map[string][]*Environment `json:"environments"`
// all discovered vulnerabilities affecting this manifest
Vulnerabilities map[string]*Vulnerability `json:"vulnerabilities"`
// a lookup table associating package ids with 1 or more vulnerability ids. keyed by package id
PackageVulnerabilities map[string][]string `json:"package_vulnerabilities"`
// a map of enrichments keyed by a type.
Enrichments map[string][]json.RawMessage `json:"enrichments"`
}