types

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 5 Imported by: 128

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

type Library

type Library struct {
	Name    string
	Version string
}

Library holds the attribute of a package library

type ScanOptions

type ScanOptions struct {
	VulnType            []string
	ScanRemovedPackages bool
	ListAllPackages     bool
	SkipFiles           []string
	SkipDirectories     []string
}

ScanOptions holds the attributes for scanning vulnerabilities

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL