Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerInfo ¶
type DockerInfo struct {
BaseImage *string `json:"baseImage"`
}
type References ¶
type References struct {
URL string `json:"url"`
}
type ScanResult ¶
type ScanResult struct { Docker DockerInfo `json:"docker"` Vulnerabilities []Vulnerability `json:"vulnerabilities"` }
type Scanner ¶
type Scanner interface { // Scan scans a Docker image for vulnerabilities Scan(ctx context.Context, image, platform string, dockerConfig dockercfg.Config) (*ScanResult, error) }
Scanner defines methods for scanning Docker images for vulnerabilities
type SnykOption ¶
type SnykOption func(*SnykScanner)
func WithAuthProvider ¶
func WithAuthProvider(auth registry.AuthProvider) SnykOption
type SnykScanner ¶
type SnykScanner struct {
// contains filtered or unexported fields
}
func NewSnykScanner ¶
func NewSnykScanner(executor executor.Executor, opts ...SnykOption) *SnykScanner
NewSnykScanner create a Scanner that use SNYK to scan for vulnerabilities
func (*SnykScanner) Scan ¶
func (s *SnykScanner) Scan(ctx context.Context, image, platform string, dockerConfig dockercfg.Config) (*ScanResult, error)
type Vulnerability ¶
type Vulnerability struct { Id string `json:"id"` Title string `json:"title"` PackageName string `json:"packageName"` Version string `json:"version"` Description string `json:"description"` Severity string `json:"severity"` CVSS *float32 `json:"cvssScore"` CVSSv3 string `json:"CVSSv3"` CreationTime time.Time `json:"creationTime"` ModificationTime time.Time `json:"modificationTime"` PublicationTime time.Time `json:"publicationTime"` DisclosureTime *time.Time `json:"disclosureTime"` Identifiers map[string][]string `json:"identifiers"` References []References `json:"references"` }
Click to show internal directories.
Click to hide internal directories.