gitleaks.toml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. title = "sample gitleaks config"
  2. # This is a sample config file for gitleaks. You can configure gitleaks what to search for and what to whitelist.
  3. # The output you are seeing here is the default gitleaks config. If GITLEAKS_CONFIG environment variable
  4. # is set, gitleaks will load configurations from that path. If option --config-path is set, gitleaks will load
  5. # configurations from that path. Gitleaks does not whitelist anything by default.
  6. # - https://www.ndss-symposium.org/wp-content/uploads/2019/02/ndss2019_04B-3_Meli_paper.pdf
  7. # - https://github.com/dxa4481/truffleHogRegexes/blob/master/truffleHogRegexes/regexes.json
  8. [[rules]]
  9. description = "AWS Client ID"
  10. regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
  11. tags = ["key", "AWS"]
  12. [[rules]]
  13. description = "AWS Secret Key"
  14. regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]'''
  15. tags = ["key", "AWS"]
  16. [[rules]]
  17. description = "AWS MWS key"
  18. regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
  19. tags = ["key", "AWS", "MWS"]
  20. [[rules]]
  21. description = "PKCS8"
  22. regex = '''-----BEGIN PRIVATE KEY-----'''
  23. tags = ["key", "PKCS8"]
  24. [[rules]]
  25. description = "RSA"
  26. regex = '''-----BEGIN RSA PRIVATE KEY-----'''
  27. tags = ["key", "RSA"]
  28. [[rules]]
  29. description = "SSH"
  30. regex = '''-----BEGIN OPENSSH PRIVATE KEY-----'''
  31. tags = ["key", "SSH"]
  32. [[rules]]
  33. description = "PGP"
  34. regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
  35. tags = ["key", "PGP"]
  36. [[rules]]
  37. description = "Facebook Secret Key"
  38. regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]'''
  39. tags = ["key", "Facebook"]
  40. [[rules]]
  41. description = "Facebook Client ID"
  42. regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]'''
  43. tags = ["key", "Facebook"]
  44. [[rules]]
  45. description = "Facebook access token"
  46. regex = '''EAACEdEose0cBA[0-9A-Za-z]+'''
  47. tags = ["key", "Facebook"]
  48. [[rules]]
  49. description = "Twitter Secret Key"
  50. regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}['\"]'''
  51. tags = ["key", "Twitter"]
  52. [[rules]]
  53. description = "Twitter Client ID"
  54. regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}['\"]'''
  55. tags = ["client", "Twitter"]
  56. [[rules]]
  57. description = "Github"
  58. regex = '''(?i)github(.{0,20})?(?-i)['\"][0-9a-zA-Z]{35,40}['\"]'''
  59. tags = ["key", "Github"]
  60. [[rules]]
  61. description = "LinkedIn Client ID"
  62. regex = '''(?i)linkedin(.{0,20})?(?-i)['\"][0-9a-z]{12}['\"]'''
  63. tags = ["client", "LinkedIn"]
  64. [[rules]]
  65. description = "LinkedIn Secret Key"
  66. regex = '''(?i)linkedin(.{0,20})?['\"][0-9a-z]{16}['\"]'''
  67. tags = ["secret", "LinkedIn"]
  68. [[rules]]
  69. description = "Slack"
  70. regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
  71. tags = ["key", "Slack"]
  72. [[rules]]
  73. description = "EC"
  74. regex = '''-----BEGIN EC PRIVATE KEY-----'''
  75. tags = ["key", "EC"]
  76. [[rules]]
  77. description = "Generic API key"
  78. regex = '''(?i)(api_key|apikey)(.{0,20})?['|"][0-9a-zA-Z]{32,45}['|"]'''
  79. tags = ["key", "API", "generic"]
  80. [[rules]]
  81. description = "Generic Secret"
  82. regex = '''(?i)secret(.{0,20})?['|"][0-9a-zA-Z]{32,45}['|"]'''
  83. tags = ["key", "Secret", "generic"]
  84. [[rules]]
  85. description = "Google API key"
  86. regex = '''AIza[0-9A-Za-z\\-_]{35}'''
  87. tags = ["key", "Google"]
  88. [[rules]]
  89. description = "Google Cloud Platform API key"
  90. regex = '''(?i)(google|gcp|youtube|drive|yt)(.{0,20})?['\"][AIza[0-9a-z\\-_]{35}]['\"]'''
  91. tags = ["key", "Google", "GCP"]
  92. [[rules]]
  93. description = "Google OAuth"
  94. regex = '''(?i)(google|gcp|auth)(.{0,20})?['"][0-9]+-[0-9a-z_]{32}\.apps\.googleusercontent\.com['"]'''
  95. tags = ["key", "Google", "OAuth"]
  96. [[rules]]
  97. description = "Google OAuth access token"
  98. regex = '''ya29\.[0-9A-Za-z\-_]+'''
  99. tags = ["key", "Google", "OAuth"]
  100. [[rules]]
  101. description = "Heroku API key"
  102. regex = '''(?i)heroku(.{0,20})?['"][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}['"]'''
  103. tags = ["key", "Heroku"]
  104. [[rules]]
  105. description = "MailChimp API key"
  106. regex = '''(?i)(mailchimp|mc)(.{0,20})?['"][0-9a-f]{32}-us[0-9]{1,2}['"]'''
  107. tags = ["key", "Mailchimp"]
  108. [[rules]]
  109. description = "Mailgun API key"
  110. regex = '''(?i)(mailgun|mg)(.{0,20})?['"][0-9a-z]{32}['"]'''
  111. tags = ["key", "Mailgun"]
  112. [[rules]]
  113. description = "Password in URL"
  114. regex = '''[a-zA-Z]{3,10}:\/\/[^\/\s:@]{3,20}:[^\/\s:@]{3,20}@.{1,100}\/?.?'''
  115. tags = ["key", "URL", "generic"]
  116. [[rules]]
  117. description = "PayPal Braintree access token"
  118. regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}'''
  119. tags = ["key", "Paypal"]
  120. [[rules]]
  121. description = "Picatic API key"
  122. regex = '''sk_live_[0-9a-z]{32}'''
  123. tags = ["key", "Picatic"]
  124. [[rules]]
  125. description = "Slack Webhook"
  126. regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}'''
  127. tags = ["key", "slack"]
  128. [[rules]]
  129. description = "Stripe API key"
  130. regex = '''(?i)stripe(.{0,20})?['\"][sk|rk]_live_[0-9a-zA-Z]{24}'''
  131. tags = ["key", "Stripe"]
  132. [[rules]]
  133. description = "Square access token"
  134. regex = '''sq0atp-[0-9A-Za-z\-_]{22}'''
  135. tags = ["key", "square"]
  136. [[rules]]
  137. description = "Square OAuth secret"
  138. regex = '''sq0csp-[0-9A-Za-z\\-_]{43}'''
  139. tags = ["key", "square"]
  140. [[rules]]
  141. description = "Twilio API key"
  142. regex = '''(?i)twilio(.{0,20})?['\"][0-9a-f]{32}['\"]'''
  143. tags = ["key", "twilio"]
  144. [whitelist]
  145. files = [
  146. "(.*?)(jpg|gif|doc|pdf|bin)$"
  147. ]
  148. #regexes = [
  149. # "AKIAIOSFODNN7EXAMPLE"
  150. #]
  151. #commits = [
  152. # "whitelisted-commit1",
  153. # "whitelisted-commit2",
  154. #]
  155. #repos = [
  156. # "whitelisted-repo"
  157. #]
  158. # Additional Examples
  159. # [[rules]]
  160. # description = "Generic Key"
  161. # regex = '''(?i)key(.{0,6})?(:|=|=>|:=)'''
  162. # entropies = [
  163. # "4.1-4.3",
  164. # "5.5-6.3",
  165. # ]
  166. # entropyROI = "line"
  167. # filetypes = [".go", ".py", ".c"]
  168. # tags = ["key"]
  169. # severity = "8"
  170. #
  171. #
  172. # [[rules]]
  173. # description = "Generic Key"
  174. # regex = '''(?i)key(.{0,6})?(:|=|=>|:=)'''
  175. # entropies = ["4.1-4.3"]
  176. # filetypes = [".gee"]
  177. # entropyROI = "line"
  178. # tags = ["key"]
  179. # severity = "medium"
  180. # [[rules]]
  181. # description = "Any pem file"
  182. # filetypes = [".key"]
  183. # tags = ["pem"]
  184. # severity = "high"