scan

package
v5.0.0-preview.1+incom... Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddScanner

func AddScanner(id string)

func GetAwsEcrAuthToken

func GetAwsEcrAuthToken(awsKey *share.CLUSAWSAccountKey, proxy string) (*awsEcrAuth, error)

func GetProxy

func GetProxy(registry string) string

func GetRegistryCount

func GetRegistryCount() int

used internally, so access control

func GetScannedImageSummary

func GetScannedImageSummary(reqImgRegistry utils.Set, reqImgRepo, reqImgTag string, vpf common.VPFInterface) []*nvsysadmission.ScannedImageSummary

func LeadChangeNotify

func LeadChangeNotify(isLeader bool)

func RegistryConfigHandler

func RegistryConfigHandler(nType cluster.ClusterNotifyType, key string, value []byte)

func RegistryImageStateUpdate

func RegistryImageStateUpdate(name, id string, sum *share.CLUSRegistryImageSummary, vpf common.VPFInterface) (utils.Set, []string, []string)

func RegistryScanCacheRefresh

func RegistryScanCacheRefresh(ctx context.Context, vpf common.VPFInterface)

func RegistryStateUpdate

func RegistryStateUpdate(name string, state *share.CLUSRegistryState)

Allow manual start/stop scan even if auto-scan is enabled, scan can be restarted manually or when new images added

func RemoveScanner

func RemoveScanner(id string)

func ScannerChangeNotify

func ScannerChangeNotify(isScanner bool)

func ScannerDBChange

func ScannerDBChange(db *share.CLUSScannerDB)

func UpdateProxy

func UpdateProxy(httpProxy, httpsProxy *share.CLUSProxy)

Types

type Context

type Context struct {
	AuditQueue cluster.ObjectQueueInterface
	ScanChan   chan *resource.Event
	TimerWheel *utils.TimerWheel
	ScanLog    *log.Logger
	MutexLog   *log.Logger
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

type ScanInterface

type ScanInterface interface {
	// registry
	GetRegistry(name string, acc *access.AccessControl) (*api.RESTRegistry, error)
	GetRegistryState(name string, acc *access.AccessControl) (*share.CLUSRegistryState, error)
	GetRegistrySummary(name string, acc *access.AccessControl) (*api.RESTRegistrySummary, error)
	GetAllRegistrySummary(acc *access.AccessControl) []*api.RESTRegistrySummary
	GetRegistryImageSummary(name string, vpf common.VPFInterface, acc *access.AccessControl) []*api.RESTRegistryImageSummary
	GetRegistryVulnerabilities(name string, vpf common.VPFInterface, showTag string, acc *access.AccessControl) (map[string][]*api.RESTVulnerability, map[string][]api.RESTIDName, error)
	GetRegistryImageReport(name, id string, vpf common.VPFInterface, showTag string, acc *access.AccessControl) (*api.RESTScanReport, error)
	GetRegistryLayersReport(name, id string, vpf common.VPFInterface, showTag string, acc *access.AccessControl) (*api.RESTScanLayersReport, error)
	GetRegistryDebugImages(source string) []*api.RESTRegistryDebugImage
	StartRegistry(name string) error
	StopRegistry(name string) error

	// GetScannedImageSummary(reqImgRegistry utils.Set, reqImgRepo, reqImgTag string, vpf common.VPFInterface) []*nvsysadmission.ScannedImageSummary
	// RegistryImageStateUpdate(name, id string, sum *share.CLUSRegistryImageSummary, vpf common.VPFInterface) (utils.Set, []string, []string)
	StoreRepoScanResult(result *share.ScanResult) error
	TestRegistry(ctx context.Context, config *share.CLUSRegistryConfig, tracer httptrace.HTTPTrace) error
}

func Init

func Init(ctx *Context, leader bool) ScanInterface

Jump to

Keyboard shortcuts

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