scanner

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSampleScanners

func GetSampleScanners() []string

GetSampleScanners returns list of supported scanners.

Types

type Options

type Options struct {
	// Image to scan
	Image string

	// Scan types
	Scans string
}

Options are the scan options.

func (*Options) Validate

func (o *Options) Validate() error

Validate validates the options.

type Result

type Result struct {
	// Image to scan
	Image string `json:"image"`

	Files map[ScanType]string `json:"files"`
}

Result is the scan result.

func Scan

func Scan(opt *Options) (*Result, error)

GetVulnerabilities returns vulnerabilities for the given image.

type ScanType

type ScanType int64
const (
	AllScans ScanType = iota
	Grype
	Snyk
	Trivy
)

func ParseScan

func ParseScan(s string) (ScanType, error)

ParseScan parses the scan.

func ParseScans

func ParseScans(s string) ([]ScanType, error)

ParseScans parses the scans.

func (ScanType) String

func (s ScanType) String() string

Jump to

Keyboard shortcuts

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