Skip to content

Commit 41b377e

Browse files
authored
Remove the custom generic Gitleaks rule as it's not needed anymore (#472)
It was added in #76 to detect "dev" and "prod" keys, but I've since started to use prefixed encryption keys in #269 so the custom rule is not needed anymore. This is why you use prefixed keys, it makes things simple, and I like making things simple. Also, the custom generic rule started throwing many false positives after I've upgraded to Gitleaks 8.23.1 for some reason.
2 parents 5c4200a + f85f747 commit 41b377e

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

.gitleaks.toml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,6 @@
11
[extend]
22
useDefault = true # The default config file is https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml
33

4-
[[rules]]
5-
# This is the same as the "Generic API Key" rule from the default config file except
6-
# it has a lower entropy and adds a few more keywords to both the "regex" and "keywords" fields
7-
description = "Generic API Key, with extra keywords and lower entropy"
8-
id = "generic-api-key-extra-keywords"
9-
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access|dev|prod)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
10-
secretGroup = 1
11-
entropy = 3
12-
keywords = [
13-
"key",
14-
"api",
15-
"token",
16-
"secret",
17-
"client",
18-
"passwd",
19-
"password",
20-
"auth",
21-
"access",
22-
"dev",
23-
"prod",
24-
]
25-
26-
[[rules.allowlists]]
27-
stopwords = [
28-
# Database column names
29-
'''_talk''',
30-
'''_status''',
31-
'''_training''',
32-
]
33-
344
[[rules]]
355
id = "michalspacek.cz-encryption-keys"
366
description = "Identified an encryption key, risking data decryption and unauthorized access to sensitive information."

0 commit comments

Comments
 (0)