command

package
v0.0.0-...-1d05054 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ECR_TAGS_MAX_CAPACITY = 500
)

Variables

View Source
var (
	OptJobsConfigPath    string
	OptJobsTemplatesPath string
	OptJobsOutputPath    string
	OptProwEcrRepository string
	OptCreatePR          string
)
View Source
var (
	OptImagesConfigPath string
	OptSourceOwner      string
	OptSourceRepo       string
	OptCommitMessage    string
	OptCommitBranch     string
)
View Source
var (
	OptGithubIssueOwner string
	OptGithubIssueRepo  string
)
View Source
var (
	OptBuildConfigPath string
	OptGoEcrRepository string
)

TODO: need to add more flags to handle making a pull request

View Source
var (
	OptEksDistroEcrRepository string
)

Functions

func Execute

func Execute()

func TestFindHighestTagVersion

func TestFindHighestTagVersion(t *testing.T)

func TestGetCveSummaries

func TestGetCveSummaries(t *testing.T)

Types

type BuildConfig

type BuildConfig struct {
	// so far we only have the go-version
	GoVersion        string `yaml:"go_version"`
	EksDistroVersion string `yaml:"eks_distro_version"`
}

BuildConfig specifies the structure of build_config.yaml where the build versions are stored

type CVESummary

type CVESummary struct {
	InstalledVersion string
	FixedVersion     string
	Severity         string
	Title            string

	// Type will be assigned from the Result
	// that holds this vulnerability
	Type string
}

type ImagesConfig

type ImagesConfig struct {
	ImageRepo string            `yaml:"image_repo"`
	Images    map[string]string `yaml:"images"`
}

ImagesConfig specifies the structure of images_config.yaml where the prow image versions are specified

type Result

type Result struct {
	Vulnerabilities []Vulnerability `json:"Vulnerabilities"`

	// Including type here to specify the type of the component
	// being scanned
	Type string `json:"Type"`
}

Results is stored in TrivyOutput It has the results of the scanned components

type TrivyOutput

type TrivyOutput struct {
	Results []Result `json:"Results"`
}

This is the struct to unmarshall trivy image scan output

type Vulnerability

type Vulnerability struct {
	VulnerabilityId  string `json:"VulnerabilityID"`
	InstalledVersion string `json:"InstalledVersion"`
	FixedVersion     string `json:"FixedVersion"`
	Severity         string `json:"Severity"`
	Title            string `json:"Title"`
}

With Vulnerability, we're extracting the components we need to create a Github Issue

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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