registryvulnerabilities

package
v2.3.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 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 {
	// Login 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

	// DescribeAdaptor 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"`
	NoteName                 string      `json:",omitempty"`
	CreateTime               time.Time   `json:",omitempty"`
	UpdateTime               time.Time   `json:",omitempty"` // Vulnerablity started
	CVSS                     float32     `json:",omitempty"` // other cvss versions are available
	AffectedCPEURI           string      `json:",omitempty"` // Package issue
	AffectedPackage          string      `json:",omitempty"`
	AffectedVersion          string      `json:",omitempty"`
	FixedVersion             string      `json:",omitempty"`
	FixedCPEURI              string      `json:",omitempty"`
	FixedPackege             string      `json:",omitempty"`
	FixAvailablePackage      bool        `json:",omitempty"`
	PackageType              string      `json:",omitempty"`
	EffectiveSeverityPackage string      `json:",omitempty"`
	ShortDescription         string      `json:",omitempty"` // Package issue ends
	LongDescription          string      `json:",omitempty"`
	EffectiveSeverity        string      `json:",omitempty"`
	FixAvailable             bool        `json:",omitempty"`
}

Jump to

Keyboard shortcuts

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