| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- # This file has been auto-generated. Do not edit manually.
- # If you would like to contribute new rules, please use
- # cmd/generate/config/main.go and follow the contributing guidelines
- # at https://github.com/gitleaks/gitleaks/blob/master/CONTRIBUTING.md
- #
- # How the hell does secret scanning work? Read this:
- # https://lookingatcomputer.substack.com/p/regex-is-almost-all-you-need
- #
- # This is the default gitleaks configuration file.
- # Rules and allowlists are defined within this file.
- # Rules instruct gitleaks on what should be considered a secret.
- # Allowlists instruct gitleaks on what is allowed, i.e. not a secret.
- title = "{{.Title}}"
- [allowlist]
- description = "{{.Allowlist.Description}}"
- {{- with .Allowlist.RegexTarget }}
- regexTarget = "{{ . }}"{{ end -}}
- {{- with .Allowlist.Regexes }}
- regexes = [{{ range $i, $regex := . }}
- '''{{ $regex }}''',{{ end }}
- ]{{ end }}
- {{- with .Allowlist.Paths }}
- paths = [{{ range $i, $path := . }}
- '''{{ $path }}''',{{ end }}
- ]{{ end }}
- {{- with .Allowlist.StopWords }}{{println}}stopwords = [{{ range $j, $stopword := . }}
- "{{ $stopword }}",{{ end }}
- ]{{ end }}{{println}}
- {{- range $i, $rule := .Rules }}{{println}}[[rules]]
- id = "{{$rule.RuleID}}"
- description = "{{$rule.Description}}"
- {{- with $rule.Regex }}
- regex = '''{{ . }}'''{{ end -}}
- {{- with $rule.Path }}
- path = '''{{ . }}'''{{ end -}}
- {{- with $rule.SecretGroup }}
- secretGroup = {{ . }}{{ end -}}
- {{- with $rule.Entropy }}
- entropy = {{ . }}{{ end -}}
- {{- with $rule.Keywords }}
- {{- if gt (len .) 1}}
- keywords = [{{ range $j, $keyword := . }}
- "{{ $keyword }}",{{ end }}
- ]{{else}}
- keywords = [{{ range $j, $keyword := . }}"{{ $keyword }}"{{ end }}]{{end}}{{ end }}
- {{- with $rule.Tags }}
- tags = [
- {{ range $j, $tag := . }}"{{ $tag }}",{{ end }}
- ]{{ end }}
- {{- with $rule.Allowlists }}{{ range $i, $allowlist := . }}{{ if or $allowlist.Regexes $allowlist.Paths $allowlist.Commits $allowlist.StopWords }}{{println}}[[rules.allowlists]]
- {{- with .MatchCondition }}{{println}}condition = "{{ .MatchCondition.String }}"{{ end }}
- {{- with .Commits -}}{{println}}commits = [
- {{ range $j, $commit := . }}"{{ $commit }}",{{ end }}
- ]{{ end }}
- {{- with .Paths }}{{println}}paths = [
- {{ range $j, $path := . }}'''{{ $path }}''',{{ end }}
- ]{{ end }}
- {{- if and .RegexTarget .Regexes }}{{println}}regexTarget = "{{ .RegexTarget }}"{{ end -}}
- {{- with .Regexes }}{{println}}regexes = [{{ range $i, $regex := . }}
- '''{{ $regex }}''',{{ end }}
- ]{{ end }}
- {{- with .StopWords }}{{println}}stopwords = [{{ range $j, $stopword := . }}
- "{{ $stopword }}",{{ end }}
- ]{{ end }}{{ end }}{{ end }}{{ end }}
- {{ end }}
|