trivy

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageRef added in v0.5.0

type ImageRef struct {
	Name     string
	Auth     RegistryAuth
	Insecure bool
}

type Layer added in v0.9.0

type Layer struct {
	Digest string `json:"Digest"`
	DiffID string `json:"DiffID"`
}

type Metadata added in v0.6.0

type Metadata struct {
	NextUpdate time.Time `json:"NextUpdate"`
	UpdatedAt  time.Time `json:"UpdatedAt"`
}

type MockWrapper added in v0.5.0

type MockWrapper struct {
	mock.Mock
}

func NewMockWrapper added in v0.5.0

func NewMockWrapper() *MockWrapper

func (*MockWrapper) GetVersion added in v0.6.0

func (w *MockWrapper) GetVersion() (VersionInfo, error)

func (*MockWrapper) Scan added in v0.5.0

func (w *MockWrapper) Scan(imageRef ImageRef) (ScanReport, error)

type RegistryAuth

type RegistryAuth struct {
	Username string
	Password string
}

RegistryAuth wraps registry credentials.

type ScanReport

type ScanReport struct {
	Target          string          `json:"Target"`
	Vulnerabilities []Vulnerability `json:"Vulnerabilities"`
}

func ScanReportFrom added in v0.5.0

func ScanReportFrom(reportFile io.Reader) (report ScanReport, err error)

type VersionInfo added in v0.6.0

type VersionInfo struct {
	Version         string    `json:"Version,omitempty"`
	VulnerabilityDB *Metadata `json:"VulnerabilityDB"`
}

type Vulnerability

type Vulnerability struct {
	VulnerabilityID  string   `json:"VulnerabilityID"`
	PkgName          string   `json:"PkgName"`
	InstalledVersion string   `json:"InstalledVersion"`
	FixedVersion     string   `json:"FixedVersion"`
	Title            string   `json:"Title"`
	Description      string   `json:"Description"`
	Severity         string   `json:"Severity"`
	References       []string `json:"References"`
	Layer            *Layer   `json:"Layer"`
}

type Wrapper

type Wrapper interface {
	Scan(imageRef ImageRef) (ScanReport, error)
	GetVersion() (VersionInfo, error)
}

func NewWrapper

func NewWrapper(config etc.Trivy, ambassador ext.Ambassador) Wrapper

Jump to

Keyboard shortcuts

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