Documentation
¶
Index ¶
Constants ¶
View Source
const ( FormatUnknown Format = iota FormatGrypeJSON // grype JSON format FormatTrivyJSON // trivy JSON format FormatSnykJSON // snyk JSON format FormatUnknownName = "unknown" FormatGrypeJSONName = "grype" FormatTrivyJSONName = "trivy" FormatSnykJSONName = "snyk" )
Variables ¶
This section is empty.
Functions ¶
func GetFormatNames ¶
func GetFormatNames() []string
GetFormatNames returns the names of the supported source formats.
func Import ¶ added in v0.5.0
func Import(opt *ImportOptions) error
Import imports the vulnerability report to the target data store.
Types ¶
type ImportOptions ¶ added in v0.5.0
type ImportOptions struct {
// Source is the URI of the image from which the report was generated.
Source string
// File path to the vulnerability report to import.
File string
// Target is the target data store uri.
Target string
// FormatType is the type of the format (e.g. json, yaml, etc.).
FormatType Format
// contains filtered or unexported fields
}
ImportOptions represents the input options.
type VulnerabilityMapper ¶
type VulnerabilityMapper func(c *gabs.Container) ([]*data.Vulnerability, error)
VulnerabilityMapper is a function that converts a source to a list of common vulnerability types.
Click to show internal directories.
Click to hide internal directories.