|
| 1 | +title = "gitleaks config" |
| 2 | + |
| 3 | +[[rules]] |
| 4 | +description = "AWS Access Key" |
| 5 | +regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}''' |
| 6 | +tags = ["key", "AWS"] |
| 7 | + |
| 8 | +[[rules]] |
| 9 | +description = "AWS Secret Key" |
| 10 | +regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]''' |
| 11 | +tags = ["key", "AWS"] |
| 12 | + |
| 13 | +[[rules]] |
| 14 | +description = "AWS MWS key" |
| 15 | +regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}''' |
| 16 | +tags = ["key", "AWS", "MWS"] |
| 17 | + |
| 18 | +[[rules]] |
| 19 | +description = "Facebook Secret Key" |
| 20 | +regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]''' |
| 21 | +tags = ["key", "Facebook"] |
| 22 | + |
| 23 | +[[rules]] |
| 24 | +description = "Facebook Client ID" |
| 25 | +regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]''' |
| 26 | +tags = ["key", "Facebook"] |
| 27 | + |
| 28 | +[[rules]] |
| 29 | +description = "Twitter Secret Key" |
| 30 | +regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}['\"]''' |
| 31 | +tags = ["key", "Twitter"] |
| 32 | + |
| 33 | +[[rules]] |
| 34 | +description = "Twitter Client ID" |
| 35 | +regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}['\"]''' |
| 36 | +tags = ["client", "Twitter"] |
| 37 | + |
| 38 | +[[rules]] |
| 39 | +description = "Github Personal Access Token" |
| 40 | +regex = '''ghp_[0-9a-zA-Z]{36}''' |
| 41 | +tags = ["key", "Github"] |
| 42 | +[[rules]] |
| 43 | +description = "Github OAuth Access Token" |
| 44 | +regex = '''gho_[0-9a-zA-Z]{36}''' |
| 45 | +tags = ["key", "Github"] |
| 46 | +[[rules]] |
| 47 | +description = "Github App Token" |
| 48 | +regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}''' |
| 49 | +tags = ["key", "Github"] |
| 50 | +[[rules]] |
| 51 | +description = "Github Refresh Token" |
| 52 | +regex = '''ghr_[0-9a-zA-Z]{76}''' |
| 53 | +tags = ["key", "Github"] |
| 54 | + |
| 55 | +[[rules]] |
| 56 | +description = "LinkedIn Client ID" |
| 57 | +regex = '''(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}''' |
| 58 | +tags = ["client", "LinkedIn"] |
| 59 | + |
| 60 | +[[rules]] |
| 61 | +description = "LinkedIn Secret Key" |
| 62 | +regex = '''(?i)linkedin(.{0,20})?[0-9a-z]{16}''' |
| 63 | +tags = ["secret", "LinkedIn"] |
| 64 | + |
| 65 | +[[rules]] |
| 66 | +description = "Slack" |
| 67 | +regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?''' |
| 68 | +tags = ["key", "Slack"] |
| 69 | + |
| 70 | +[[rules]] |
| 71 | +description = "Asymmetric Private Key" |
| 72 | +regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----''' |
| 73 | +tags = ["key", "AsymmetricPrivateKey"] |
| 74 | + |
| 75 | +[[rules]] |
| 76 | +description = "Google API key" |
| 77 | +regex = '''AIza[0-9A-Za-z\\-_]{35}''' |
| 78 | +tags = ["key", "Google"] |
| 79 | + |
| 80 | +[[rules]] |
| 81 | +description = "Google (GCP) Service Account" |
| 82 | +regex = '''"type": "service_account"''' |
| 83 | +tags = ["key", "Google"] |
| 84 | + |
| 85 | +[[rules]] |
| 86 | +description = "Heroku API key" |
| 87 | +regex = '''(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}''' |
| 88 | +tags = ["key", "Heroku"] |
| 89 | + |
| 90 | +[[rules]] |
| 91 | +description = "MailChimp API key" |
| 92 | +regex = '''(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}''' |
| 93 | +tags = ["key", "Mailchimp"] |
| 94 | + |
| 95 | +[[rules]] |
| 96 | +description = "Mailgun API key" |
| 97 | +regex = '''((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}''' |
| 98 | +tags = ["key", "Mailgun"] |
| 99 | + |
| 100 | +[[rules]] |
| 101 | +description = "PayPal Braintree access token" |
| 102 | +regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}''' |
| 103 | +tags = ["key", "Paypal"] |
| 104 | + |
| 105 | +[[rules]] |
| 106 | +description = "Picatic API key" |
| 107 | +regex = '''sk_live_[0-9a-z]{32}''' |
| 108 | +tags = ["key", "Picatic"] |
| 109 | + |
| 110 | +[[rules]] |
| 111 | +description = "SendGrid API Key" |
| 112 | +regex = '''SG\.[\w_]{16,32}\.[\w_]{16,64}''' |
| 113 | +tags = ["key", "SendGrid"] |
| 114 | + |
| 115 | +[[rules]] |
| 116 | +description = "Slack Webhook" |
| 117 | +regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}''' |
| 118 | +tags = ["key", "slack"] |
| 119 | + |
| 120 | +[[rules]] |
| 121 | +description = "Stripe API key" |
| 122 | +regex = '''(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}''' |
| 123 | +tags = ["key", "Stripe"] |
| 124 | + |
| 125 | +[[rules]] |
| 126 | +description = "Square access token" |
| 127 | +regex = '''sq0atp-[0-9A-Za-z\-_]{22}''' |
| 128 | +tags = ["key", "square"] |
| 129 | + |
| 130 | +[[rules]] |
| 131 | +description = "Square OAuth secret" |
| 132 | +regex = '''sq0csp-[0-9A-Za-z\\-_]{43}''' |
| 133 | +tags = ["key", "square"] |
| 134 | + |
| 135 | +[[rules]] |
| 136 | +description = "Twilio API key" |
| 137 | +regex = '''(?i)twilio(.{0,20})?SK[0-9a-f]{32}''' |
| 138 | +tags = ["key", "twilio"] |
| 139 | + |
| 140 | +[[rules]] |
| 141 | +description = "Dynatrace ttoken" |
| 142 | +regex = '''dt0[a-zA-Z]{1}[0-9]{2}\.[A-Z0-9]{24}\.[A-Z0-9]{64}''' |
| 143 | +tags = ["key", "Dynatrace"] |
| 144 | + |
| 145 | +[[rules]] |
| 146 | +description = "Shopify shared secret" |
| 147 | +regex = '''shpss_[a-fA-F0-9]{32}''' |
| 148 | +tags = ["key", "Shopify"] |
| 149 | + |
| 150 | +[[rules]] |
| 151 | +description = "Shopify access token" |
| 152 | +regex = '''shpat_[a-fA-F0-9]{32}''' |
| 153 | +tags = ["key", "Shopify"] |
| 154 | + |
| 155 | +[[rules]] |
| 156 | +description = "Shopify custom app access token" |
| 157 | +regex = '''shpca_[a-fA-F0-9]{32}''' |
| 158 | +tags = ["key", "Shopify"] |
| 159 | + |
| 160 | +[[rules]] |
| 161 | +description = "Shopify private app access token" |
| 162 | +regex = '''shppa_[a-fA-F0-9]{32}''' |
| 163 | +tags = ["key", "Shopify"] |
| 164 | + |
| 165 | +[[rules]] |
| 166 | +description = "PyPI upload token" |
| 167 | +regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}''' |
| 168 | +tags = ["key", "pypi"] |
| 169 | + |
| 170 | +[allowlist] |
| 171 | +description = "Allowlisted files" |
| 172 | +files = ['''^\.?gitleaks.toml$''', |
| 173 | + '''(.*?)(png|jpg|gif|doc|docx|pdf|bin|xls|pyc|zip)$''', |
| 174 | + '''(go.mod|go.sum)$'''] |
0 commit comments