splitting out github rules and retabbing

This commit is contained in:
zricethezav committed 2021-04-09 14:07:23 -04:00
1 parent 190877a24b
commit 5d7b7718ec
1 file changed
+107 -95
+107 -95
View File
@@ -7,163 +7,175 @@ const DefaultConfig = `
title = "gitleaks config" title = "gitleaks config"
[[rules]] [[rules]]
description = "AWS Access Key" description = "AWS Access Key"
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}''' regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
tags = ["key", "AWS"] tags = ["key", "AWS"]
[[rules]] [[rules]]
description = "AWS Secret Key" description = "AWS Secret Key"
regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]''' regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]'''
tags = ["key", "AWS"] tags = ["key", "AWS"]
[[rules]] [[rules]]
description = "AWS MWS key" description = "AWS MWS key"
regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}''' regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
tags = ["key", "AWS", "MWS"] tags = ["key", "AWS", "MWS"]
[[rules]] [[rules]]
description = "Facebook Secret Key" description = "Facebook Secret Key"
regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]''' regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]'''
tags = ["key", "Facebook"] tags = ["key", "Facebook"]
[[rules]] [[rules]]
description = "Facebook Client ID" description = "Facebook Client ID"
regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]''' regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]'''
tags = ["key", "Facebook"] tags = ["key", "Facebook"]
[[rules]] [[rules]]
description = "Twitter Secret Key" description = "Twitter Secret Key"
regex = '''(?i)twitter(.{0,20})?[0-9a-z]{35,44}''' regex = '''(?i)twitter(.{0,20})?[0-9a-z]{35,44}'''
tags = ["key", "Twitter"] tags = ["key", "Twitter"]
[[rules]] [[rules]]
description = "Twitter Client ID" description = "Twitter Client ID"
regex = '''(?i)twitter(.{0,20})?[0-9a-z]{18,25}''' regex = '''(?i)twitter(.{0,20})?[0-9a-z]{18,25}'''
tags = ["client", "Twitter"] tags = ["client", "Twitter"]
[[rules]] [[rules]]
description = "Github Auth Token" description = "Github Personal Access Token"
regex = '''(ghp|gho|ghu|ghs|ghr)_[0-9a-zA-Z]{32-40}''' regex = '''ghp_[0-9a-zA-Z]{36}'''
tags = ["key", "Github"] tags = ["key", "Github"]
[[rules]]
description = "Github OAuth Access Token"
regex = '''gho_[0-9a-zA-Z]{36}'''
tags = ["key", "Github"]
[[rules]]
description = "Github App Token"
regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}'''
tags = ["key", "Github"]
[[rules]]
description = "Github Refresh Token"
regex = '''ghr_[0-9a-zA-Z]{76}'''
tags = ["key", "Github"]
[[rules]] [[rules]]
description = "LinkedIn Client ID" description = "LinkedIn Client ID"
regex = '''(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}''' regex = '''(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}'''
tags = ["client", "LinkedIn"] tags = ["client", "LinkedIn"]
[[rules]] [[rules]]
description = "LinkedIn Secret Key" description = "LinkedIn Secret Key"
regex = '''(?i)linkedin(.{0,20})?[0-9a-z]{16}''' regex = '''(?i)linkedin(.{0,20})?[0-9a-z]{16}'''
tags = ["secret", "LinkedIn"] tags = ["secret", "LinkedIn"]
[[rules]] [[rules]]
description = "Slack" description = "Slack"
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?''' regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
tags = ["key", "Slack"] tags = ["key", "Slack"]
[[rules]] [[rules]]
description = "Asymmetric Private Key" description = "Asymmetric Private Key"
regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----''' regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----'''
tags = ["key", "AsymmetricPrivateKey"] tags = ["key", "AsymmetricPrivateKey"]
[[rules]] [[rules]]
description = "Google API key" description = "Google API key"
regex = '''AIza[0-9A-Za-z\\-_]{35}''' regex = '''AIza[0-9A-Za-z\\-_]{35}'''
tags = ["key", "Google"] tags = ["key", "Google"]
[[rules]] [[rules]]
description = "Google (GCP) Service Account" description = "Google (GCP) Service Account"
regex = '''"type": "service_account"''' regex = '''"type": "service_account"'''
tags = ["key", "Google"] tags = ["key", "Google"]
[[rules]] [[rules]]
description = "Heroku API key" description = "Heroku API key"
regex = '''(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}''' regex = '''(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
tags = ["key", "Heroku"] tags = ["key", "Heroku"]
[[rules]] [[rules]]
description = "MailChimp API key" description = "MailChimp API key"
regex = '''(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}''' regex = '''(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}'''
tags = ["key", "Mailchimp"] tags = ["key", "Mailchimp"]
[[rules]] [[rules]]
description = "Mailgun API key" description = "Mailgun API key"
regex = '''((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}''' regex = '''((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}'''
tags = ["key", "Mailgun"] tags = ["key", "Mailgun"]
[[rules]] [[rules]]
description = "PayPal Braintree access token" description = "PayPal Braintree access token"
regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}''' regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}'''
tags = ["key", "Paypal"] tags = ["key", "Paypal"]
[[rules]] [[rules]]
description = "Picatic API key" description = "Picatic API key"
regex = '''sk_live_[0-9a-z]{32}''' regex = '''sk_live_[0-9a-z]{32}'''
tags = ["key", "Picatic"] tags = ["key", "Picatic"]
[[rules]] [[rules]]
description = "SendGrid API Key" description = "SendGrid API Key"
regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}''' regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}'''
tags = ["key", "SendGrid"] tags = ["key", "SendGrid"]
[[rules]] [[rules]]
description = "Slack Webhook" description = "Slack Webhook"
regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}''' regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}'''
tags = ["key", "slack"] tags = ["key", "slack"]
[[rules]] [[rules]]
description = "Stripe API key" description = "Stripe API key"
regex = '''(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}''' regex = '''(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}'''
tags = ["key", "Stripe"] tags = ["key", "Stripe"]
[[rules]] [[rules]]
description = "Square access token" description = "Square access token"
regex = '''sq0atp-[0-9A-Za-z\-_]{22}''' regex = '''sq0atp-[0-9A-Za-z\-_]{22}'''
tags = ["key", "square"] tags = ["key", "square"]
[[rules]] [[rules]]
description = "Square OAuth secret" description = "Square OAuth secret"
regex = '''sq0csp-[0-9A-Za-z\\-_]{43}''' regex = '''sq0csp-[0-9A-Za-z\\-_]{43}'''
tags = ["key", "square"] tags = ["key", "square"]
[[rules]] [[rules]]
description = "Twilio API key" description = "Twilio API key"
regex = '''(?i)twilio(.{0,20})?SK[0-9a-f]{32}''' regex = '''(?i)twilio(.{0,20})?SK[0-9a-f]{32}'''
tags = ["key", "twilio"] tags = ["key", "twilio"]
[[rules]] [[rules]]
description = "Dynatrace ttoken" description = "Dynatrace ttoken"
regex = '''dt0[a-zA-Z]{1}[0-9]{2}\.[A-Z0-9]{24}\.[A-Z0-9]{64}''' regex = '''dt0[a-zA-Z]{1}[0-9]{2}\.[A-Z0-9]{24}\.[A-Z0-9]{64}'''
tags = ["key", "Dynatrace"] tags = ["key", "Dynatrace"]
[[rules]] [[rules]]
description = "Shopify shared secret" description = "Shopify shared secret"
regex = '''shpss_[a-fA-F0-9]{32}''' regex = '''shpss_[a-fA-F0-9]{32}'''
tags = ["key", "Shopify"] tags = ["key", "Shopify"]
[[rules]] [[rules]]
description = "Shopify access token" description = "Shopify access token"
regex = '''shpat_[a-fA-F0-9]{32}''' regex = '''shpat_[a-fA-F0-9]{32}'''
tags = ["key", "Shopify"] tags = ["key", "Shopify"]
[[rules]] [[rules]]
description = "Shopify custom app access token" description = "Shopify custom app access token"
regex = '''shpca_[a-fA-F0-9]{32}''' regex = '''shpca_[a-fA-F0-9]{32}'''
tags = ["key", "Shopify"] tags = ["key", "Shopify"]
[[rules]] [[rules]]
description = "Shopify private app access token" description = "Shopify private app access token"
regex = '''shppa_[a-fA-F0-9]{32}''' regex = '''shppa_[a-fA-F0-9]{32}'''
tags = ["key", "Shopify"] tags = ["key", "Shopify"]
[[rules]] [[rules]]
description = "PyPI upload token" description = "PyPI upload token"
regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}''' regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}'''
tags = ["key", "pypi"] tags = ["key", "pypi"]
[allowlist] [allowlist]
description = "Allowlisted files" description = "Allowlisted files"
files = ['''^\.?gitleaks.toml$''', files = ['''^\.?gitleaks.toml$''',
'''(.*?)(png|jpg|gif|doc|docx|pdf|bin|xls|pyc|zip)$''', '''(.*?)(png|jpg|gif|doc|docx|pdf|bin|xls|pyc|zip)$''',
'''(go.mod|go.sum)$'''] '''(go.mod|go.sum)$''']
` `