Documentation
¶
Overview ¶
Package config handles loading and defaulting envaudit's configuration.
envaudit intentionally avoids a third-party YAML library so the tool has zero external dependencies and builds anywhere `go build` works. The config file format is a deliberately small subset of YAML: flat "key: value" pairs plus simple "- item" lists under a key. If you need full YAML support, swapping in gopkg.in/yaml.v3 later is a small change contained entirely to this file.
Index ¶
Constants ¶
const ExampleYAML = `` /* 688-byte string literal not displayed */
ExampleYAML is written out by `envaudit init`.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// EntropyThreshold is the Shannon entropy (bits/char) above which a
// value is considered "random enough" to be a real secret.
EntropyThreshold float64
// IgnorePatterns are filename globs (matched with filepath.Match)
// that envaudit should skip entirely, e.g. "*.env.sample".
IgnorePatterns []string
// SeverityExitCode is the minimum severity that causes `envaudit scan`
// to exit non-zero. One of: low, medium, high, critical.
SeverityExitCode string
// CustomSecretPatterns are extra regex rules merged with the built-in
// pattern set in internal/rules.
CustomSecretPatterns []CustomPattern
}
Config holds all tunable behavior for envaudit.
type CustomPattern ¶
CustomPattern lets users define additional secret-detection regexes without recompiling envaudit.