Documentation ¶
Overview ¶
Package imagescan provides a service to scan images for vulnerabilities and helpers to set it up.
At the moment, the package uses Grype as the engine that scans images.
Index ¶
- func ExceedsSeverityThreshold(scanResults *models.PresenterConfig, severity vulnerability.Severity) bool
- func NewDefaultDBConfig() (db.Config, bool)
- func NewVulnerabilityDB(cfg db.Config, update bool) (*store.Store, *db.Status, *db.Closer, error)
- func ParseSeverity(severity string) vulnerability.Severity
- type RegistryCredentials
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExceedsSeverityThreshold ¶
func ExceedsSeverityThreshold(scanResults *models.PresenterConfig, severity vulnerability.Severity) bool
ExceedsSeverityThreshold returns true if vulnerabilities in the scan results exceed the severity threshold, false otherwise.
Values equal to the threshold are considered failing, too.
func NewDefaultDBConfig ¶
func NewVulnerabilityDB ¶
func ParseSeverity ¶
func ParseSeverity(severity string) vulnerability.Severity
ParseSeverity returns a Grype severity given a severity string
Used as a thin wrapper for ease of access from one image scan package
Types ¶
type RegistryCredentials ¶
func (RegistryCredentials) IsEmpty ¶
func (c RegistryCredentials) IsEmpty() bool
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a facade for image scanning functionality.
It performs image scanning and everything needed in between.
func NewScanService ¶
func (*Service) Scan ¶
func (s *Service) Scan(ctx context.Context, userInput string, creds RegistryCredentials) (*models.PresenterConfig, error)
Click to show internal directories.
Click to hide internal directories.