scan

package
v0.0.0-...-bfaf2c4 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 11 Imported by: 0

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"`
}

Directories

Path Synopsis
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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