scanner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scanner

type Scanner struct {
	RemoteURL string
	Insecure  bool
	Logger    kwhlog.Logger
}

Scanner represents a trivy scanner

func NewScanner

func NewScanner(remoteURL string, insecure bool, logger kwhlog.Logger, scheme string) (*Scanner, error)

NewScanner returns a Scanner

func (*Scanner) ScanImages

func (s *Scanner) ScanImages(pod *v1.Pod) ([]*types.Report, error)

ScanImages sends a scan request to the trivy server for each container image inside the pod and exports the result to prometheus

func (*Scanner) SendScanRequest

func (s *Scanner) SendScanRequest(image string) (*types.Report, error)

SendScanRequest sends the image to trivy for scanning and returns the result

Jump to

Keyboard shortcuts

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