This repository has been archived by the owner on Jan 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
c2q-poirot-patterns.txt
50 lines (40 loc) · 1.6 KB
/
c2q-poirot-patterns.txt
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
# Keys and Tokens
###############################################
## Patterns commonly used in the CMS C2Q App ##
###############################################
## api key assignments, will fire on google maps and newrelic
.*_key[:=]\s*['"][A-Za-z0-9-]{39}['"]
.*_key[:=]\s*[A-Za-z0-9-]{39}
.*_key[:=]\s*<%= ENV.fetch.*[A-Za-z0-9-]{39}
.*_key[:=]\s*<%= ENV.fetch.*['"][A-Za-z0-9-]{39}['"]
## aws access key id
aws_access_key_id[:=]\s*[A-Z0-9]{20}
aws_access_key_id[:=]\s*['"][A-Z0-9]{20}['"]
aws_access_key_id[:=]\s*<%= ENV.fetch.*[A-Z0-9]{20}
aws_access_key_id[:=]\s*<%= ENV.fetch.*['"][A-Z0-9]{20}['"]
## aws_secret_access_key
aws_secret_access_key[:=]\s*[A-Za-z0-9/+]{40}
aws_secret_access_key[:=]\s*['"][A-Za-z0-9/+]{40}['"]
aws_secret_access_key[:=]\s*<%= ENV.fetch.*[A-Z0-9]{20}
aws_secret_access_key[:=]\s*<%= ENV.fetch.*['"][A-Z0-9]{20}['"]
##################################################
## Generic secret patterns modified from DC.gov ##
##################################################
## password assignments
.*password[:=]\s*<%= ENV.fetch.*[A-Za-z0-9-]
# Credit Cards
# Credit Cards: Mastercard
[:=]\s*5[0-9]{3}[ -]?[0-9]{4}[ -]?[0-9]{4}[ -]?[0-9]{4}
# Credit Cards:Discover
[:=]\s*6011[ -]?[0-9]{4}[ -]?[0-9]{4}[ -]?[0-9]{4}
# Credit Cards:VISA
[:=]\s*4[0-9]{3}[ -]?[0-9]{4}[ -]?[0-9]{4}[ -]?[0-9]{4}
# Credit Cards:AMEX
[:=]\s*3[47][0-9]{2}[ -]?[0-9]{6}[ -]?[0-9]{5}
# U.S. Passport
.*passport.*[:=]\s*[A-Za-z0-9-]{6,9}
# U.S. Passport Card
.*passport.*[:=]\s*C0[0-9]{7}
# U.S. SSN, Note: may produce false-positives, refer to README for more details.
.*(ssn).*[:=]\s*[0-9-]{9,11}
.*(soc).*[:=]\s*[0-9-]{9,11}