trivy

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL
	TrivySeverityCritical = "CRITICAL"
	TrivySeverityHigh     = "HIGH"
	TrivySeverityMedium   = "MEDIUM"
	TrivySeverityLow      = "LOW"
	TrivySeverityUnknown  = "UNKNOWN"
)

Variables

This section is empty.

Functions

Types

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

type BearerAuth

type BearerAuth struct {
	Token string
}

type CVSSInfo

type CVSSInfo struct {
	V2Vector string  `json:"V2Vector,omitempty"`
	V3Vector string  `json:"V3Vector,omitempty"`
	V2Score  float32 `json:"V2Score,omitempty"`
	V3Score  float32 `json:"V3Score,omitempty"`
}

type ECRImageScanSeverity

type ECRImageScanSeverity string

type ImageRef

type ImageRef struct {
	Name     string
	Auth     RegistryAuth
	Insecure bool
}

type Layer

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

type Metadata

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

type NoAuth

type NoAuth struct {
}

type RegistryAuth

type RegistryAuth interface {
}

RegistryAuth wraps registry credentials.

type ScanReport

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

func ScanReportFrom

func ScanReportFrom(f io.Reader) (ScanReport, error)

type Trivy

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

func NewScanner

func NewScanner(config types.TrivyConfig, ambassador util.CmdRunner) Trivy

type VersionInfo

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"`
	CVSS             map[string]CVSSInfo `json:"CVSS"`
}

Jump to

Keyboard shortcuts

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