Documentation ¶
Index ¶
Constants ¶
View Source
const ( ViperLogLevelKey = "logLevel" ViperUnmaskKey = "unmaskValues" ViperExcludeKey = "excludeDefaultRules" ViperDisableColorKey = "disableColor" )
View Source
const ( // Debug is the most verbose logging level and will // report all logs Debug = "DEBUG" // Info level reports logrus.Info, logrus.Warn, and logrus.Error Info = "INFO" // Warn level reports logrus.Warn, and logrus.Error Warn = "WARN" // Error level reports ony error messages Error = "ERROR" // Off level turns off logs from logrus. instead the "stylized" // logging using terminal spinners will be used Off = "OFF" )
Variables ¶
This section is empty.
Functions ¶
func ShouldUseColor ¶
func ShouldUseColor() bool
ShouldUseColor will return true, if colored output should be used
func ShouldUseSpinner ¶
func ShouldUseSpinner() bool
ShouldUseSpinner will return true if the "stylized"
Types ¶
type File ¶ added in v1.0.0
type File struct { // StaticRules is the list of user defined rules for matching secret strings // during a static image analysis StaticRules []UserStaticRule // DynamicRules is the list of user defined rules for matching secret strings // during a dynamic container analysis DynamicRules []UserDynamicRule // IgnoreInvalidRules will ignore any invalid rules in the configuration // file if set to true IgnoreInvalidRules bool // ExcludeDefaultStaticRules will disable the default Patterns for detecting // secret strings during a static scan. See the variable [secrets.DefaultStaticRules] for the full // list of defaults ExcludeDefaultStaticRules bool // ExcludeDefaultDynamicRules will disable the default rules for detecting // secret strings or files during a dynamic scan. See the variable [secrets.DefaultDynamicRules] for the full // list of defaults ExcludeDefaultDynamicRules bool }
File is the user configuration file for the application
type UserDynamicRule ¶ added in v1.3.0
type UserDynamicRule struct { // Name is a human-readable name of the secret the expression // searches for (i.e. .env files, tfstate , etc.) Name string // FilePattern is a regular expression for matching files to search // a nil value means that the rule will match all files FilePattern string // Pattern is a regular expression for matching text in the file // a nil value means that the rule will return true if only the file is matched // (matching all the file) Pattern string // MinEntropy is the minimum entropy the string should have MinEntropy float64 }
type UserStaticRule ¶ added in v1.3.0
type UserStaticRule struct { // Pattern is a regular expression for matching a secret. // must be compatible with [re2 syntax] // // [re2 syntax]: https://github.com/google/re2/wiki/Syntax Pattern string // Name is a human-readable name of the secret the expression // searches for (i.e. AWS SecretString Key, OAuth token, etc.) Name string // MinEntropy is the minimum entropy the string should have MinEntropy float64 }
UserStaticRule represents a user defined string pattern/entropy for the layer and filesystem detectors to search
Click to show internal directories.
Click to hide internal directories.