Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶ added in v0.5.0
Descriptor describes what created the document as well as surrounding metadata
type Document ¶
type Document struct {
Matches []Match `json:"matches"`
Source syftJson.Source `json:"source"`
Distro syftJson.Distribution `json:"distro"`
Descriptor Descriptor `json:"descriptor"`
}
Document represents the JSON document to be presented
func NewDocument ¶
func NewDocument(catalog *pkg.Catalog, d *distro.Distro, srcMetadata source.Metadata, matches match.Matches, metadataProvider vulnerability.MetadataProvider) (Document, error)
NewDocument creates and populates a new Document struct, representing the populated JSON document.
type Match ¶
type Match struct {
Vulnerability Vulnerability `json:"vulnerability"`
MatchDetails MatchDetails `json:"matchDetails"`
Artifact syftJson.Package `json:"artifact"`
}
Match is a single item for the JSON array reported
type MatchDetails ¶
type MatchDetails struct {
Matcher string `json:"matcher"`
SearchKey map[string]interface{} `json:"searchKey"`
MatchInfo map[string]interface{} `json:"matchedOn"`
}
MatchDetails contains all data that indicates how the result match was found
type Presenter ¶
type Presenter struct {
// contains filtered or unexported fields
}
Presenter is a generic struct for holding fields needed for reporting
func NewPresenter ¶
func NewPresenter(matches match.Matches, catalog *pkg.Catalog, d *distro.Distro, srcMetadata source.Metadata, metadataProvider vulnerability.MetadataProvider) *Presenter
NewPresenter is a *Presenter constructor
type Vulnerability ¶
type Vulnerability struct {
ID string `json:"id"`
Severity string `json:"severity,omitempty"`
Links []string `json:"links,omitempty"`
Description string `json:"description,omitempty"`
CvssV2 *Cvss `json:"cvssV2,omitempty"`
CvssV3 *Cvss `json:"cvssV3,omitempty"`
FixedInVersion string `json:"fixedInVersion,omitempty"`
}
func NewVulnerability ¶
func NewVulnerability(m match.Match, metadata *vulnerability.Metadata) Vulnerability
Click to show internal directories.
Click to hide internal directories.