mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
Keyword (#825)
* wip keywords optimization * update readme * limit concurrency to 4 * update readme
This commit is contained in:
1 parent
237b03af18
commit
b0a958f55e
6 files changed
+182
-40
No files matched your search
@@ -20,6 +20,7 @@ type ViperConfig struct {
|
||||
Entropy float64
|
||||
SecretGroup int
|
||||
Regex string
|
||||
Keywords []string
|
||||
Path string
|
||||
Tags []string
|
||||
|
||||
@@ -56,6 +57,10 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
||||
allowlistPaths = append(allowlistPaths, regexp.MustCompile(a))
|
||||
}
|
||||
|
||||
if r.Keywords == nil {
|
||||
r.Keywords = []string{}
|
||||
}
|
||||
|
||||
if r.Tags == nil {
|
||||
r.Tags = []string{}
|
||||
}
|
||||
@@ -80,6 +85,7 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
||||
SecretGroup: r.SecretGroup,
|
||||
Entropy: r.Entropy,
|
||||
Tags: r.Tags,
|
||||
Keywords: r.Keywords,
|
||||
Allowlist: Allowlist{
|
||||
Regexes: allowlistRegexes,
|
||||
Paths: allowlistPaths,
|
||||
|
||||
Reference in new issue
Block a user