sarif_simple.sarif 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. {
  2. "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
  3. "version": "2.1.0",
  4. "runs": [
  5. {
  6. "tool": {
  7. "driver": {
  8. "name": "gitleaks",
  9. "semanticVersion": "v8.0.0",
  10. "rules": [
  11. {
  12. "id": "aws-access-key",
  13. "name": "AWS Access Key",
  14. "shortDescription": {
  15. "text": "(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"
  16. }
  17. },
  18. {
  19. "id": "aws-secret-key",
  20. "name": "AWS Secret Key",
  21. "shortDescription": {
  22. "text": "(?i)aws_(.{0,20})?=?.[\\'\\\"0-9a-zA-Z\\/+]{40}"
  23. }
  24. },
  25. {
  26. "id": "aws-mws-key",
  27. "name": "AWS MWS key",
  28. "shortDescription": {
  29. "text": "amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
  30. }
  31. },
  32. {
  33. "id": "facebook-secret-key",
  34. "name": "Facebook Secret Key",
  35. "shortDescription": {
  36. "text": "(?i)(facebook|fb)(.{0,20})?(?-i)['\\\"][0-9a-f]{32}['\\\"]"
  37. }
  38. },
  39. {
  40. "id": "facebook-client-id",
  41. "name": "Facebook Client ID",
  42. "shortDescription": {
  43. "text": "(?i)(facebook|fb)(.{0,20})?['\\\"][0-9]{13,17}['\\\"]"
  44. }
  45. },
  46. {
  47. "id": "twitter-secret-key",
  48. "name": "Twitter Secret Key",
  49. "shortDescription": {
  50. "text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{35,44}['\\\"]"
  51. }
  52. },
  53. {
  54. "id": "twitter-client-id",
  55. "name": "Twitter Client ID",
  56. "shortDescription": {
  57. "text": "(?i)twitter(.{0,20})?['\\\"][0-9a-z]{18,25}['\\\"]"
  58. }
  59. },
  60. {
  61. "id": "github-pat",
  62. "name": "Github Personal Access Token",
  63. "shortDescription": {
  64. "text": "ghp_[0-9a-zA-Z]{36}"
  65. }
  66. },
  67. {
  68. "id": "github-oauth",
  69. "name": "Github OAuth Access Token",
  70. "shortDescription": {
  71. "text": "gho_[0-9a-zA-Z]{36}"
  72. }
  73. },
  74. {
  75. "id": "github-app",
  76. "name": "Github App Token",
  77. "shortDescription": {
  78. "text": "(ghu|ghs)_[0-9a-zA-Z]{36}"
  79. }
  80. },
  81. {
  82. "id": "github-refresh",
  83. "name": "Github Refresh Token",
  84. "shortDescription": {
  85. "text": "ghr_[0-9a-zA-Z]{76}"
  86. }
  87. },
  88. {
  89. "id": "linkedin-client",
  90. "name": "LinkedIn Client ID",
  91. "shortDescription": {
  92. "text": "(?i)linkedin(.{0,20})?(?-i)[0-9a-z]{12}"
  93. }
  94. },
  95. {
  96. "id": "linkedin-secret",
  97. "name": "LinkedIn Secret Key",
  98. "shortDescription": {
  99. "text": "(?i)linkedin(.{0,20})?[0-9a-z]{16}"
  100. }
  101. },
  102. {
  103. "id": "slack",
  104. "name": "Slack",
  105. "shortDescription": {
  106. "text": "xox[baprs]-([0-9a-zA-Z]{10,48})?"
  107. }
  108. },
  109. {
  110. "id": "apkey",
  111. "name": "Asymmetric Private Key",
  112. "shortDescription": {
  113. "text": "-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----"
  114. }
  115. },
  116. {
  117. "id": "google",
  118. "name": "Google (GCP) Service Account",
  119. "shortDescription": {
  120. "text": "\"type\": \"service_account\""
  121. }
  122. },
  123. {
  124. "id": "google",
  125. "name": "Google (GCP) Service Account",
  126. "shortDescription": {
  127. "text": "\"type\": \"service_account\""
  128. }
  129. },
  130. {
  131. "id": "heroku",
  132. "name": "Heroku API key",
  133. "shortDescription": {
  134. "text": "(?i)heroku(.{0,20})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
  135. }
  136. },
  137. {
  138. "id": "mailchimp",
  139. "name": "MailChimp API key",
  140. "shortDescription": {
  141. "text": "(?i)(mailchimp|mc)(.{0,20})?[0-9a-f]{32}-us[0-9]{1,2}"
  142. }
  143. },
  144. {
  145. "id": "mailgun",
  146. "name": "Mailgun API key",
  147. "shortDescription": {
  148. "text": "((?i)(mailgun|mg)(.{0,20})?)?key-[0-9a-z]{32}"
  149. }
  150. },
  151. {
  152. "id": "paypal",
  153. "name": "PayPal Braintree access token",
  154. "shortDescription": {
  155. "text": "access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}"
  156. }
  157. },
  158. {
  159. "id": "piacatic",
  160. "name": "Picatic API key",
  161. "shortDescription": {
  162. "text": "sk_live_[0-9a-z]{32}"
  163. }
  164. },
  165. {
  166. "id": "sendgrid",
  167. "name": "SendGrid API Key",
  168. "shortDescription": {
  169. "text": "SG\\.[\\w_]{16,32}\\.[\\w_]{16,64}"
  170. }
  171. },
  172. {
  173. "id": "sidekiq-secret",
  174. "name": "Sidekiq Secret",
  175. "shortDescription": {
  176. "text": "(?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\\-_\\t .]{0,20})(?:[\\s|']|[\\s|\"]){0,3}(?:=|\u003e|:=|\\|\\|:|\u003c=|=\u003e|:)(?:'|\\\"|\\s|=|\\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\\\"|\\n|\\r|\\s|\\x60|;]|$)"
  177. }
  178. },
  179. {
  180. "id": "sidekiq-sensitive-url",
  181. "name": "Sidekiq Sensitive URL",
  182. "shortDescription": {
  183. "text": "(?i)\\b(http(?:s??):\\/\\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\\/|\\#|\\?|:]|$)"
  184. }
  185. },
  186. {
  187. "id": "slack-webhook",
  188. "name": "Slack Webhook",
  189. "shortDescription": {
  190. "text": "https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}"
  191. }
  192. },
  193. {
  194. "id": "stripe",
  195. "name": "Stripe API key",
  196. "shortDescription": {
  197. "text": "(?i)stripe(.{0,20})?[sr]k_live_[0-9a-zA-Z]{24}"
  198. }
  199. },
  200. {
  201. "id": "square",
  202. "name": "Square access token",
  203. "shortDescription": {
  204. "text": "sq0atp-[0-9A-Za-z\\-_]{22}"
  205. }
  206. },
  207. {
  208. "id": "square-oauth",
  209. "name": "Square OAuth secret",
  210. "shortDescription": {
  211. "text": "sq0csp-[0-9A-Za-z\\-_]{43}"
  212. }
  213. },
  214. {
  215. "id": "twilio",
  216. "name": "Twilio API key",
  217. "shortDescription": {
  218. "text": "(?i)twilio(.{0,20})?SK[0-9a-f]{32}"
  219. }
  220. },
  221. {
  222. "id": "dynatrace",
  223. "name": "Dynatrace ttoken",
  224. "shortDescription": {
  225. "text": "dt0[a-zA-Z]{1}[0-9]{2}\\.[A-Z0-9]{24}\\.[A-Z0-9]{64}"
  226. }
  227. },
  228. {
  229. "id": "shopify",
  230. "name": "Shopify shared secret",
  231. "shortDescription": {
  232. "text": "shpss_[a-fA-F0-9]{32}"
  233. }
  234. },
  235. {
  236. "id": "shopify-access",
  237. "name": "Shopify access token",
  238. "shortDescription": {
  239. "text": "shpat_[a-fA-F0-9]{32}"
  240. }
  241. },
  242. {
  243. "id": "shopify-custom",
  244. "name": "Shopify custom app access token",
  245. "shortDescription": {
  246. "text": "shpca_[a-fA-F0-9]{32}"
  247. }
  248. },
  249. {
  250. "id": "shopify-private",
  251. "name": "Shopify private app access token",
  252. "shortDescription": {
  253. "text": "shppa_[a-fA-F0-9]{32}"
  254. }
  255. },
  256. {
  257. "id": "pypi",
  258. "name": "PyPI upload token",
  259. "shortDescription": {
  260. "text": "pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}"
  261. }
  262. }
  263. ]
  264. }
  265. },
  266. "results": [
  267. {
  268. "message": {
  269. "text": "test-rule has detected secret for file auth.py at commit 0000000000000000."
  270. },
  271. "ruleId": "test-rule",
  272. "locations": [
  273. {
  274. "physicalLocation": {
  275. "artifactLocation": {
  276. "uri": "auth.py"
  277. },
  278. "region": {
  279. "startLine": 1,
  280. "startColumn": 1,
  281. "endLine": 2,
  282. "endColumn": 2,
  283. "snippet": {
  284. "text": "a secret"
  285. }
  286. }
  287. }
  288. }
  289. ],
  290. "partialFingerprints": {
  291. "commitSha": "0000000000000000",
  292. "email": "johndoe@gmail.com",
  293. "author": "John Doe",
  294. "date": "10-19-2003",
  295. "commitMessage": "opps"
  296. }
  297. }
  298. ]
  299. }
  300. ]
  301. }