Skip to content

Commit

Permalink
fix gitleaks.toml format
Browse files Browse the repository at this point in the history
  • Loading branch information
Baruch Odem committed Mar 12, 2024
1 parent 4985b8f commit 032da0d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cmd/generate/config/rules/config.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ regexes = [
{{ range $j, $regex := . }}"{{ $regex }}",{{ end }}
]{{ end }}
{{- with $rule.Allowlist.Paths }}paths = [
{{ range $j, $path := . }}"{{ $path }}",{{ end }}
]{{ end }}
{{ range $j, $path := . }}'''{{ $path }}''',{{ end }}
]
{{ end }}
{{- with $rule.Allowlist.Commits }}commits = [
{{ range $j, $commit := . }}"{{ $commit }}",{{ end }}
]{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate/config/rules/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func GenericCredential() *config.Rule {
Entropy: 3.5,
Allowlist: config.Allowlist{
StopWords: DefaultStopWords,
Paths: []*regexp.Regexp{regexp.MustCompile(`go\.sum$`)},
Paths: []*regexp.Regexp{regexp.MustCompile("(go.mod|go.sum)$")},
},
}

Expand Down
5 changes: 3 additions & 2 deletions config/gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,9 @@ keywords = [

[rules.allowlist]
paths = [
"go\.sum$",
]stopwords = [
'''(go.mod|go.sum)$''',
]
stopwords = [
"000000",
"aaaaaa",
"about",
Expand Down

0 comments on commit 032da0d

Please sign in to comment.