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).
Click to show internal directories.
Click to hide internal directories.