models

package
v0.0.0-...-367446e Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerImage

type DockerImage struct {
	Name    string // paulbouwer/hello-kubernetes:1.7
	PullRef string // paulbouwerhellokubernetes17
}

type Image

type Image struct {
	Name               string // paulbouwer/hello-kubernetes:1.7
	ID                 string // paulbouwer/hello-kubernetes@sha256:93b15e948cae979539e152659edfd16549e3009140cc8a9ea2b91ffbd80a07f6
	PullRef            string // paulbouwerhellokubernetes17
	Owners             []Resource
	RecommendationOnly bool
}

Image represents a single container image to scan.

func (Image) GetSha

func (i Image) GetSha() string

func (Image) GetUniqueID

func (i Image) GetUniqueID() string

GetUniqueID returns a unique ID for the image

type ImageDetailsWithRefs

type ImageDetailsWithRefs struct {
	ID                 string
	Name               string
	OSArch             string
	Owners             []Resource
	OwnerName          string  // deprecated - use Owners.Name
	OwnerKind          string  // deprecated - use Owners.Kind
	OwnerContainer     *string // deprecated - use Owners.Container
	Namespace          string  // deprecated - use Owners.Namespace
	LastScan           *time.Time
	Report             []VulnerabilityRefList
	RecommendationOnly bool
}

ImageDetailsWithRefs is the results of a scan for a resource with the vulnerabilities replaced with references.

func (ImageDetailsWithRefs) GetSha

func (i ImageDetailsWithRefs) GetSha() string

func (ImageDetailsWithRefs) GetUniqueID

func (i ImageDetailsWithRefs) GetUniqueID() string

GetUniqueID returns a unique ID for the image

type ImageReport

type ImageReport struct {
	ID                 string
	Name               string
	OSArch             string
	PullRef            string
	Owners             []Resource
	Reports            []VulnerabilityList `json:"Report"`
	RecommendationOnly bool
}

ImageReport represents the results for a single resource.

func (ImageReport) GetSha

func (i ImageReport) GetSha() string

type MinimizedReport

type MinimizedReport struct {
	Images          []ImageDetailsWithRefs
	Vulnerabilities map[string]VulnerabilityDetails
}

MinimizedReport is the results in a compressed format.

type Resource

type Resource struct {
	Name      string
	Kind      string
	Namespace string
	Container string
}

Resource represents a Kubernetes resource

type TrivyImageConfig

type TrivyImageConfig struct {
	Architecture string `json:"architecture"`
	OS           string `json:"os"`
}

type TrivyMetadata

type TrivyMetadata struct {
	ImageID     string
	RepoDigests []string
	ImageConfig TrivyImageConfig
}

type TrivyResults

type TrivyResults struct {
	Metadata TrivyMetadata
	Results  []VulnerabilityList
}

type Vulnerability

type Vulnerability struct {
	Title            string
	Description      string
	InstalledVersion string
	FixedVersion     string
	PkgName          string
	Severity         string
	VulnerabilityID  string
	References       []string
}

Vulnerability is a single CVE or vulnerability.

type VulnerabilityDetails

type VulnerabilityDetails struct {
	Title           string
	Description     string
	Severity        string
	VulnerabilityID string
	References      []string
}

VulnerabilityDetails are the details of a vulnerability itself.

type VulnerabilityInstance

type VulnerabilityInstance struct {
	InstalledVersion string
	PkgName          string
	VulnerabilityID  string
	FixedVersion     string
}

VulnerabilityInstance is a single instance of a given vulnerability

type VulnerabilityList

type VulnerabilityList struct {
	Target          string
	Vulnerabilities []Vulnerability
}

VulnerabilityList is the results from Trivy

type VulnerabilityRefList

type VulnerabilityRefList struct {
	Target          string
	Vulnerabilities []VulnerabilityInstance
}

VulnerabilityRefList is a list of vulnerability references.

Jump to

Keyboard shortcuts

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