Documentation ¶
Index ¶
- Variables
- func ConfigRun(ctx *cli.Context) error
- func Exit(c Option, failedResults bool)
- func FilesystemRun(ctx *cli.Context) error
- func ImageRun(ctx *cli.Context) error
- func RepositoryRun(ctx *cli.Context) error
- func RootfsRun(ctx *cli.Context) error
- func Run(cliCtx *cli.Context, artifactType ArtifactType) error
- func SbomRun(ctx *cli.Context) error
- func WithCacheClient(c cache.Cache) runnerOption
- type ArtifactType
- type InitializeScanner
- type Option
- type Runner
- type ScannerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SkipScan = errors.New("skip subsequent processes")
)
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 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(cliCtx *cli.Context, artifactType ArtifactType) 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
func WithCacheClient ¶ added in v0.28.0
WithCacheClient takes a custom cache implementation
Types ¶
type ArtifactType ¶ added in v0.25.0
type ArtifactType string
type InitializeScanner ¶
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 option.SecretOption option.KubernetesOption option.OtherOption // 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 InitOption ¶ added in v0.28.0
type Runner ¶ added in v0.28.0
type Runner interface { // ScanImage scans an image ScanImage(ctx context.Context, opt Option) (types.Report, error) // ScanFilesystem scans a filesystem ScanFilesystem(ctx context.Context, opt Option) (types.Report, error) // ScanRootfs scans rootfs ScanRootfs(ctx context.Context, opt Option) (types.Report, error) // ScanRepository scans repository ScanRepository(ctx context.Context, opt Option) (types.Report, error) // Filter filter a report Filter(ctx context.Context, opt Option, report types.Report) (types.Report, error) // Report a writes a report Report(opt Option, report types.Report) error // Close closes runner Close(ctx context.Context) error }
type ScannerConfig ¶ added in v0.27.1
type ScannerConfig struct { // e.g. image name and file path Target string // Cache ArtifactCache cache.ArtifactCache LocalArtifactCache cache.LocalArtifactCache // Client/Server options RemoteOption client.ScannerOption // Artifact options ArtifactOption artifact.Option }
Click to show internal directories.
Click to hide internal directories.