adding a ton of stopwords to the generic rule only as that is the loudest rule (#851)

This commit is contained in:
Zachary Rice authored and GitHub committed 2022-04-21 17:01:21 -05:00
1 parent 8481f0e9cd
commit f93e5dc844
12 files changed
+3003 -44

No files matched your search

+13 -4
View File
@@ -16,12 +16,21 @@ paths = [
'''(.*?)(jpg|gif|doc|pdf|bin|svg|socket)$''',
'''(go.mod|go.sum)$'''
]
stopwords = [{{ range $i, $stopword := .Allowlist.StopWords }}
'''{{ $stopword }}''',{{ end }}
]
{{ range $i, $rule := .Rules }}[[rules]]
{{ if and $rule.SecretGroup $rule.Entropy }}description = "{{$rule.Description}}"
{{ if and $rule.SecretGroup $rule.Entropy $rule.Allowlist.StopWords }}description = "{{$rule.Description}}"
id = "{{$rule.RuleID}}"
regex = '''{{$rule.Regex}}'''
secretGroup = {{ $rule.SecretGroup }}
entropy = {{ $rule.Entropy}}
keywords = [
{{ range $j, $keyword := $rule.Keywords }}"{{$keyword}}",{{end}}
]
[rules.allowlist]
stopwords= [{{ range $j, $stopword := $rule.Allowlist.StopWords }}
"{{$stopword}}",{{end}}
]
{{ else if and $rule.SecretGroup $rule.Entropy }}description = "{{$rule.Description}}"
id = "{{$rule.RuleID}}"
regex = '''{{$rule.Regex}}'''
secretGroup = {{ $rule.SecretGroup }}