-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitleaksconfig.toml
254 lines (202 loc) · 5.82 KB
/
.gitleaksconfig.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
title = "gitleaks config"
# whitelist
[allowlist]
description = "global allow lists"
regexes = [
'''219-09-9999''',
'''078-05-1120''',
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
]
paths = [
'''gitleaks.toml''',
'''(.*?)(jpg|gif|doc|pdf|bin|svg|socket)$''',
'''(go.mod|go.sum)$'''
]
# ----- BEGIN typeform-api-token -----
[[rules]]
id = "typeform-api-token"
description = "Typeform API token"
regex = '''(?i)(typeform[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}(tfp_[a-z0-9\-_\.=]{59})'''
secretGroup = 3
# ----- END typeform-api-token -----
# ----- BEGIN generic-api-key -----
[[rules]]
id = "generic-api-key"
description = "Generic API Key"
regex = '''(?i)((key|api[^Version]|token|secret|password)[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9a-zA-Z\-_=]{8,64})['\"]'''
entropy = 3.7
secretGroup = 4
# ----- END generic-api-key -----
# ----- BEGIN service_connections -----
[[rules]]
id = "jdbc-connection"
description = "JDBC Connection String"
regex = '''(jdbc)(:|\\)[\S\d]+[;:/](.*)'''
[[rules]]
id = "FTP"
description = "FTP connection"
regex = '''(?i)ftp:\/\/(.*):(.*)@.*['\"]'''
[[rules]]
id = "LDAP"
description = "LDAP connection"
regex = '''(?i)ldap(s)?:\/\/.*(dc).*['\"]'''
# ----- END service_connections -----
# ----- BEGIN common_secrets -----
[[rules]]
id = "JWT"
description = "JWT token"
regex = '''eyJ[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+'''
[[rules]]
id = "K8s"
description = "K8s secrets"
regex = '''(?m)(^|---).*?kind: Secret.*?(---|$)'''
#[[rules]]
#id = "hashed-password-md5"
#description = "MD5 Password"
#regex = '''['\ "=]+[0-9a-f]{32}['\ "\n]+'''
[[rules]]
id = "authorization-basic"
description = "Authorization basic"
regex = '''(?i)basic [a-zA-Z0-9_\-:\.=]{20,}'''
[[rules]]
id = "authorization-bearer"
description = "Authorization Bearer"
regex = '''(?i)bearer [a-zA-Z0-9_\-\.=]{20,}'''
# ----- END common_secrets -----
# ----- BEGIN sensitive_key_files -----
[[rules]]
id = "RSA-PK"
description = "RSA private key"
regex = '''-----BEGIN RSA PRIVATE KEY-----'''
[[rules]]
id = "OPENSSH-PK"
description = "SSH private key"
regex = '''-----BEGIN OPENSSH PRIVATE KEY-----'''
[[rules]]
id = "PKCS7-PK"
description = "PKCS7 private key"
regex = '''-----BEGIN PKCS7-----'''
[[rules]]
id = "PKCS8-PK"
description = "PKCS8 private key"
regex = '''-----BEGIN PRIVATE KEY-----'''
[[rules]]
id = "PGP-PK"
description = "PGP private key"
regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
[[rules]]
id = "SSH-DSA-PK"
description = "SSH (DSA) private key"
regex = '''-----BEGIN DSA PRIVATE KEY-----'''
[[rules]]
id = "SSH-EC-PK"
description = "SSH (EC) private key"
regex = '''-----BEGIN EC PRIVATE KEY-----'''
# ----- END sensitive_key_files -----
# The following are very popular application api key/token
# ----- BEGIN Github -----
[[rules]]
id = "github-pat"
description = "GitHub Personal Access Token"
regex = '''ghp_[0-9a-zA-Z]{36}'''
[[rules]]
id = "github-oauth"
description = "GitHub OAuth Access Token"
regex = '''gho_[0-9a-zA-Z]{36}'''
[[rules]]
id = "github-app-token"
description = "GitHub App Token"
regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}'''
[[rules]]
id = "github-refresh-token"
description = "GitHub Refresh Token"
regex = '''ghr_[0-9a-zA-Z]{76}'''
# ----- END Github -----
# ----- BEGIN Google -----
[[rules]]
id = "google-api-key"
description = "Google API Key"
regex = '''AIza[0-9A-Za-z\\-_]{35}'''
[[rules]]
id = "google-cloud-oauth"
description = "Google OAuth"
regex = '''[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com'''
# ----- END Google -----
# ----- BEGIN AWS -----
[[rules]]
description = "AWS"
id = "aws-access-token"
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
keywords = [
"AKIA","AGPA","AIDA","AROA","AIPA","ANPA","ANVA","ASIA",
]
# ----- END AWS -----
# ----- BEGIN Alibaba -----
[[rules]]
description = "Alibaba AccessKey ID"
id = "alibaba-access-key-id"
regex = '''(LTAI)(?i)[a-z0-9]{20}'''
keywords = [
"LTAI",
]
[[rules]]
description = "Alibaba Secret Key"
id = "alibaba-secret-key"
regex = '''(?i)(?:alibaba)(?:[0-9a-z\-_\s.]{0,20})(?:'|"){0,1}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})['|\"|\n|\r|\s|\x60]'''
secretGroup = 1
keywords = [
"alibaba",
]
# ----- END Alibaba -----
# ----- BEGIN Atlassian -----
[[rules]]
description = "Atlassian API token"
id = "atlassian-api-token"
regex = '''(?i)(?:atlassian)(?:[0-9a-z\-_\s.]{0,20})(?:'|"){0,1}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})['|\"|\n|\r|\s|\x60]'''
secretGroup = 1
keywords = [
"atlassian",
]
# ----- END Atlassian -----
# ----- BEGIN BitBucket -----
[[rules]]
description = "BitBucket Client ID"
id = "bitbucket-client-id"
regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\s.]{0,20})(?:'|"){0,1}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})['|\"|\n|\r|\s|\x60]'''
secretGroup = 1
keywords = [
"bitbucket",
]
[[rules]]
description = "BitBucket Client Secret"
id = "bitbucket-client-secret"
regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\s.]{0,20})(?:'|"){0,1}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_\-]{64})['|\"|\n|\r|\s|\x60]'''
secretGroup = 1
keywords = [
"bitbucket",
]
# ----- END BitBucket -----
# ----- BEGIN grafana -----
[[rules]]
id = "grafana-api-token"
description = "Grafana API token"
regex = '''['\"]eyJrIjoi(?i)[a-z0-9-_=]{72,92}['\"]'''
# ----- END grafana -----
# ----- BEGIN hashicorp -----
[[rules]]
id = "hashicorp-tf-api-token"
description = "HashiCorp Terraform user/org API token"
regex = '''['\"](?i)[a-z0-9]{14}\.atlasv1\.[a-z0-9-_=]{60,70}['\"]'''
# ----- END hashicorp -----
# ----- BEGIN npm -----
[[rules]]
id = "npm-access-token"
description = "npm access token"
regex = '''['\"](npm_(?i)[a-z0-9]{36})['\"]'''
# ----- END npm -----
# ----- BEGIN Twilio -----
[[rules]]
id = "twilio-api-key"
description = "Twilio API Key"
regex = '''SK[0-9a-fA-F]{32}'''
# ----- END Twilio -----