mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
feat(config): add placeholder regexes to global allowlist (#1547)
This commit is contained in:
1 parent
00bb82153e
commit
b2fbaeb900
4 files changed
+112
-15
No files matched your search
@@ -15,8 +15,8 @@ description = "{{.Allowlist.Description}}"
|
||||
{{- with .Allowlist.RegexTarget }}
|
||||
regexTarget = "{{ . }}"{{ end -}}
|
||||
{{- with .Allowlist.Regexes }}
|
||||
regexes = [
|
||||
{{ range $i, $regex := . }}'''{{ $regex }}''',{{ end }}
|
||||
regexes = [{{ range $i, $regex := . }}
|
||||
'''{{ $regex }}''',{{ end }}
|
||||
]{{ end }}
|
||||
{{- with .Allowlist.Paths }}
|
||||
paths = [{{ range $i, $path := . }}
|
||||
@@ -45,20 +45,21 @@ tags = [
|
||||
]{{ end }}
|
||||
{{ if or $rule.Allowlist.Regexes $rule.Allowlist.Paths $rule.Allowlist.Commits $rule.Allowlist.StopWords }}
|
||||
[rules.allowlist]
|
||||
{{ with $rule.Allowlist.RegexTarget }}
|
||||
{{- with $rule.Allowlist.RegexTarget }}
|
||||
regexTarget = "{{ . }}"{{ end -}}
|
||||
{{- with $rule.Allowlist.Regexes }}
|
||||
regexes = [
|
||||
{{ range $j, $regex := . }}'''{{ $regex }}''',{{ end }}
|
||||
regexes = [{{ range $i, $regex := . }}
|
||||
'''{{ $regex }}''',{{ end }}
|
||||
]{{ end }}
|
||||
{{- with $rule.Allowlist.Paths }}paths = [
|
||||
{{ range $j, $path := . }}"{{ $path }}",{{ end }}
|
||||
{{ range $j, $path := . }}'''{{ $path }}''',{{ end }}
|
||||
]{{ end }}
|
||||
{{- with $rule.Allowlist.Commits }}commits = [
|
||||
{{ range $j, $commit := . }}"{{ $commit }}",{{ end }}
|
||||
]{{ end }}
|
||||
{{- with $rule.Allowlist.StopWords }}stopwords = [{{ range $j, $stopword := . }}
|
||||
{{- with $rule.Allowlist.StopWords }}
|
||||
stopwords = [{{ range $j, $stopword := . }}
|
||||
"{{ $stopword }}",{{ end }}
|
||||
]{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
Reference in new issue
Block a user