Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDockerOption ¶
func GetDockerOption(timeout time.Duration) (types.DockerOption, error)
GetDockerOption returns the Docker scanning options using DockerConfig
Types ¶
type BySeverity ¶ added in v0.13.0
type BySeverity []DetectedVulnerability
BySeverity implements sort.Interface based on the Severity field.
func (BySeverity) Len ¶ added in v0.13.0
func (v BySeverity) Len() int
Len returns the length of DetectedVulnerabilities
func (BySeverity) Less ¶ added in v0.13.0
func (v BySeverity) Less(i, j int) bool
Less compares 2 DetectedVulnerabilities based on package name, severity and vulnerabilityID
func (BySeverity) Swap ¶ added in v0.13.0
func (v BySeverity) Swap(i, j int)
Swap swaps 2 vulnerability
type DetectedVulnerability ¶ added in v0.2.0
type DetectedVulnerability struct { VulnerabilityID string `json:",omitempty"` PkgName string `json:",omitempty"` InstalledVersion string `json:",omitempty"` FixedVersion string `json:",omitempty"` Layer ftypes.Layer `json:",omitempty"` SeveritySource string `json:",omitempty"` PrimaryURL string `json:",omitempty"` types.Vulnerability }
DetectedVulnerability holds the information of detected vulnerabilities
type DockerConfig ¶
type DockerConfig struct { UserName string `env:"TRIVY_USERNAME"` Password string `env:"TRIVY_PASSWORD"` RegistryToken string `env:"TRIVY_REGISTRY_TOKEN"` Insecure bool `env:"TRIVY_INSECURE" envDefault:"false"` NonSSL bool `env:"TRIVY_NON_SSL" envDefault:"false"` }
DockerConfig holds the config of Docker
Click to show internal directories.
Click to hide internal directories.