Documentation
¶
Index ¶
Constants ¶
const ExitCodeBlockingError = 1
ExitCodeBlockingError should be returned the scanner is completely inoperable. For example, the config is broken or it can't pull patterns for the first time.
Variables ¶
This section is empty.
Functions ¶
func RemovePatternServerAuthToken ¶
func RemovePatternServerAuthToken() error
RemovePatternServerAuthToken deletes the auth token
func SavePatternServerAuthToken ¶
SavePatternServerAuthToken saves the token in the path where it should go
Types ¶
type Config ¶
Config provides a general structure to capture the config options for the toolchain. This may be abstracted out to a common library in the future as more components are added to the toolchain.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig provides a fully usable instance of Config with default values provided
func LoadConfigFromFile ¶
LoadConfigFromFile provides a config object with default values set plus any custom values pulled in from the config file
func LocateAndLoadConfig ¶
LocateAndLoadConfig looks through the possible places for the config favoring the provided path if it is set
type Logger ¶
type Logger struct {
Level string `toml:"level"`
}
Logger provides general logger config
type PatternServer ¶
PatternServer provides pattern server configuration settings for the scanner
type Patterns ¶
type Patterns struct { Autofetch bool `toml:"autofetch"` ExpiredAfter uint32 `toml:"expired_after"` Gitleaks Gitleaks `toml:"gitleaks"` RefreshAfter uint32 `toml:"refresh_after"` Server PatternServer `toml:"server"` }
Patterns provides configuration for managing pattern updates
type Scanner ¶
type Scanner struct { CloneTimeout uint16 `toml:"clone_timeout"` CloneWorkers uint16 `toml:"clone_workers"` IncludeResponseLogs bool `toml:"include_response_logs"` MaxDecodeDepth uint16 `toml:"max_decode_depth"` MaxScanDepth uint16 `toml:"max_scan_depth"` Patterns Patterns `toml:"patterns"` ScanWorkers uint16 `toml:"scan_workers"` Workdir string `toml:"workdir"` }
Scanner provides scanner specific config