Versions in this module Expand all Collapse all v7 v7.6.0 Aug 19, 2021 Changes in this version + const DefaultConfig + type AllowList struct + Commits []string + Description string + Files []*regexp.Regexp + Paths []*regexp.Regexp + Regexes []*regexp.Regexp + Repos []*regexp.Regexp + func (a *AllowList) CommitAllowed(commit string) bool + func (a *AllowList) FileAllowed(fileName string) bool + func (a *AllowList) IgnoreDotGit() error + func (a *AllowList) PathAllowed(filePath string) bool + func (a *AllowList) RegexAllowed(content string) bool + func (a *AllowList) RepoAllowed(repo string) bool + type Config struct + Allowlist AllowList + Rules []Rule + func LoadAdditionalConfig(repoConfig string) (Config, error) + func LoadRepoConfig(repo *git.Repository, repoConfig string) (Config, error) + func NewConfig(options options.Options) (Config, error) + func (config *Config) AppendConfig(configToBeAppended Config) Config + type Entropy struct + Group int + Max float64 + Min float64 + type Offender struct + EntropyLevel float64 + Line int + Match string + func (o *Offender) IsEmpty() bool + func (o *Offender) ToString() string + type Rule struct + AllowList AllowList + Description string + Entropies []Entropy + File *regexp.Regexp + Multiline bool + Path *regexp.Regexp + Regex *regexp.Regexp + ReportGroup int + Tags []string + func (r *Rule) CheckEntropy(groups []string) (bool, float64) + func (r *Rule) CommitAllowed(commit string) bool + func (r *Rule) HasFileLeak(fileName string) bool + func (r *Rule) HasFileOrPathLeakOnly(filePath string) bool + func (r *Rule) HasFilePathLeak(filePath string) bool + func (r *Rule) Inspect(line string) *Offender + func (r *Rule) InspectFile(fileLines string) []Offender + func (r *Rule) RegexAllowed(content string) bool + type TomlAllowList struct + Commits []string + Description string + Files []string + Paths []string + Regexes []string + Repos []string + type TomlLoader struct + AllowList TomlAllowList + Rules []struct{ ... } + func (tomlLoader TomlLoader) Parse() (Config, error)