adapter

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPageSize = 200

DefaultPageSize to be used in the vulnerabilities list to set how many items will be retrieved in each request

Variables

This section is empty.

Functions

func GenerateVulnerabilityBreakdown

func GenerateVulnerabilityBreakdown(
	productionVulnerabilities []*grafeaspb.Occurrence,
) map[string]ImageVulnBreakdown

GenerateVulnerabilityBreakdown parses the a slice of vulnerability occurrences into a breakdown that only contains the necessary information for each vulnerability.

func GetAllVulnerabilities

func GetAllVulnerabilities(
	projectID,
	registryHostname string,
	pageSize int32,
) ([]*grafeaspb.Occurrence, error)

GetAllVulnerabilities gets all of the vulnerability occurrences associated with images in a specific project using the Container Analysis Service.

func UpdateVulnerabilityDashboard

func UpdateVulnerabilityDashboard(
	dashboardPath,
	vulnProject,
	registryHostname,
	dashboardBucket string,
	pageSize int32,
) error

UpdateVulnerabilityDashboard updates the vulnerability dashboard by uploading the lastest versions of all the vulnerability dashboard's files.

Types

type ImageVulnBreakdown

type ImageVulnBreakdown struct {
	ResourceURI             string
	ImageName               string
	ImageDigest             string
	NumVulnerabilities      int
	CriticalVulnerabilities []string
	FixableVulnerabilities  []string
}

ImageVulnBreakdown is used by the adapter in order to store the information from image vulnerability occurrences that the dashboard needs.

Jump to

Keyboard shortcuts

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