adapter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 string,
) ([]*grafeaspb.Occurrence, error)

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

func UpdateVulnerabilityDashboard

func UpdateVulnerabilityDashboard(
	dashboardPath string,
	vulnProject string,
	dashboardBucket string,
) 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