Documentation ¶
Overview ¶
Package rules enables the parsing of Gitleaks rulesets.
Index ¶
Constants ¶
View Source
const ErrReadConfig = "Failed to read gitleaks config"
ErrReadConfig is the custom error message used if an error is encountered reading the gitleaks config.
Variables ¶
View Source
var ( RulesDefault = config.DefaultConfig //go:embed rules_strict.toml RulesStrict string )
These strings contain default configs. They are initialized at compile time via go:embed.
Functions ¶
This section is empty.
Types ¶
type Loader ¶ added in v0.6.0
type Loader struct {
// contains filtered or unexported fields
}
Loader represents a gitleaks config loader.
func NewLoader ¶ added in v0.6.0
func NewLoader(opts ...LoaderOption) *Loader
NewLoader creates a Loader instance.
func (*Loader) WithStrict ¶ added in v0.6.0
func (l *Loader) WithStrict() LoaderOption
WithStrict enables more strict pillager scanning.
type LoaderOption ¶ added in v0.6.0
type LoaderOption func(*Loader)
LoaderOption sets a parameter for the gitleaks config loader.
func WithFile ¶ added in v0.7.6
func WithFile(file string) LoaderOption
WithFile decodes a gitleaks config from a local file.
Click to show internal directories.
Click to hide internal directories.