artifact

package
v0.25.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 30 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigRun added in v0.19.0

func ConfigRun(ctx *cli.Context) error

ConfigRun runs scan on config files

func FilesystemRun

func FilesystemRun(ctx *cli.Context) error

FilesystemRun runs scan on filesystem for language-specific dependencies and config files

func ImageRun

func ImageRun(ctx *cli.Context) error

ImageRun runs scan on container image

func RepositoryRun

func RepositoryRun(ctx *cli.Context) error

RepositoryRun runs scan on repository

func RootfsRun added in v0.20.0

func RootfsRun(ctx *cli.Context) error

RootfsRun runs scan on rootfs.

func Run added in v0.18.2

func Run(ctx context.Context, opt Option, initializeScanner InitializeScanner, initCache InitCache) error

Run performs artifact scanning

func SbomRun added in v0.25.0

func SbomRun(ctx *cli.Context) error

SbomRun runs generates sbom for image and package artifacts

Types

type ArtifactType added in v0.25.0

type ArtifactType string

type InitCache added in v0.18.2

type InitCache func(c Option) (cache.Cache, error)

InitCache defines cache initializer

type InitializeScanner

type InitializeScanner func(context.Context, scannerConfig) (scanner.Scanner, func(), error)

InitializeScanner defines the initialize function signature of scanner

type Option added in v0.18.2

type Option struct {
	option.GlobalOption
	option.ArtifactOption
	option.DBOption
	option.ImageOption
	option.ReportOption
	option.CacheOption
	option.ConfigOption
	option.RemoteOption
	option.SbomOption

	// We don't want to allow disabled analyzers to be passed by users,
	// but it differs depending on scanning modes.
	DisabledAnalyzers []analyzer.Type
}

Option holds the artifact options

func NewOption added in v0.18.2

func NewOption(c *cli.Context) (Option, error)

NewOption is the factory method to return options

func (*Option) Init added in v0.18.2

func (c *Option) Init() error

Init initializes the artifact options

Jump to

Keyboard shortcuts

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