Skip to content

Commit 1a81d89

Browse files
adding default rule JSON file and docker build script
1 parent fc6347a commit 1a81d89

File tree

3 files changed

+89
-1
lines changed

3 files changed

+89
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ deps/
1313
exampleProject
1414
testData
1515
.DS_Store
16-
*.json
1716
bootstrap
1817
*.zip
1918
temp_token
19+
clientsecret.json

build_docker.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
docker build --tag wetfeet2000/ankamali_hog:$1 --build-arg HOG=ankamali .
2+
docker push wetfeet2000/ankamali_hog:$1
3+
docker build --tag wetfeet2000/berkshire_hog:$1 --build-arg HOG=berkshire .
4+
docker push wetfeet2000/berkshire_hog:$1
5+
docker build --tag wetfeet2000/choctaw_hog:$1 --build-arg HOG=choctaw .
6+
docker push wetfeet2000/choctaw_hog:$1
7+
docker build --tag wetfeet2000/duroc_hog:$1 --build-arg HOG=duroc .
8+
docker push wetfeet2000/duroc_hog:$1
9+
docker build --tag wetfeet2000/essex_hog:$1 --build-arg HOG=essex .
10+
docker push wetfeet2000/essex_hog:$1
11+
docker build --tag wetfeet2000/gottingen_hog:$1 --build-arg HOG=gottingen .
12+
docker push wetfeet2000/gottingen_hog:$1

