-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpatterns.js
More file actions
239 lines (239 loc) · 5.64 KB
/
Copy pathpatterns.js
File metadata and controls
239 lines (239 loc) · 5.64 KB
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
window.SECRET_PATTERNS = [
{
id: "AWS Access Key",
regex: new RegExp(
"(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}",
"g"
),
confidence: "high",
},
{
id: "AWS Secret Key",
regex: new RegExp("aws(.{0,20})?['\\\"][0-9a-zA-Z\\/+]{40}['\\\"]", "gi"),
confidence: "high",
},
{
id: "AWS MWS key",
regex: new RegExp(
"amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
"g"
),
confidence: "high",
},
{
id: "Facebook Secret Key",
regex: new RegExp(
"(facebook|fb)(.{0,20})?['\\\"][0-9a-f]{32}['\\\"]",
"gi"
),
confidence: "high",
},
{
id: "Facebook Client ID",
regex: new RegExp(
"(facebook|fb)(.{0,20})?['\\\"][0-9]{13,17}['\\\"]",
"gi"
),
confidence: "high",
},
{
id: "Twitter Secret Key",
regex: new RegExp("twitter(.{0,20})?[0-9a-z]{35,44}", "gi"),
confidence: "high",
},
{
id: "Twitter Client ID",
regex: new RegExp("twitter(.{0,20})?[0-9a-z]{18,25}", "gi"),
confidence: "high",
},
{
id: "Github Personal Access Token",
regex: new RegExp("ghp_[0-9a-zA-Z]{36}", "g"),
confidence: "high",
},
{
id: "Github OAuth Access Token",
regex: new RegExp("gho_[0-9a-zA-Z]{36}", "g"),
confidence: "high",
},
{
id: "Github App Token",
regex: new RegExp("(ghu|ghs)_[0-9a-zA-Z]{36}", "g"),
confidence: "high",
},
{
id: "Github Refresh Token",
regex: new RegExp("ghr_[0-9a-zA-Z]{76}", "g"),
confidence: "high",
},
{
id: "LinkedIn Client ID",
regex: new RegExp("linkedin(.{0,20})?[0-9a-z]{12}", "gi"),
confidence: "high",
},
{
id: "LinkedIn Secret Key",
regex: new RegExp("linkedin(.{0,20})?[0-9a-z]{16}", "gi"),
confidence: "high",
},
{
id: "Slack",
regex: new RegExp("xox[baprs]-([0-9a-zA-Z-]{10,72})?", "g"),
confidence: "high",
},
{
id: "Asymmetric Private Key",
regex: new RegExp(
"-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----",
"g"
),
confidence: "high",
},
{
id: "Google API key",
regex: new RegExp("AIza[0-9A-Za-z\\\\-_]{35}", "g"),
confidence: "high",
},
{
id: "Google (GCP) Service Account",
regex: new RegExp('"type": "service_account"', "g"),
confidence: "high",
},
{
id: "Heroku API key",
regex: new RegExp(
"heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
"gi"
),
confidence: "high",
},
{
id: "MailChimp API key",
regex: new RegExp(
"(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}",
"gi"
),
confidence: "high",
},
{
id: "Mailgun API key",
regex: new RegExp("((mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}", "gi"),
confidence: "high",
},
{
id: "PayPal Braintree access token",
regex: new RegExp(
"access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}",
"g"
),
confidence: "high",
},
{
id: "Picatic API key",
regex: new RegExp("sk_live_[0-9a-z]{32}", "g"),
confidence: "high",
},
{
id: "SendGrid API Key",
regex: new RegExp("SG\\.[\\w_]{16,32}\\.[\\w_]{16,64}", "g"),
confidence: "high",
},
{
id: "Slack Webhook",
regex: new RegExp(
"https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}",
"g"
),
confidence: "high",
},
{
id: "Stripe API key",
regex: new RegExp("stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}", "gi"),
confidence: "high",
},
{
id: "Square access token",
regex: new RegExp("sq0atp-[0-9A-Za-z\\-_]{22}", "g"),
confidence: "high",
},
{
id: "Square OAuth secret",
regex: new RegExp("sq0csp-[0-9A-Za-z\\\\-_]{43}", "g"),
confidence: "high",
},
{
id: "Twilio API key",
regex: new RegExp("twilio(.{0,20})?SK[0-9a-f]{32}", "gi"),
confidence: "high",
},
{
id: "Dynatrace ttoken",
regex: new RegExp(
"dt0[a-zA-Z]{1}[0-9]{2}\\.[A-Z0-9]{24}\\.[A-Z0-9]{64}",
"g"
),
confidence: "high",
},
{
id: "Shopify shared secret",
regex: new RegExp("shpss_[a-fA-F0-9]{32}", "g"),
confidence: "high",
},
{
id: "Shopify access token",
regex: new RegExp("shpat_[a-fA-F0-9]{32}", "g"),
confidence: "high",
},
{
id: "Shopify custom app access token",
regex: new RegExp("shpca_[a-fA-F0-9]{32}", "g"),
confidence: "high",
},
{
id: "PyPI upload token",
regex: new RegExp("pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}", "g"),
confidence: "high",
},
{
id: "AWS cred file info",
regex: new RegExp(
"(aws_access_key_id|aws_secret_access_key)(.{0,20})?=.[0-9a-zA-Z\\/+]{20,40}",
"gi"
),
confidence: "high",
},
{
id: "Github",
regex: new RegExp("github(.{0,20})?['\\\"][0-9a-zA-Z]{35,40}['\\\"]", "gi"),
confidence: "high",
},
{
id: "EC",
regex: new RegExp("-----BEGIN EC PRIVATE KEY-----", "g"),
confidence: "high",
},
{
id: "Env Var",
regex: new RegExp(
"(apikey|secret|key|api|password|pass|pw|host)=[0-9a-zA-Z-_.{}]{4,120}",
"gi"
),
confidence: "high",
},
{
id: "Generic Credential",
regex: new RegExp(
"(dbpasswd|dbuser|dbname|dbhost|api_key|apikey|secret|key|api|password|user|guid|hostname|pw|auth)(.{0,20})?['|\"]([0-9a-zA-Z-_\\/+!{}/=]{4,120})['|\"]",
"gi"
),
confidence: "high",
},
{
id: "WP-Config",
regex: new RegExp(
"define(.{0,20})?(DB_CHARSET|NONCE_SALT|LOGGED_IN_SALT|AUTH_SALT|NONCE_KEY|DB_HOST|DB_PASSWORD|AUTH_KEY|SECURE_AUTH_KEY|LOGGED_IN_KEY|DB_NAME|DB_USER)(.{0,20})?['|\"].{10,120}['|\"]",
"g"
),
confidence: "high",
},
];