trivy

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	IMAGE = "public.ecr.aws/aquasecurity/trivy:canary"
)

Variables

This section is empty.

Functions

func CacheFolder

func CacheFolder() string

func Matches added in v0.31.0

func Matches(build container.Build) bool

func New

func New() build.BuildStepv3

func Parse

func Parse(jsonData string) (string, error)

Types

type Comment

type Comment struct {
	CreatedAt     time.Time `json:"CreatedAt"`
	ArtifactName  string    `json:"ArtifactName"`
	ArtifactType  string    `json:"ArtifactType"`
	Metadata      Metadata  `json:"Metadata"`
	Results       []Result  `json:"Results"`
	SchemaVersion int       `json:"SchemaVersion"`
}

type Metadata

type Metadata struct {
	OS       OS       `json:"OS"`
	ImageID  string   `json:"ImageID"`
	RepoTags []string `json:"RepoTags"`
}

type OS

type OS struct {
	Family string `json:"Family"`
	Name   string `json:"Name"`
}

type Result

type Result struct {
	Target          string          `json:"Target"`
	Class           string          `json:"Class"`
	Type            string          `json:"Type"`
	Vulnerabilities []Vulnerability `json:"Vulnerabilities"`
}

type TrivyContainer

type TrivyContainer struct {
	*container.Container
}

func (*TrivyContainer) CopyScript

func (c *TrivyContainer) CopyScript() error

func (*TrivyContainer) Pull

func (c *TrivyContainer) Pull() error

func (*TrivyContainer) Run

func (c *TrivyContainer) Run() error

func (*TrivyContainer) Scan

func (c *TrivyContainer) Scan() error

type Vulnerability

type Vulnerability struct {
	FixedVersion     string   `json:"FixedVersion"`
	VulnerabilityID  string   `json:"VulnerabilityID"`
	PkgID            string   `json:"PkgID"`
	PkgPath          string   `json:"PkgPath"`
	PkgName          string   `json:"PkgName"`
	InstalledVersion string   `json:"InstalledVersion"`
	PrimaryURL       string   `json:"PrimaryURL"`
	Status           string   `json:"Status"`
	Description      string   `json:"Description"`
	Title            string   `json:"Title"`
	Severity         string   `json:"Severity"`
	LastModifiedDate string   `json:"LastModifiedDate"`
	PublishedDate    string   `json:"PublishedDate"`
	References       []string `json:"References"`
}

Jump to

Keyboard shortcuts

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