scanner

package
v0.0.0-...-846a62c Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobMeta

type JobMeta struct {
	Labels      map[string]string
	Annotations map[string]string
}

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(meta JobMeta, options Options, spec corev1.PodSpec) (*batchv1.Job, error)
	ParseVulnerabilityScanResult(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