mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
65 lines
2.4 KiB
Cheetah
65 lines
2.4 KiB
Cheetah
# 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
|
|
|
|
# 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}}"
|
|
regex = '''{{$rule.Regex}}'''
|
|
{{- 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 }}
|