command

package
v0.0.0-...-48c0a4e Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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
	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() 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