command

package
v0.0.0-...-505c498 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPathNotAllowed = errors.New("the --exclude argument must be a comma separated list of directory or file names and cannot contain a path.")

Functions

func ReadRuntimePolicyEngineVersion

func ReadRuntimePolicyEngineVersion() (string, error)

Types

type BundleDownloader

type BundleDownloader interface {
	DownloadLatestBundle(policyEngineVersion string, w io.Writer) error
}

type Command

type Command struct {
	Output string
	Logger *zerolog.Logger
	FS     afero.Fs
	Engine Engine
	Paths  []string
	// Exclude holds comma-split patterns (relative to input directory) to exclude from scan
	Exclude                 []string
	Bundle                  string
	ResultsProcessor        ResultsProcessor
	SnykCloudEnvironment    string
	SnykClient              cloudapi.Client
	Scan                    string
	DetectionDepth          int
	VarFile                 string
	SettingsReader          SettingsReader
	BundleDownloader        BundleDownloader
	ReadPolicyEngineVersion func() (string, error)
	ExcludeRawResults       bool
	AllowAnalytics          bool
	Report                  bool
	IacNewEngine            bool
}

func (Command) Run

func (c Command) Run() int

func (Command) RunWithError

func (c Command) RunWithError() (bool, error)

type Engine

type Engine interface {
	Run(ctx context.Context, options engine.RunOptions) (*engine.Results, results.ScanAnalytics, []error, []error)
}

type ResultsProcessor

type ResultsProcessor interface {
	ProcessResults(rawResults *engine.Results, scanAnalytics results.ScanAnalytics) (*results.Results, error)
}

type SettingsReader

type SettingsReader interface {
	ReadSettings(ctx context.Context) (*settings.Settings, error)
}

Jump to

Keyboard shortcuts

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