flags

package
v1.7.7-integrations Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnalyzeResults = "analyze-results"
	AnalyzePath    = "analyze-path"
)

Flags constants for analyze

View Source
const (
	CIFlag             = "ci"
	LogFileFlag        = "log-file"
	LogFileShorthand   = "l"
	LogFormatFlag      = "log-format"
	LogFormatShorthand = "f"
	LogLevelFlag       = "log-level"
	LogPathFlag        = "log-path"
	NoColorFlag        = "no-color"
	ProfilingFlag      = "profiling"
	SilentFlag         = "silent"
	SilentShorthand    = "s"
	VerboseFlag        = "verbose"
	VerboseShorthand   = "v"
)

Flags constants for kics

View Source
const (
	Results    = "results"
	IncludeIds = "include-ids"
)

Flags constants for remediate

View Source
const (
	BomFlag                = "bom"
	CloudProviderFlag      = "cloud-provider"
	ConfigFlag             = "config"
	DisableFullDescFlag    = "disable-full-descriptions"
	ExcludeCategoriesFlag  = "exclude-categories"
	ExcludePathsFlag       = "exclude-paths"
	ExcludeQueriesFlag     = "exclude-queries"
	ExcludeResultsFlag     = "exclude-results"
	ExcludeSeveritiesFlag  = "exclude-severities"
	IncludeQueriesFlag     = "include-queries"
	InputDataFlag          = "input-data"
	FailOnFlag             = "fail-on"
	IgnoreOnExitFlag       = "ignore-on-exit"
	MinimalUIFlag          = "minimal-ui"
	NoProgressFlag         = "no-progress"
	OutputNameFlag         = "output-name"
	OutputPathFlag         = "output-path"
	PathFlag               = "path"
	PayloadPathFlag        = "payload-path"
	PreviewLinesFlag       = "preview-lines"
	QueriesPath            = "queries-path"
	LibrariesPath          = "libraries-path"
	ReportFormatsFlag      = "report-formats"
	TypeFlag               = "type"
	ExcludeTypeFlag        = "exclude-type"
	TerraformVarsPathFlag  = "terraform-vars-path"
	QueryExecTimeoutFlag   = "timeout"
	LineInfoPayloadFlag    = "payload-lines"
	DisableSecretsFlag     = "disable-secrets"
	SecretsRegexesPathFlag = "secrets-regexes-path" //nolint:gosec
	ExcludeGitIgnore       = "exclude-gitignore"
)

Flags constants for scan

Variables

This section is empty.

Functions

func BindFlags added in v1.4.6

func BindFlags(cmd *cobra.Command, v *viper.Viper) error

BindFlags fill flags values with config file or environment variables data

func FormatNewError added in v1.4.6

func FormatNewError(flag1, flag2 string) error

FormatNewError reports the impossibility of flag1 and flag2 usage simultaneously

func GetAllFlags added in v1.4.6

func GetAllFlags() map[string]interface{}

GetAllFlags returns all flags values

func GetBoolFlag

func GetBoolFlag(flagName string) bool

GetBoolFlag get a boolean flag by its name

func GetIntFlag

func GetIntFlag(flagName string) int

GetIntFlag get a integer flag by its name

func GetMultiStrFlag

func GetMultiStrFlag(flagName string) []string

GetMultiStrFlag get a slice of strings flag by its name

func GetStrFlag

func GetStrFlag(flagName string) string

GetStrFlag get a string flag by its name

func InitJSONFlags

func InitJSONFlags(
	cmd *cobra.Command,
	flagsListContent string,
	persistentFlag bool,
	supportedPlatforms,
	supportedCloudProviders []string) error

InitJSONFlags initialize cobra flags

func SetMultiStrFlag

func SetMultiStrFlag(flagName string, value []string)

SetMultiStrFlag set a slice of strings flag using its name

func SetStrFlag

func SetStrFlag(flagName, value string)

SetStrFlag set a string flag using its name

func Validate

func Validate() error

Validate validate if flag values are ok, if not, returns an error

func ValidateQuerySelectionFlags added in v1.4.6

func ValidateQuerySelectionFlags() error

ValidateQuerySelectionFlags reports the impossibility of include and exclude flags usage simultaneously

func ValidateTypeSelectionFlags added in v1.6.14

func ValidateTypeSelectionFlags() error

ValidateTypeSelectionFlags reports the impossibility of include and exclude flags usage simultaneously

Types

This section is empty.

Jump to

Keyboard shortcuts

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