src/default_rules.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"Slack Token": "(xox[p|b|o|a]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})",
3+
"RSA private key": "-----BEGIN RSA PRIVATE KEY-----",
4+
"SSH (DSA) private key": "-----BEGIN DSA PRIVATE KEY-----",
5+
"SSH (EC) private key": "-----BEGIN EC PRIVATE KEY-----",
6+
"PGP private key block": "-----BEGIN PGP PRIVATE KEY BLOCK-----",
7+
"Amazon AWS Access Key ID": "AKIA[0-9A-Z]{16}",
8+
"Amazon MWS Auth Token": "amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
9+
"AWS API Key": "AKIA[0-9A-Z]{16}",
10+
"Facebook Access Token": "EAACEdEose0cBA[0-9A-Za-z]+",
11+
"Facebook OAuth": "(?i)facebook[\\s[[:punct:]]]{1,4}[0-9a-f]{32}[\\s[[:punct:]]]?",
12+
"GitHub": "(?i)(github|access[[:punct:]]token)[\\s[[:punct:]]]{1,4}[0-9a-zA-Z]{35,40}",
13+
"Generic API Key": {
14+
"pattern": "(?i)(api|access)[\\s[[:punct:]]]?key[\\s[[:punct:]]]{1,4}[0-9a-zA-Z\\-_]{16,64}[\\s[[:punct:]]]?",
15+
"entropy_filter": true,
16+
"threshold": "0.6",
17+
"keyspace": "guess"
18+
},
19+
"Generic Account API Key": {
20+
"pattern": "(?i)account[\\s[[:punct:]]]?api[\\s[[:punct:]]]{1,4}[0-9a-zA-Z\\-_]{16,64}[\\s[[:punct:]]]?",
21+
"entropy_filter": true,
22+
"threshold": "0.6",
23+
"keyspace": "guess"
24+
},
25+
"Generic Secret": {
26+
"pattern": "(?i)secret[\\s[[:punct:]]]{1,4}[0-9a-zA-Z-_]{16,64}[\\s[[:punct:]]]?",
27+
"entropy_filter": true,
28+
"threshold": "0.6",
29+
"keyspace": "guess"
30+
},
31+
"Google API Key": "AIza[0-9A-Za-z\\-_]{35}",
32+
"Google Cloud Platform API Key": "AIza[0-9A-Za-z\\-_]{35}",
33+
"Google Cloud Platform OAuth": "(?i)[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
34+
"Google Drive API Key": "AIza[0-9A-Za-z\\-_]{35}",
35+
"Google Drive OAuth": "(?i)[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
36+
"Google (GCP) Service-account": "(?i)\"type\": \"service_account\"",
37+
"Google Gmail API Key": "AIza[0-9A-Za-z\\-_]{35}",
38+
"Google Gmail OAuth": "(?i)[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
39+
"Google OAuth Access Token": "ya29\\.[0-9A-Za-z\\-_]+",
40+
"Google YouTube API Key": "AIza[0-9A-Za-z\\-_]{35}",
41+
"Google YouTube OAuth": "(?i)[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
42+
"Heroku API Key": "[h|H][e|E][r|R][o|O][k|K][u|U][\\s[[:punct:]]]{1,4}[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}",
43+
"MailChimp API Key": "[0-9a-f]{32}-us[0-9]{1,2}",
44+
"Mailgun API Key": "(?i)key-[0-9a-zA-Z]{32}",
45+
"Credentials in absolute URL": "(?i)((https?|ftp)://)(([a-z0-9$_\\.\\+!\\*'\\(\\),;\\?&=-]|%[0-9a-f]{2})+(:([a-z0-9$_\\.\\+!\\*'\\(\\),;\\?&=-]|%[0-9a-f]{2})+)@)((([a-z0-9]\\.|[a-z0-9][a-z0-9-]*[a-z0-9]\\.)*[a-z][a-z0-9-]*[a-z0-9]|((\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5]))(:\\d+)?)(((/+([a-z0-9$_\\.\\+!\\*'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*(\\?([a-z0-9$_\\.\\+!\\*'\\(\\),;:@&=-]|%[0-9a-f]{2})*)?)?)?",
46+
"PayPal Braintree Access Token": "(?i)access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}",
47+
"Picatic API Key": "(?i)sk_live_[0-9a-z]{32}",
48+
"Slack Webhook": "(?i)https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}",
49+
"Stripe API Key": "(?i)sk_live_[0-9a-zA-Z]{24}",
50+
"Stripe Restricted API Key": "(?i)rk_live_[0-9a-zA-Z]{24}",
51+
"Square Access Token": "(?i)sq0atp-[0-9A-Za-z\\-_]{22}",
52+
"Square OAuth Secret": "(?i)sq0csp-[0-9A-Za-z\\-_]{43}",
53+
"Twilio API Key": "SK[0-9a-fA-F]{32}",
54+
"Twitter Access Token": "(?i)twitter[\\s[[:punct:]]]{1,4}[1-9][0-9]+-[0-9a-zA-Z]{40}",
55+
"Twitter OAuth": "(?i)twitter[\\s[[:punct:]]]{1,4}['|\"]?[0-9a-zA-Z]{35,44}['|\"]?",
56+
"New Relic Partner & REST API Key": "[\\s[[:punct:]]][A-Fa-f0-9]{47}[\\s[[:punct:]][[:cntrl:]]]",
57+
"New Relic Mobile Application Token": "[\\s[[:punct:]]][A-Fa-f0-9]{42}[\\s[[:punct:]][[:cntrl:]]]",
58+
"New Relic Synthetics Private Location": "(?i)minion_private_location_key",
59+
"New Relic Insights Key (specific)": "(?i)insights[\\s[[:punct:]]]?(key|query|insert)[\\s[[:punct:]]]{1,4}\\b[\\w-]{32,40}\\b",
60+
"New Relic Insights Key (vague)": "(?i)(query|insert)[\\s[[:punct:]]]?key[\\s[[:punct:]]]{1,4}b[\\w-]{32,40}\\b",
61+
"New Relic License Key": "(?i)license[\\s[[:punct:]]]?key[\\s[[:punct:]]]{1,4}\\b[\\w-]{32,40}\\b",
62+
"New Relic Internal API Key": "(?i)nr-internal-api-key",
63+
"New Relic HTTP Auth Headers and API Key": "(?i)(x|newrelic|nr)-?(admin|partner|account|query|insert|api|license)-?(id|key)[\\s[[:punct:]]]{1,4}\\b[\\w-]{32,47}\\b",
64+
"New Relic API Key Service Key (new format)": "(?i)NRAK-[A-Z0-9]{27}",
65+
"New Relic APM License Key (new format)": "(?i)[a-f0-9]{36}NRAL",
66+
"New Relic APM License Key (new format, region-aware)": "(?i)[a-z]{2}[0-9]{2}xx[a-f0-9]{30}NRAL",
67+
"New Relic REST API Key (new format)": "(?i)NRRA-[a-f0-9]{42}",
68+
"New Relic Admin API Key (new format)": "(?i)NRAA-[a-f0-9]{27}",
69+
"New Relic Insights Insert Key (new format)": "(?i)NRII-[A-Za-z0-9-_]{32}",
70+
"New Relic Insights Query Key (new format)": "(?i)NRIQ-[A-Za-z0-9-_]{32}",
71+
"New Relic Synthetics Private Location Key (new format)": "(?i)NRSP-[a-z]{2}[0-9]{2}[a-f0-9]{31}",
72+
"Email address": "(?i)\\b(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*)@[a-z0-9][a-z0-9-]+\\.(com|de|cn|net|uk|org|info|nl|eu|ru)([\\W&&[^:/]]|\\A|\\z)",
73+
"New Relic Account IDs in URL": "(newrelic\\.com/)?accounts/\\d{1,10}/",
74+
"Account ID": "(?i)account[\\s[[:punct:]]]?id[\\s[[:punct:]]]{1,4}\\b[\\d]{1,10}\\b",
75+
"Salary Information": "(?i)(salary|commission|compensation|pay)([\\s[[:punct:]]](amount|target))?[\\s[[:punct:]]]{1,4}\\d+"
76+
}

0 commit comments

Comments
 (0)