scanner

package
v0.0.1-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Namespace the namespace to run the scan Job in.
	Namespace string
	// ServiceAccountName the name of the Service Account to run the Pod controlled by the scan Job.
	ServiceAccountName string
	// ScanJobTimeout scan job timeout.
	ScanJobTimeout time.Duration
}

Options are arguments passed to VulnerabilityScanner.NewScanJob constructor.

type VulnerabilityScanner

type VulnerabilityScanner interface {
	NewScanJob(workload kube.Object, spec corev1.PodSpec, options Options) (*batchv1.Job, error)
	ParseVulnerabilityReport(imageRef string, logsReader io.ReadCloser) (v1alpha1.VulnerabilityScanResult, error)
}

VulnerabilityScanner defines vulnerability scanner interface.

NewScanJob constructs a new Job descriptor, which can be sent to Kubernetes API and scheduled to scan the specified Kubernetes workload with the given Pod descriptor and Options.

Jump to

Keyboard shortcuts

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