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