Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { Matches []Match `json:"matches"` Image *syftJson.Image `json:"image,omitempty"` Directory *string `json:"directory,omitempty"` }
Document represents the JSON document to be presented
func NewDocument ¶
func NewDocument(catalog *pkg.Catalog, s scope.Scope, 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.Artifact `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, theScope scope.Scope, 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.