Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher do some preprocessing of top of Image objects and calls the internally configured Scanner. TODO expand this to accept multiple Scanners if necessary.
func NewDispatcher ¶
func NewDispatcher( scancli v1b1clientset.Interface, scaninf v1b1informers.SharedInformerFactory, imginf iimginf.SharedInformerFactory, sysctx *imageservices.SysContext, scanner Scanner, ) *Dispatcher
NewDispatcher returns a handler for all container image scan operations using trivy.
func (*Dispatcher) AddEventHandler ¶
func (t *Dispatcher) AddEventHandler(handler cache.ResourceEventHandler)
AddEventHandler adds a handler to Image related events.
type ImageScan ¶
type ImageScan struct {
// contains filtered or unexported fields
}
ImageScan gather all actions related to ImageScan objects. Actions in a sense of "services" or if you prefer: "use cases". The business logic for ImageScans lives in this struct.
func NewImageScan ¶
func NewImageScan( scancli v1b1client.Interface, scaninf v1b1informers.SharedInformerFactory, imginf imginform.SharedInformerFactory, ) *ImageScan
NewImageScan returns a handler for all ImageScan related services.
func (*ImageScan) AddEventHandler ¶
func (t *ImageScan) AddEventHandler(handler cache.ResourceEventHandler)
AddEventHandler adds a handler to Image related events.
func (*ImageScan) Get ¶
Get returns a ImageScan object. Returned object is already a copy of the cached object and may be modified by caller as needed.
type Scanner ¶
type Scanner interface {
Scan(context.Context, types.ImageReference, []*types.SystemContext) ([]v1b1scans.Vulnerability, error)
}
Scanner implments a Scan method and is reponsible for scanning a given container image reference using provided system contexts. This function should return a list of vulnerability IDs (for example "CVE-2022-0185").