trivy

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PredicateType = attestation.PredicateType("https://trivy.dev/report")

Functions

This section is empty.

Types

type CVSS

type CVSS struct {
	V3Vector string  `json:"V3Vector"`
	V3Score  float32 `json:"V3Score"`
}

type Parser

type Parser struct{}

func New

func New() *Parser

func (*Parser) Parse

func (p *Parser) Parse(data []byte) (attestation.Predicate, error)

func (*Parser) SupportsType

func (*Parser) SupportsType(predTypes ...attestation.PredicateType) bool

type Result

type Result struct {
	Vulnerabilities []*Vulnerability `json:"Vulnerabilities"`
}

type TrivyReport

type TrivyReport struct {
	SchemaVersion int        `json:"SchemaVersion"`
	CreatedAt     *time.Time `json:"CreatedAt"`
	ArtifactName  string     `json:"ArtifactName"`
	ArtifactType  string     `json:"ArtifactType"`

	Results []Result `json:"Results"`
}

type Vulnerability

type Vulnerability struct {
	VulnerabilityID  string            `json:"VulnerabilityID"`
	PkgName          string            `json:"PkgName"`
	InstalledVersion string            `json:"InstalledVersion"`
	FixedVersion     string            `json:"FixedVersion"`
	PkgIdentifier    map[string]string `json:"PkgIdentifier"`
	CVSS             map[string]CVSS   `json:"CVSS"`
	Title            string            `json:"Title"`
	Description      string            `json:"Description"`
	Severity         string            `json:"Severity"` // "CRITICAL"
	CweIDs           []string          `json:"CweIDs"`
	References       []string          `json:"References"`
	PublishedDate    *time.Time        `json:"PublishedDate"`
	LastModifiedDate *time.Time        `json:"LastModifiedDate"`
}

Jump to

Keyboard shortcuts

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