data

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShaConcatChar = "/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageVulnerability

type ImageVulnerability struct {
	*Vulnerability

	// Image is the image name.
	Image string `json:"image"`

	// Digest is the image digest.
	Digest string `json:"digest"`

	// Source is the source of the vulnerability.
	Source string `json:"source"`

	// ProcessedAt is the time the vulnerability was processed.
	ProcessedAt time.Time `json:"processed_at"`
}

ImageVulnerability represents a single vulnerability.

func DecorateVulnerabilities

func DecorateVulnerabilities(list []*Vulnerability, image, digest, src string) []*ImageVulnerability

DecorateVulnerabilities decorates a list of vulnerabilities with image and digest.

func (*ImageVulnerability) Strings

func (v *ImageVulnerability) Strings() []string

Strings returns the string representation of the vulnerability.

type Scan

type Scan struct {
	URI             string           `json:"uri"`
	Digest          string           `json:"digest"`
	ProcessedAt     time.Time        `json:"processed_at"`
	RecordCount     int              `json:"record_count"`
	Vulnerabilities []*Vulnerability `json:"vulnerabilities"`
}

Scan represents a vulnerability scan.

type Vulnerability

type Vulnerability struct {
	// Exposure is the vulnerability ID.
	Exposure string `json:"exposure,omitempty"`

	// Package is the package name.
	Package string `json:"package,omitempty"`

	// Version is the package version.
	Version string `json:"version,omitempty"`

	// Severity is the vulnerability severity.
	Severity string `json:"severity,omitempty"`

	// Score is the vulnerability score.
	Score float32 `json:"score,omitempty"`

	// Is Fixed indicates of the vulnerability has been fixed.
	IsFixed bool `json:"fixed,omitempty"`
}

Vulnerability represents a single vulnerability.

func (*Vulnerability) GetID added in v0.5.0

func (v *Vulnerability) GetID() string

func (*Vulnerability) String

func (v *Vulnerability) String() string

Jump to

Keyboard shortcuts

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