scanners

package
v0.0.0-...-dd22938 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trivy

type Trivy struct{}

Trivy scans a container image using trivy command line utility.

func NewTrivy

func NewTrivy() *Trivy

NewTrivy returns a handler for all container image scan operations using trivy.

func (*Trivy) Scan

func (t *Trivy) Scan(
	ctx context.Context, imgref types.ImageReference, sysctxs []*types.SystemContext,
) ([]v1b1scans.Vulnerability, error)

Scan uses trivy command line utility to scan an image by reference. Uses all provided system contexts when attempting to access the remote image (registry authentication). XXX we most likely will have concurrency problems here as this function may run multiple times at the same time (hence this deserves its own struct as we most likely want to add some more logic here to avoid these kind of problems).

Jump to

Keyboard shortcuts

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