registryvulnerabilities

package
v0.0.0-...-cb424ea Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Categories

type Categories struct {
	IsRCE bool `json:"isRce"`
}

type ContainerImageIdentifier

type ContainerImageIdentifier struct {
	Registry   string
	Repository string
	Tag        string
	Hash       string
}

type ContainerImageInformation

type ContainerImageInformation struct {
	ImageID ContainerImageIdentifier
	Bom     []string
}

type ContainerImageScanStatus

type ContainerImageScanStatus struct {
	ImageID         ContainerImageIdentifier
	IsScanAvailable bool
	IsBomAvailable  bool
	LastScanDate    time.Time
}

type ContainerImageVulnerabilityReport

type ContainerImageVulnerabilityReport struct {
	ImageID         ContainerImageIdentifier
	Vulnerabilities []Vulnerability
}

type FixedIn

type FixedIn struct {
	Name    string `json:"name"`
	ImgTag  string `json:"imageTag"`
	Version string `json:"version"`
}

type IContainerImageVulnerabilityAdaptor

type IContainerImageVulnerabilityAdaptor interface {
	// Credentials are coming from user input (CLI or configuration file) and they are abstracted at string to string map level
	// so and example use would be like registry: "simpledockerregistry:80" and credentials like {"username":"joedoe","password":"abcd1234"}
	Login() error

	// For "help" purposes
	DescribeAdaptor() string

	GetImagesScanStatus(imageIDs []ContainerImageIdentifier) ([]ContainerImageScanStatus, error)

	GetImagesVulnerabilities(imageIDs []ContainerImageIdentifier) ([]ContainerImageVulnerabilityReport, error)
	GetImageVulnerability(imageID *ContainerImageIdentifier) (*ContainerImageVulnerabilityReport, error)

	GetImagesInformation(imageIDs []ContainerImageIdentifier) ([]ContainerImageInformation, error)
}

type Vulnerability

type Vulnerability struct {
	Name               string      `json:"name"`
	RelatedPackageName string      `json:"packageName"`
	PackageVersion     string      `json:"packageVersion"`
	Link               string      `json:"link"`
	Description        string      `json:"description"`
	Severity           string      `json:"severity"`
	Metadata           interface{} `json:"metadata"`
	Fixes              []FixedIn   `json:"fixedIn"`
	Relevancy          string      `json:"relevant"` // use the related enum
	UrgentCount        int         `json:"urgent"`
	NeglectedCount     int         `json:"neglected"`
	HealthStatus       string      `json:"healthStatus"`
	Categories         Categories  `json:"categories"`
}

Jump to

Keyboard shortcuts

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