Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SkipScan = errors.New("skip subsequent processes")
)
Functions ¶
func WithCacheClient ¶
WithCacheClient takes a custom cache implementation It is useful when Trivy is imported as a library.
Types ¶
type InitializeScanner ¶
InitializeScanner defines the initialize function signature of scanner
type Runner ¶
type Runner interface { // ScanImage scans an image ScanImage(ctx context.Context, opts flag.Options) (types.Report, error) // ScanFilesystem scans a filesystem ScanFilesystem(ctx context.Context, opts flag.Options) (types.Report, error) // ScanRootfs scans rootfs ScanRootfs(ctx context.Context, opts flag.Options) (types.Report, error) // ScanRepository scans repository ScanRepository(ctx context.Context, opts flag.Options) (types.Report, error) // ScanSBOM scans SBOM ScanSBOM(ctx context.Context, opts flag.Options) (types.Report, error) // ScanVM scans VM ScanVM(ctx context.Context, opts flag.Options) (types.Report, error) // Filter filter a report Filter(ctx context.Context, opts flag.Options, report types.Report) (types.Report, error) // Report a writes a report Report(ctx context.Context, opts flag.Options, report types.Report) error // Close closes runner Close(ctx context.Context) error }
type ScannerConfig ¶
type ScannerConfig struct { // e.g. image name and file path Target string // Cache ArtifactCache cache.ArtifactCache LocalArtifactCache cache.LocalArtifactCache // Client/Server options ServerOption client.ScannerOption // Artifact options ArtifactOption artifact.Option }
type TargetKind ¶
type TargetKind string
TargetKind represents what kind of artifact Trivy scans
const ( TargetContainerImage TargetKind = "image" TargetFilesystem TargetKind = "fs" TargetRootfs TargetKind = "rootfs" TargetRepository TargetKind = "repo" TargetImageArchive TargetKind = "archive" TargetSBOM TargetKind = "sbom" TargetVM TargetKind = "vm" )
Click to show internal directories.
Click to hide internal directories.