mcp-server-semgrep 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4012) hide show
  1. package/CLAUDE.md +24 -0
  2. package/Dockerfile +22 -0
  3. package/LICENSE +22 -0
  4. package/README.md +325 -0
  5. package/README_PL.md +250 -0
  6. package/USAGE.md +456 -0
  7. package/build/config.js +19 -0
  8. package/build/index.js +669 -0
  9. package/logo.svg +166 -0
  10. package/package.json +73 -0
  11. package/scripts/check-semgrep.js +148 -0
  12. package/semgrep-rules/CODE_OF_CONDUCT.md +76 -0
  13. package/semgrep-rules/LICENSE +1 -0
  14. package/semgrep-rules/Makefile +65 -0
  15. package/semgrep-rules/Pipfile +17 -0
  16. package/semgrep-rules/README.md +50 -0
  17. package/semgrep-rules/SECURITY.md +9 -0
  18. package/semgrep-rules/ai/csharp/detect-openai.cs +11 -0
  19. package/semgrep-rules/ai/csharp/detect-openai.yaml +18 -0
  20. package/semgrep-rules/ai/dart/detect-gemini.dart +12 -0
  21. package/semgrep-rules/ai/dart/detect-gemini.yaml +17 -0
  22. package/semgrep-rules/ai/generic/detect-generic-ai-anthprop.txt +18 -0
  23. package/semgrep-rules/ai/generic/detect-generic-ai-anthprop.yaml +18 -0
  24. package/semgrep-rules/ai/generic/detect-generic-ai-api.js +18 -0
  25. package/semgrep-rules/ai/generic/detect-generic-ai-api.yaml +17 -0
  26. package/semgrep-rules/ai/generic/detect-generic-ai-gem.html +20 -0
  27. package/semgrep-rules/ai/generic/detect-generic-ai-gem.yaml +17 -0
  28. package/semgrep-rules/ai/generic/detect-generic-ai-oai.txt +7 -0
  29. package/semgrep-rules/ai/generic/detect-generic-ai-oai.yaml +17 -0
  30. package/semgrep-rules/ai/go/detect-gemini.go +14 -0
  31. package/semgrep-rules/ai/go/detect-gemini.yaml +17 -0
  32. package/semgrep-rules/ai/go/detect-openai.go +163 -0
  33. package/semgrep-rules/ai/go/detect-openai.yaml +17 -0
  34. package/semgrep-rules/ai/kotlin/detect-gemini.kt +79 -0
  35. package/semgrep-rules/ai/kotlin/detect-gemini.yaml +17 -0
  36. package/semgrep-rules/ai/python/detect-anthropic.py +18 -0
  37. package/semgrep-rules/ai/python/detect-anthropic.yaml +20 -0
  38. package/semgrep-rules/ai/python/detect-gemini.py +7 -0
  39. package/semgrep-rules/ai/python/detect-gemini.yaml +16 -0
  40. package/semgrep-rules/ai/python/detect-huggingface.py +5 -0
  41. package/semgrep-rules/ai/python/detect-huggingface.yaml +16 -0
  42. package/semgrep-rules/ai/python/detect-langchain.py +22 -0
  43. package/semgrep-rules/ai/python/detect-langchain.yaml +25 -0
  44. package/semgrep-rules/ai/python/detect-mistral.py +19 -0
  45. package/semgrep-rules/ai/python/detect-mistral.yaml +18 -0
  46. package/semgrep-rules/ai/python/detect-openai.py +12 -0
  47. package/semgrep-rules/ai/python/detect-openai.yaml +19 -0
  48. package/semgrep-rules/ai/python/detect-pytorch.py +5 -0
  49. package/semgrep-rules/ai/python/detect-pytorch.yaml +17 -0
  50. package/semgrep-rules/ai/python/detect-tensorflow.py +8 -0
  51. package/semgrep-rules/ai/python/detect-tensorflow.yaml +16 -0
  52. package/semgrep-rules/ai/swift/detect-apple-core-ml.swift +357 -0
  53. package/semgrep-rules/ai/swift/detect-apple-core-ml.yaml +17 -0
  54. package/semgrep-rules/ai/swift/detect-gemini.swift +12 -0
  55. package/semgrep-rules/ai/swift/detect-gemini.yaml +17 -0
  56. package/semgrep-rules/ai/typescript/detect-anthropic.ts +15 -0
  57. package/semgrep-rules/ai/typescript/detect-anthropic.yaml +20 -0
  58. package/semgrep-rules/ai/typescript/detect-gemini.ts +9 -0
  59. package/semgrep-rules/ai/typescript/detect-gemini.yaml +20 -0
  60. package/semgrep-rules/ai/typescript/detect-mistral.ts +15 -0
  61. package/semgrep-rules/ai/typescript/detect-mistral.yaml +20 -0
  62. package/semgrep-rules/ai/typescript/detect-openai.ts +15 -0
  63. package/semgrep-rules/ai/typescript/detect-openai.yaml +20 -0
  64. package/semgrep-rules/ai/typescript/detect-promptfoo.ts +5 -0
  65. package/semgrep-rules/ai/typescript/detect-promptfoo.yaml +18 -0
  66. package/semgrep-rules/ai/typescript/detect-vercel-ai.ts +49 -0
  67. package/semgrep-rules/ai/typescript/detect-vercel-ai.yaml +20 -0
  68. package/semgrep-rules/apex/lang/best-practice/ncino/accessModifiers/GlobalAccessModifiers.cls +49 -0
  69. package/semgrep-rules/apex/lang/best-practice/ncino/accessModifiers/GlobalAccessModifiers.yaml +25 -0
  70. package/semgrep-rules/apex/lang/best-practice/ncino/urls/AbsoluteUrls.cls +51 -0
  71. package/semgrep-rules/apex/lang/best-practice/ncino/urls/AbsoluteUrls.yaml +23 -0
  72. package/semgrep-rules/apex/lang/performance/ncino/operationsInLoops/AvoidNativeDmlInLoops.cls +146 -0
  73. package/semgrep-rules/apex/lang/performance/ncino/operationsInLoops/AvoidNativeDmlInLoops.yaml +47 -0
  74. package/semgrep-rules/apex/lang/performance/ncino/operationsInLoops/AvoidOperationsWithLimitsInLoops.cls +121 -0
  75. package/semgrep-rules/apex/lang/performance/ncino/operationsInLoops/AvoidOperationsWithLimitsInLoops.yaml +43 -0
  76. package/semgrep-rules/apex/lang/performance/ncino/operationsInLoops/AvoidSoqlInLoops.cls +37 -0
  77. package/semgrep-rules/apex/lang/performance/ncino/operationsInLoops/AvoidSoqlInLoops.yaml +34 -0
  78. package/semgrep-rules/apex/lang/performance/ncino/operationsInLoops/AvoidSoslInLoops.cls +45 -0
  79. package/semgrep-rules/apex/lang/performance/ncino/operationsInLoops/AvoidSoslInLoops.yaml +37 -0
  80. package/semgrep-rules/apex/lang/security/ncino/dml/ApexCSRFConstructor.cls +55 -0
  81. package/semgrep-rules/apex/lang/security/ncino/dml/ApexCSRFConstructor.yaml +51 -0
  82. package/semgrep-rules/apex/lang/security/ncino/dml/ApexCSRFStaticConstructor.cls +30 -0
  83. package/semgrep-rules/apex/lang/security/ncino/dml/ApexCSRFStaticConstructor.yaml +44 -0
  84. package/semgrep-rules/apex/lang/security/ncino/dml/DmlNativeStatements.cls +205 -0
  85. package/semgrep-rules/apex/lang/security/ncino/dml/DmlNativeStatements.yaml +35 -0
  86. package/semgrep-rules/apex/lang/security/ncino/encryption/BadCrypto.cls +77 -0
  87. package/semgrep-rules/apex/lang/security/ncino/encryption/BadCrypto.yaml +34 -0
  88. package/semgrep-rules/apex/lang/security/ncino/endpoints/InsecureHttpRequest.cls +54 -0
  89. package/semgrep-rules/apex/lang/security/ncino/endpoints/InsecureHttpRequest.yaml +30 -0
  90. package/semgrep-rules/apex/lang/security/ncino/endpoints/NamedCredentialsConstantMatch.cls +28 -0
  91. package/semgrep-rules/apex/lang/security/ncino/endpoints/NamedCredentialsConstantMatch.yaml +32 -0
  92. package/semgrep-rules/apex/lang/security/ncino/endpoints/NamedCredentialsStringMatch.cls +26 -0
  93. package/semgrep-rules/apex/lang/security/ncino/endpoints/NamedCredentialsStringMatch.yaml +26 -0
  94. package/semgrep-rules/apex/lang/security/ncino/injection/ApexSOQLInjectionFromUnescapedURLParam.cls +39 -0
  95. package/semgrep-rules/apex/lang/security/ncino/injection/ApexSOQLInjectionFromUnescapedURLParam.yaml +41 -0
  96. package/semgrep-rules/apex/lang/security/ncino/injection/ApexSOQLInjectionUnescapedParam.cls +63 -0
  97. package/semgrep-rules/apex/lang/security/ncino/injection/ApexSOQLInjectionUnescapedParam.yaml +43 -0
  98. package/semgrep-rules/apex/lang/security/ncino/sharing/SpecifySharingLevel.cls +54 -0
  99. package/semgrep-rules/apex/lang/security/ncino/sharing/SpecifySharingLevel.yaml +32 -0
  100. package/semgrep-rules/apex/lang/security/ncino/system/SystemDebug.cls +13 -0
  101. package/semgrep-rules/apex/lang/security/ncino/system/SystemDebug.yaml +30 -0
  102. package/semgrep-rules/bash/curl/security/curl-eval.bash +23 -0
  103. package/semgrep-rules/bash/curl/security/curl-eval.yaml +33 -0
  104. package/semgrep-rules/bash/curl/security/curl-pipe-bash.bash +20 -0
  105. package/semgrep-rules/bash/curl/security/curl-pipe-bash.yaml +35 -0
  106. package/semgrep-rules/bash/lang/best-practice/iteration-over-ls-output.bash +13 -0
  107. package/semgrep-rules/bash/lang/best-practice/iteration-over-ls-output.yaml +21 -0
  108. package/semgrep-rules/bash/lang/best-practice/useless-cat.bash +42 -0
  109. package/semgrep-rules/bash/lang/best-practice/useless-cat.yaml +27 -0
  110. package/semgrep-rules/bash/lang/correctness/unquoted-expansion.bash +104 -0
  111. package/semgrep-rules/bash/lang/correctness/unquoted-expansion.yaml +54 -0
  112. package/semgrep-rules/bash/lang/security/ifs-tampering.bash +5 -0
  113. package/semgrep-rules/bash/lang/security/ifs-tampering.yaml +28 -0
  114. package/semgrep-rules/c/lang/correctness/c-string-equality.c +34 -0
  115. package/semgrep-rules/c/lang/correctness/c-string-equality.fixed.c +34 -0
  116. package/semgrep-rules/c/lang/correctness/c-string-equality.yaml +18 -0
  117. package/semgrep-rules/c/lang/correctness/goto-fail.c +28 -0
  118. package/semgrep-rules/c/lang/correctness/goto-fail.yaml +13 -0
  119. package/semgrep-rules/c/lang/correctness/incorrect-use-ato-fn.c +25 -0
  120. package/semgrep-rules/c/lang/correctness/incorrect-use-ato-fn.yaml +19 -0
  121. package/semgrep-rules/c/lang/correctness/incorrect-use-sscanf-fn.c +78 -0
  122. package/semgrep-rules/c/lang/correctness/incorrect-use-sscanf-fn.yaml +21 -0
  123. package/semgrep-rules/c/lang/security/double-free.c +27 -0
  124. package/semgrep-rules/c/lang/security/double-free.yaml +44 -0
  125. package/semgrep-rules/c/lang/security/function-use-after-free.c +68 -0
  126. package/semgrep-rules/c/lang/security/function-use-after-free.yaml +44 -0
  127. package/semgrep-rules/c/lang/security/info-leak-on-non-formatted-string.c +8 -0
  128. package/semgrep-rules/c/lang/security/info-leak-on-non-formatted-string.yaml +22 -0
  129. package/semgrep-rules/c/lang/security/insecure-use-gets-fn.c +19 -0
  130. package/semgrep-rules/c/lang/security/insecure-use-gets-fn.yaml +21 -0
  131. package/semgrep-rules/c/lang/security/insecure-use-memset.c +19 -0
  132. package/semgrep-rules/c/lang/security/insecure-use-memset.fixed.c +19 -0
  133. package/semgrep-rules/c/lang/security/insecure-use-memset.yaml +35 -0
  134. package/semgrep-rules/c/lang/security/insecure-use-printf-fn.c +64 -0
  135. package/semgrep-rules/c/lang/security/insecure-use-printf-fn.yaml +44 -0
  136. package/semgrep-rules/c/lang/security/insecure-use-scanf-fn.c +19 -0
  137. package/semgrep-rules/c/lang/security/insecure-use-scanf-fn.yaml +22 -0
  138. package/semgrep-rules/c/lang/security/insecure-use-strcat-fn.c +20 -0
  139. package/semgrep-rules/c/lang/security/insecure-use-strcat-fn.yaml +25 -0
  140. package/semgrep-rules/c/lang/security/insecure-use-string-copy-fn.c +20 -0
  141. package/semgrep-rules/c/lang/security/insecure-use-string-copy-fn.yaml +29 -0
  142. package/semgrep-rules/c/lang/security/insecure-use-strtok-fn.c +23 -0
  143. package/semgrep-rules/c/lang/security/insecure-use-strtok-fn.yaml +24 -0
  144. package/semgrep-rules/c/lang/security/random-fd-exhaustion.c +62 -0
  145. package/semgrep-rules/c/lang/security/random-fd-exhaustion.yaml +39 -0
  146. package/semgrep-rules/c/lang/security/use-after-free.c +189 -0
  147. package/semgrep-rules/c/lang/security/use-after-free.yaml +39 -0
  148. package/semgrep-rules/clojure/lang/security/command-injection-shell-call.clj +29 -0
  149. package/semgrep-rules/clojure/lang/security/command-injection-shell-call.yaml +40 -0
  150. package/semgrep-rules/clojure/lang/security/documentbuilderfactory-xxe.clj +41 -0
  151. package/semgrep-rules/clojure/lang/security/documentbuilderfactory-xxe.yaml +68 -0
  152. package/semgrep-rules/clojure/lang/security/use-of-md5.clj +20 -0
  153. package/semgrep-rules/clojure/lang/security/use-of-md5.yaml +35 -0
  154. package/semgrep-rules/clojure/lang/security/use-of-sha1.clj +56 -0
  155. package/semgrep-rules/clojure/lang/security/use-of-sha1.yaml +35 -0
  156. package/semgrep-rules/clojure/security/clojure-read-string/read-string-unsafe.clj +19 -0
  157. package/semgrep-rules/clojure/security/clojure-read-string/read-string-unsafe.yaml +41 -0
  158. package/semgrep-rules/csharp/dotnet/security/audit/ldap-injection.cs +51 -0
  159. package/semgrep-rules/csharp/dotnet/security/audit/ldap-injection.yaml +43 -0
  160. package/semgrep-rules/csharp/dotnet/security/audit/mass-assignment.cs +22 -0
  161. package/semgrep-rules/csharp/dotnet/security/audit/mass-assignment.yaml +50 -0
  162. package/semgrep-rules/csharp/dotnet/security/audit/misconfigured-lockout-option.cs +69 -0
  163. package/semgrep-rules/csharp/dotnet/security/audit/misconfigured-lockout-option.yaml +35 -0
  164. package/semgrep-rules/csharp/dotnet/security/audit/missing-or-broken-authorization.cs +28 -0
  165. package/semgrep-rules/csharp/dotnet/security/audit/missing-or-broken-authorization.yaml +59 -0
  166. package/semgrep-rules/csharp/dotnet/security/audit/open-directory-listing.cs +28 -0
  167. package/semgrep-rules/csharp/dotnet/security/audit/open-directory-listing.yaml +35 -0
  168. package/semgrep-rules/csharp/dotnet/security/audit/razor-use-of-htmlstring.cshtml +29 -0
  169. package/semgrep-rules/csharp/dotnet/security/audit/razor-use-of-htmlstring.yaml +35 -0
  170. package/semgrep-rules/csharp/dotnet/security/audit/xpath-injection.cs +30 -0
  171. package/semgrep-rules/csharp/dotnet/security/audit/xpath-injection.yaml +36 -0
  172. package/semgrep-rules/csharp/dotnet/security/mvc-missing-antiforgery.cs +63 -0
  173. package/semgrep-rules/csharp/dotnet/security/mvc-missing-antiforgery.yaml +50 -0
  174. package/semgrep-rules/csharp/dotnet/security/net-webconfig-debug.web.config +20 -0
  175. package/semgrep-rules/csharp/dotnet/security/net-webconfig-debug.yaml +34 -0
  176. package/semgrep-rules/csharp/dotnet/security/net-webconfig-trace-enabled.web.config +30 -0
  177. package/semgrep-rules/csharp/dotnet/security/net-webconfig-trace-enabled.yaml +32 -0
  178. package/semgrep-rules/csharp/dotnet/security/razor-template-injection.cs +36 -0
  179. package/semgrep-rules/csharp/dotnet/security/razor-template-injection.yaml +37 -0
  180. package/semgrep-rules/csharp/dotnet/security/use_deprecated_cipher_algorithm.cs +55 -0
  181. package/semgrep-rules/csharp/dotnet/security/use_deprecated_cipher_algorithm.yaml +31 -0
  182. package/semgrep-rules/csharp/dotnet/security/use_ecb_mode.cs +127 -0
  183. package/semgrep-rules/csharp/dotnet/security/use_ecb_mode.yaml +39 -0
  184. package/semgrep-rules/csharp/dotnet/security/use_weak_rng_for_keygeneration.cs +71 -0
  185. package/semgrep-rules/csharp/dotnet/security/use_weak_rng_for_keygeneration.yaml +48 -0
  186. package/semgrep-rules/csharp/dotnet/security/use_weak_rsa_encryption_padding.cs +65 -0
  187. package/semgrep-rules/csharp/dotnet/security/use_weak_rsa_encryption_padding.yaml +28 -0
  188. package/semgrep-rules/csharp/dotnet/security/web-config-insecure-cookie-settings.web.config +87 -0
  189. package/semgrep-rules/csharp/dotnet/security/web-config-insecure-cookie-settings.yaml +42 -0
  190. package/semgrep-rules/csharp/lang/best-practice/structured-logging.cs +83 -0
  191. package/semgrep-rules/csharp/lang/best-practice/structured-logging.yaml +49 -0
  192. package/semgrep-rules/csharp/lang/correctness/double/double-epsilon-equality.cs +67 -0
  193. package/semgrep-rules/csharp/lang/correctness/double/double-epsilon-equality.yaml +34 -0
  194. package/semgrep-rules/csharp/lang/correctness/regioninfo/regioninfo-interop.cs +24 -0
  195. package/semgrep-rules/csharp/lang/correctness/regioninfo/regioninfo-interop.yaml +37 -0
  196. package/semgrep-rules/csharp/lang/correctness/sslcertificatetrust/sslcertificatetrust-handshake-no-trust.cs +31 -0
  197. package/semgrep-rules/csharp/lang/correctness/sslcertificatetrust/sslcertificatetrust-handshake-no-trust.fixed.cs +31 -0
  198. package/semgrep-rules/csharp/lang/correctness/sslcertificatetrust/sslcertificatetrust-handshake-no-trust.yaml +23 -0
  199. package/semgrep-rules/csharp/lang/security/ad/jwt-tokenvalidationparameters-no-expiry-validation.cs +41 -0
  200. package/semgrep-rules/csharp/lang/security/ad/jwt-tokenvalidationparameters-no-expiry-validation.yaml +44 -0
  201. package/semgrep-rules/csharp/lang/security/cryptography/X509-subject-name-validation.cs +81 -0
  202. package/semgrep-rules/csharp/lang/security/cryptography/X509-subject-name-validation.yaml +73 -0
  203. package/semgrep-rules/csharp/lang/security/cryptography/X509Certificate2-privkey.cs +32 -0
  204. package/semgrep-rules/csharp/lang/security/cryptography/X509Certificate2-privkey.yaml +38 -0
  205. package/semgrep-rules/csharp/lang/security/cryptography/unsigned-security-token.cs +22 -0
  206. package/semgrep-rules/csharp/lang/security/cryptography/unsigned-security-token.yaml +31 -0
  207. package/semgrep-rules/csharp/lang/security/filesystem/unsafe-path-combine.cs +58 -0
  208. package/semgrep-rules/csharp/lang/security/filesystem/unsafe-path-combine.yaml +60 -0
  209. package/semgrep-rules/csharp/lang/security/http/http-listener-wildcard-bindings.cs +36 -0
  210. package/semgrep-rules/csharp/lang/security/http/http-listener-wildcard-bindings.yaml +34 -0
  211. package/semgrep-rules/csharp/lang/security/injections/os-command.cs +180 -0
  212. package/semgrep-rules/csharp/lang/security/injections/os-command.yaml +93 -0
  213. package/semgrep-rules/csharp/lang/security/insecure-deserialization/binary-formatter.cs +24 -0
  214. package/semgrep-rules/csharp/lang/security/insecure-deserialization/binary-formatter.yaml +34 -0
  215. package/semgrep-rules/csharp/lang/security/insecure-deserialization/data-contract-resolver.cs +11 -0
  216. package/semgrep-rules/csharp/lang/security/insecure-deserialization/data-contract-resolver.yaml +29 -0
  217. package/semgrep-rules/csharp/lang/security/insecure-deserialization/fast-json.cs +20 -0
  218. package/semgrep-rules/csharp/lang/security/insecure-deserialization/fast-json.yaml +36 -0
  219. package/semgrep-rules/csharp/lang/security/insecure-deserialization/fs-pickler.cs +22 -0
  220. package/semgrep-rules/csharp/lang/security/insecure-deserialization/fs-pickler.yaml +33 -0
  221. package/semgrep-rules/csharp/lang/security/insecure-deserialization/insecure-typefilterlevel-full.cs +21 -0
  222. package/semgrep-rules/csharp/lang/security/insecure-deserialization/insecure-typefilterlevel-full.yaml +48 -0
  223. package/semgrep-rules/csharp/lang/security/insecure-deserialization/javascript-serializer.cs +26 -0
  224. package/semgrep-rules/csharp/lang/security/insecure-deserialization/javascript-serializer.yaml +33 -0
  225. package/semgrep-rules/csharp/lang/security/insecure-deserialization/los-formatter.cs +21 -0
  226. package/semgrep-rules/csharp/lang/security/insecure-deserialization/los-formatter.yaml +35 -0
  227. package/semgrep-rules/csharp/lang/security/insecure-deserialization/net-data-contract.cs +24 -0
  228. package/semgrep-rules/csharp/lang/security/insecure-deserialization/net-data-contract.yaml +35 -0
  229. package/semgrep-rules/csharp/lang/security/insecure-deserialization/newtonsoft.cs +60 -0
  230. package/semgrep-rules/csharp/lang/security/insecure-deserialization/newtonsoft.yaml +45 -0
  231. package/semgrep-rules/csharp/lang/security/insecure-deserialization/soap-formatter.cs +23 -0
  232. package/semgrep-rules/csharp/lang/security/insecure-deserialization/soap-formatter.yaml +35 -0
  233. package/semgrep-rules/csharp/lang/security/memory/memory-marshal-create-span.cs +17 -0
  234. package/semgrep-rules/csharp/lang/security/memory/memory-marshal-create-span.yaml +29 -0
  235. package/semgrep-rules/csharp/lang/security/missing-hsts-header.cs +83 -0
  236. package/semgrep-rules/csharp/lang/security/missing-hsts-header.yaml +52 -0
  237. package/semgrep-rules/csharp/lang/security/open-redirect.cs +78 -0
  238. package/semgrep-rules/csharp/lang/security/open-redirect.yaml +47 -0
  239. package/semgrep-rules/csharp/lang/security/regular-expression-dos/regular-expression-dos-infinite-timeout.cs +22 -0
  240. package/semgrep-rules/csharp/lang/security/regular-expression-dos/regular-expression-dos-infinite-timeout.yaml +39 -0
  241. package/semgrep-rules/csharp/lang/security/regular-expression-dos/regular-expression-dos.cs +52 -0
  242. package/semgrep-rules/csharp/lang/security/regular-expression-dos/regular-expression-dos.yaml +53 -0
  243. package/semgrep-rules/csharp/lang/security/sqli/csharp-sqli.cs +198 -0
  244. package/semgrep-rules/csharp/lang/security/sqli/csharp-sqli.yaml +60 -0
  245. package/semgrep-rules/csharp/lang/security/ssrf/http-client.cs +230 -0
  246. package/semgrep-rules/csharp/lang/security/ssrf/http-client.yaml +66 -0
  247. package/semgrep-rules/csharp/lang/security/ssrf/rest-client.cs +135 -0
  248. package/semgrep-rules/csharp/lang/security/ssrf/rest-client.yaml +44 -0
  249. package/semgrep-rules/csharp/lang/security/ssrf/web-client.cs +466 -0
  250. package/semgrep-rules/csharp/lang/security/ssrf/web-client.yaml +84 -0
  251. package/semgrep-rules/csharp/lang/security/ssrf/web-request.cs +93 -0
  252. package/semgrep-rules/csharp/lang/security/ssrf/web-request.yaml +59 -0
  253. package/semgrep-rules/csharp/lang/security/stacktrace-disclosure.cs +33 -0
  254. package/semgrep-rules/csharp/lang/security/stacktrace-disclosure.yaml +32 -0
  255. package/semgrep-rules/csharp/lang/security/xxe/xmldocument-unsafe-parser-override.cs +35 -0
  256. package/semgrep-rules/csharp/lang/security/xxe/xmldocument-unsafe-parser-override.yaml +43 -0
  257. package/semgrep-rules/csharp/lang/security/xxe/xmlreadersettings-unsafe-parser-override.cs +116 -0
  258. package/semgrep-rules/csharp/lang/security/xxe/xmlreadersettings-unsafe-parser-override.yaml +43 -0
  259. package/semgrep-rules/csharp/lang/security/xxe/xmltextreader-unsafe-defaults.cs +51 -0
  260. package/semgrep-rules/csharp/lang/security/xxe/xmltextreader-unsafe-defaults.yaml +44 -0
  261. package/semgrep-rules/csharp/razor/security/html-raw-json.cshtml +20 -0
  262. package/semgrep-rules/csharp/razor/security/html-raw-json.yaml +33 -0
  263. package/semgrep-rules/dockerfile/audit/dockerfile-source-not-pinned.dockerfile +20 -0
  264. package/semgrep-rules/dockerfile/audit/dockerfile-source-not-pinned.yaml +26 -0
  265. package/semgrep-rules/dockerfile/best-practice/avoid-apk-upgrade.dockerfile +16 -0
  266. package/semgrep-rules/dockerfile/best-practice/avoid-apk-upgrade.yaml +17 -0
  267. package/semgrep-rules/dockerfile/best-practice/avoid-apt-get-upgrade.dockerfile +16 -0
  268. package/semgrep-rules/dockerfile/best-practice/avoid-apt-get-upgrade.yaml +17 -0
  269. package/semgrep-rules/dockerfile/best-practice/avoid-dnf-update.dockerfile +11 -0
  270. package/semgrep-rules/dockerfile/best-practice/avoid-dnf-update.yaml +16 -0
  271. package/semgrep-rules/dockerfile/best-practice/avoid-latest-version.dockerfile +23 -0
  272. package/semgrep-rules/dockerfile/best-practice/avoid-latest-version.yaml +16 -0
  273. package/semgrep-rules/dockerfile/best-practice/avoid-platform-with-from.dockerfile +25 -0
  274. package/semgrep-rules/dockerfile/best-practice/avoid-platform-with-from.yaml +20 -0
  275. package/semgrep-rules/dockerfile/best-practice/avoid-yum-update.dockerfile +11 -0
  276. package/semgrep-rules/dockerfile/best-practice/avoid-yum-update.yaml +16 -0
  277. package/semgrep-rules/dockerfile/best-practice/avoid-zypper-update.dockerfile +15 -0
  278. package/semgrep-rules/dockerfile/best-practice/avoid-zypper-update.yaml +16 -0
  279. package/semgrep-rules/dockerfile/best-practice/maintainer-is-deprecated.dockerfile +6 -0
  280. package/semgrep-rules/dockerfile/best-practice/maintainer-is-deprecated.fixed.dockerfile +6 -0
  281. package/semgrep-rules/dockerfile/best-practice/maintainer-is-deprecated.yaml +15 -0
  282. package/semgrep-rules/dockerfile/best-practice/missing-apk-no-cache.dockerfile +35 -0
  283. package/semgrep-rules/dockerfile/best-practice/missing-apk-no-cache.yaml +22 -0
  284. package/semgrep-rules/dockerfile/best-practice/missing-dnf-assume-yes-switch.dockerfile +33 -0
  285. package/semgrep-rules/dockerfile/best-practice/missing-dnf-assume-yes-switch.yaml +21 -0
  286. package/semgrep-rules/dockerfile/best-practice/missing-dnf-clean-all.dockerfile +16 -0
  287. package/semgrep-rules/dockerfile/best-practice/missing-dnf-clean-all.yaml +17 -0
  288. package/semgrep-rules/dockerfile/best-practice/missing-image-version.dockerfile +57 -0
  289. package/semgrep-rules/dockerfile/best-practice/missing-image-version.yaml +23 -0
  290. package/semgrep-rules/dockerfile/best-practice/missing-no-install-recommends.dockerfile +66 -0
  291. package/semgrep-rules/dockerfile/best-practice/missing-no-install-recommends.yaml +20 -0
  292. package/semgrep-rules/dockerfile/best-practice/missing-pip-no-cache-dir.dockerfile +68 -0
  293. package/semgrep-rules/dockerfile/best-practice/missing-pip-no-cache-dir.yaml +34 -0
  294. package/semgrep-rules/dockerfile/best-practice/missing-yum-assume-yes-switch.dockerfile +33 -0
  295. package/semgrep-rules/dockerfile/best-practice/missing-yum-assume-yes-switch.yaml +21 -0
  296. package/semgrep-rules/dockerfile/best-practice/missing-zypper-clean.dockerfile +10 -0
  297. package/semgrep-rules/dockerfile/best-practice/missing-zypper-clean.yaml +17 -0
  298. package/semgrep-rules/dockerfile/best-practice/nonsensical-command.dockerfile +25 -0
  299. package/semgrep-rules/dockerfile/best-practice/nonsensical-command.yaml +19 -0
  300. package/semgrep-rules/dockerfile/best-practice/prefer-apt-get.dockerfile +9 -0
  301. package/semgrep-rules/dockerfile/best-practice/prefer-apt-get.yaml +16 -0
  302. package/semgrep-rules/dockerfile/best-practice/prefer-copy-over-add.dockerfile +31 -0
  303. package/semgrep-rules/dockerfile/best-practice/prefer-copy-over-add.yaml +23 -0
  304. package/semgrep-rules/dockerfile/best-practice/prefer-json-notation.dockerfile +20 -0
  305. package/semgrep-rules/dockerfile/best-practice/prefer-json-notation.yaml +22 -0
  306. package/semgrep-rules/dockerfile/best-practice/remove-package-cache.dockerfile +33 -0
  307. package/semgrep-rules/dockerfile/best-practice/remove-package-cache.yaml +18 -0
  308. package/semgrep-rules/dockerfile/best-practice/remove-package-lists.dockerfile +38 -0
  309. package/semgrep-rules/dockerfile/best-practice/remove-package-lists.yaml +21 -0
  310. package/semgrep-rules/dockerfile/best-practice/set-pipefail.dockerfile +17 -0
  311. package/semgrep-rules/dockerfile/best-practice/set-pipefail.yaml +27 -0
  312. package/semgrep-rules/dockerfile/best-practice/use-either-wget-or-curl.dockerfile +6 -0
  313. package/semgrep-rules/dockerfile/best-practice/use-either-wget-or-curl.yaml +22 -0
  314. package/semgrep-rules/dockerfile/best-practice/use-shell-instruction.dockerfile +16 -0
  315. package/semgrep-rules/dockerfile/best-practice/use-shell-instruction.fixed.dockerfile +16 -0
  316. package/semgrep-rules/dockerfile/best-practice/use-shell-instruction.yaml +16 -0
  317. package/semgrep-rules/dockerfile/best-practice/use-workdir.dockerfile +16 -0
  318. package/semgrep-rules/dockerfile/best-practice/use-workdir.yaml +27 -0
  319. package/semgrep-rules/dockerfile/correctness/invalid-port.dockerfile +15 -0
  320. package/semgrep-rules/dockerfile/correctness/invalid-port.yaml +19 -0
  321. package/semgrep-rules/dockerfile/correctness/missing-assume-yes-switch.dockerfile +66 -0
  322. package/semgrep-rules/dockerfile/correctness/missing-assume-yes-switch.yaml +26 -0
  323. package/semgrep-rules/dockerfile/correctness/multiple-entrypoint-instructions.dockerfile +7 -0
  324. package/semgrep-rules/dockerfile/correctness/multiple-entrypoint-instructions.yaml +28 -0
  325. package/semgrep-rules/dockerfile/security/dockerd-socket-mount.dockerfile +11 -0
  326. package/semgrep-rules/dockerfile/security/dockerd-socket-mount.yaml +36 -0
  327. package/semgrep-rules/dockerfile/security/last-user-is-root.dockerfile +12 -0
  328. package/semgrep-rules/dockerfile/security/last-user-is-root.yaml +38 -0
  329. package/semgrep-rules/dockerfile/security/missing-user-entrypoint.dockerfile +13 -0
  330. package/semgrep-rules/dockerfile/security/missing-user-entrypoint.fixed.dockerfile +15 -0
  331. package/semgrep-rules/dockerfile/security/missing-user-entrypoint.yaml +32 -0
  332. package/semgrep-rules/dockerfile/security/missing-user.dockerfile +16 -0
  333. package/semgrep-rules/dockerfile/security/missing-user.fixed.dockerfile +19 -0
  334. package/semgrep-rules/dockerfile/security/missing-user.yaml +32 -0
  335. package/semgrep-rules/dockerfile/security/no-sudo-in-dockerfile.dockerfile +21 -0
  336. package/semgrep-rules/dockerfile/security/no-sudo-in-dockerfile.yaml +27 -0
  337. package/semgrep-rules/dockerfile/security/secret-in-build-arg.dockerfile +45 -0
  338. package/semgrep-rules/dockerfile/security/secret-in-build-arg.yaml +34 -0
  339. package/semgrep-rules/elixir/lang/best-practice/deprecated-bnot-operator.exs +5 -0
  340. package/semgrep-rules/elixir/lang/best-practice/deprecated-bnot-operator.fixed.exs +5 -0
  341. package/semgrep-rules/elixir/lang/best-practice/deprecated-bnot-operator.yaml +15 -0
  342. package/semgrep-rules/elixir/lang/best-practice/deprecated-bxor-operator.exs +2 -0
  343. package/semgrep-rules/elixir/lang/best-practice/deprecated-bxor-operator.fixed.exs +2 -0
  344. package/semgrep-rules/elixir/lang/best-practice/deprecated-bxor-operator.yaml +15 -0
  345. package/semgrep-rules/elixir/lang/best-practice/deprecated-calendar-iso-day-of-week-3.exs +2 -0
  346. package/semgrep-rules/elixir/lang/best-practice/deprecated-calendar-iso-day-of-week-3.fixed.exs +2 -0
  347. package/semgrep-rules/elixir/lang/best-practice/deprecated-calendar-iso-day-of-week-3.yaml +16 -0
  348. package/semgrep-rules/elixir/lang/best-practice/deprecated-use-bitwise.exs +2 -0
  349. package/semgrep-rules/elixir/lang/best-practice/deprecated-use-bitwise.fixed.exs +2 -0
  350. package/semgrep-rules/elixir/lang/best-practice/deprecated-use-bitwise.yaml +15 -0
  351. package/semgrep-rules/elixir/lang/best-practice/enum-map-into.exs +11 -0
  352. package/semgrep-rules/elixir/lang/best-practice/enum-map-into.fixed.exs +11 -0
  353. package/semgrep-rules/elixir/lang/best-practice/enum-map-into.yaml +26 -0
  354. package/semgrep-rules/elixir/lang/best-practice/enum-map-join.exs +11 -0
  355. package/semgrep-rules/elixir/lang/best-practice/enum-map-join.fixed.exs +11 -0
  356. package/semgrep-rules/elixir/lang/best-practice/enum-map-join.yaml +26 -0
  357. package/semgrep-rules/elixir/lang/correctness/atom-exhaustion.exs +4 -0
  358. package/semgrep-rules/elixir/lang/correctness/atom-exhaustion.fixed.exs +4 -0
  359. package/semgrep-rules/elixir/lang/correctness/atom-exhaustion.yaml +19 -0
  360. package/semgrep-rules/generic/bicep/security/secure-parameter-for-secrets.bicep +12 -0
  361. package/semgrep-rules/generic/bicep/security/secure-parameter-for-secrets.yaml +35 -0
  362. package/semgrep-rules/generic/ci/audit/changed-semgrepignore.yaml +24 -0
  363. package/semgrep-rules/generic/ci/security/bash-reverse-shell.generic +11 -0
  364. package/semgrep-rules/generic/ci/security/bash-reverse-shell.yaml +31 -0
  365. package/semgrep-rules/generic/ci/security/use-frozen-lockfile.fixed.generic +48 -0
  366. package/semgrep-rules/generic/dockerfile/best-practice/missing-yum-clean-all.dockerfile +14 -0
  367. package/semgrep-rules/generic/dockerfile/best-practice/missing-yum-clean-all.yaml +22 -0
  368. package/semgrep-rules/generic/dockerfile/best-practice/use-absolute-workdir.dockerfile +15 -0
  369. package/semgrep-rules/generic/dockerfile/best-practice/use-absolute-workdir.yaml +35 -0
  370. package/semgrep-rules/generic/dockerfile/correctness/alias-must-be-unique.dockerfile +15 -0
  371. package/semgrep-rules/generic/dockerfile/correctness/alias-must-be-unique.yaml +40 -0
  372. package/semgrep-rules/generic/dockerfile/correctness/copy-from-own-alias.dockerfile +13 -0
  373. package/semgrep-rules/generic/dockerfile/correctness/copy-from-own-alias.yaml +33 -0
  374. package/semgrep-rules/generic/dockerfile/correctness/multiple-cmd-instructions-ok.dockerfile +14 -0
  375. package/semgrep-rules/generic/dockerfile/correctness/multiple-cmd-instructions.dockerfile +6 -0
  376. package/semgrep-rules/generic/dockerfile/correctness/multiple-cmd-instructions.yaml +54 -0
  377. package/semgrep-rules/generic/dockerfile/missing-zypper-no-confirm-switch.dockerfile +8 -0
  378. package/semgrep-rules/generic/dockerfile/missing-zypper-no-confirm-switch.yaml +25 -0
  379. package/semgrep-rules/generic/gradle/security/build-gradle-password-hardcoded.build.gradle +108 -0
  380. package/semgrep-rules/generic/gradle/security/build-gradle-password-hardcoded.yaml +38 -0
  381. package/semgrep-rules/generic/html-templates/security/unquoted-attribute-var.html +85 -0
  382. package/semgrep-rules/generic/html-templates/security/unquoted-attribute-var.yaml +40 -0
  383. package/semgrep-rules/generic/html-templates/security/var-in-href.html +59 -0
  384. package/semgrep-rules/generic/html-templates/security/var-in-href.mustache +62 -0
  385. package/semgrep-rules/generic/html-templates/security/var-in-href.yaml +52 -0
  386. package/semgrep-rules/generic/html-templates/security/var-in-script-src.html +50 -0
  387. package/semgrep-rules/generic/html-templates/security/var-in-script-src.yaml +45 -0
  388. package/semgrep-rules/generic/html-templates/security/var-in-script-tag.html +20 -0
  389. package/semgrep-rules/generic/html-templates/security/var-in-script-tag.mustache +70 -0
  390. package/semgrep-rules/generic/html-templates/security/var-in-script-tag.yaml +46 -0
  391. package/semgrep-rules/generic/hugo/best-practice/invalid-base-url.toml +24 -0
  392. package/semgrep-rules/generic/hugo/best-practice/invalid-base-url.yaml +16 -0
  393. package/semgrep-rules/generic/hugo/best-practice/localhost-base-url.toml +18 -0
  394. package/semgrep-rules/generic/hugo/best-practice/localhost-base-url.yaml +14 -0
  395. package/semgrep-rules/generic/nginx/security/alias-path-traversal.conf +29 -0
  396. package/semgrep-rules/generic/nginx/security/alias-path-traversal.yaml +50 -0
  397. package/semgrep-rules/generic/nginx/security/dynamic-proxy-host.conf +41 -0
  398. package/semgrep-rules/generic/nginx/security/dynamic-proxy-host.yaml +35 -0
  399. package/semgrep-rules/generic/nginx/security/dynamic-proxy-scheme.conf +31 -0
  400. package/semgrep-rules/generic/nginx/security/dynamic-proxy-scheme.yaml +33 -0
  401. package/semgrep-rules/generic/nginx/security/header-injection.conf +16 -0
  402. package/semgrep-rules/generic/nginx/security/header-injection.yaml +38 -0
  403. package/semgrep-rules/generic/nginx/security/header-redefinition.conf +18 -0
  404. package/semgrep-rules/generic/nginx/security/header-redefinition.yaml +46 -0
  405. package/semgrep-rules/generic/nginx/security/insecure-redirect.sites-available.conf +68 -0
  406. package/semgrep-rules/generic/nginx/security/insecure-redirect.yaml +38 -0
  407. package/semgrep-rules/generic/nginx/security/insecure-ssl-version.conf +31 -0
  408. package/semgrep-rules/generic/nginx/security/insecure-ssl-version.yaml +38 -0
  409. package/semgrep-rules/generic/nginx/security/missing-internal.conf +29 -0
  410. package/semgrep-rules/generic/nginx/security/missing-internal.yaml +52 -0
  411. package/semgrep-rules/generic/nginx/security/missing-ssl-version.conf +40 -0
  412. package/semgrep-rules/generic/nginx/security/missing-ssl-version.yaml +36 -0
  413. package/semgrep-rules/generic/nginx/security/possible-h2c-smuggling.conf +19 -0
  414. package/semgrep-rules/generic/nginx/security/possible-h2c-smuggling.yaml +60 -0
  415. package/semgrep-rules/generic/nginx/security/request-host-used.conf +19 -0
  416. package/semgrep-rules/generic/nginx/security/request-host-used.yaml +35 -0
  417. package/semgrep-rules/generic/secrets/gitleaks/adafruit-api-key.go +2 -0
  418. package/semgrep-rules/generic/secrets/gitleaks/adafruit-api-key.yaml +26 -0
  419. package/semgrep-rules/generic/secrets/gitleaks/adobe-client-id.go +2 -0
  420. package/semgrep-rules/generic/secrets/gitleaks/adobe-client-id.yaml +26 -0
  421. package/semgrep-rules/generic/secrets/gitleaks/adobe-client-secret.go +2 -0
  422. package/semgrep-rules/generic/secrets/gitleaks/adobe-client-secret.yaml +26 -0
  423. package/semgrep-rules/generic/secrets/gitleaks/age-secret-key.go +2 -0
  424. package/semgrep-rules/generic/secrets/gitleaks/age-secret-key.yaml +26 -0
  425. package/semgrep-rules/generic/secrets/gitleaks/airtable-api-key.go +2 -0
  426. package/semgrep-rules/generic/secrets/gitleaks/airtable-api-key.yaml +26 -0
  427. package/semgrep-rules/generic/secrets/gitleaks/algolia-api-key.go +2 -0
  428. package/semgrep-rules/generic/secrets/gitleaks/algolia-api-key.yaml +26 -0
  429. package/semgrep-rules/generic/secrets/gitleaks/alibaba-access-key-id.go +2 -0
  430. package/semgrep-rules/generic/secrets/gitleaks/alibaba-access-key-id.yaml +26 -0
  431. package/semgrep-rules/generic/secrets/gitleaks/alibaba-secret-key.go +2 -0
  432. package/semgrep-rules/generic/secrets/gitleaks/alibaba-secret-key.yaml +26 -0
  433. package/semgrep-rules/generic/secrets/gitleaks/asana-client-id.go +2 -0
  434. package/semgrep-rules/generic/secrets/gitleaks/asana-client-id.yaml +26 -0
  435. package/semgrep-rules/generic/secrets/gitleaks/asana-client-secret.go +2 -0
  436. package/semgrep-rules/generic/secrets/gitleaks/asana-client-secret.yaml +26 -0
  437. package/semgrep-rules/generic/secrets/gitleaks/atlassian-api-token.go +4 -0
  438. package/semgrep-rules/generic/secrets/gitleaks/atlassian-api-token.yaml +26 -0
  439. package/semgrep-rules/generic/secrets/gitleaks/authress-service-client-access-key.txt +2 -0
  440. package/semgrep-rules/generic/secrets/gitleaks/authress-service-client-access-key.yaml +26 -0
  441. package/semgrep-rules/generic/secrets/gitleaks/aws-access-token.go +2 -0
  442. package/semgrep-rules/generic/secrets/gitleaks/aws-access-token.yaml +26 -0
  443. package/semgrep-rules/generic/secrets/gitleaks/beamer-api-token.go +2 -0
  444. package/semgrep-rules/generic/secrets/gitleaks/beamer-api-token.yaml +26 -0
  445. package/semgrep-rules/generic/secrets/gitleaks/bitbucket-client-id.go +2 -0
  446. package/semgrep-rules/generic/secrets/gitleaks/bitbucket-client-id.yaml +26 -0
  447. package/semgrep-rules/generic/secrets/gitleaks/bitbucket-client-secret.go +2 -0
  448. package/semgrep-rules/generic/secrets/gitleaks/bitbucket-client-secret.yaml +26 -0
  449. package/semgrep-rules/generic/secrets/gitleaks/bittrex-access-key.go +2 -0
  450. package/semgrep-rules/generic/secrets/gitleaks/bittrex-access-key.yaml +26 -0
  451. package/semgrep-rules/generic/secrets/gitleaks/bittrex-secret-key.go +2 -0
  452. package/semgrep-rules/generic/secrets/gitleaks/bittrex-secret-key.yaml +26 -0
  453. package/semgrep-rules/generic/secrets/gitleaks/clojars-api-token.go +2 -0
  454. package/semgrep-rules/generic/secrets/gitleaks/clojars-api-token.yaml +26 -0
  455. package/semgrep-rules/generic/secrets/gitleaks/cloudflare-api-key.yaml +26 -0
  456. package/semgrep-rules/generic/secrets/gitleaks/cloudflare-global-api-key.yaml +26 -0
  457. package/semgrep-rules/generic/secrets/gitleaks/cloudflare-origin-ca-key.yaml +26 -0
  458. package/semgrep-rules/generic/secrets/gitleaks/codecov-access-token.go +2 -0
  459. package/semgrep-rules/generic/secrets/gitleaks/codecov-access-token.yaml +26 -0
  460. package/semgrep-rules/generic/secrets/gitleaks/coinbase-access-token.go +2 -0
  461. package/semgrep-rules/generic/secrets/gitleaks/coinbase-access-token.yaml +26 -0
  462. package/semgrep-rules/generic/secrets/gitleaks/confluent-access-token.go +2 -0
  463. package/semgrep-rules/generic/secrets/gitleaks/confluent-access-token.yaml +26 -0
  464. package/semgrep-rules/generic/secrets/gitleaks/confluent-secret-key.go +2 -0
  465. package/semgrep-rules/generic/secrets/gitleaks/confluent-secret-key.yaml +26 -0
  466. package/semgrep-rules/generic/secrets/gitleaks/contentful-delivery-api-token.go +2 -0
  467. package/semgrep-rules/generic/secrets/gitleaks/contentful-delivery-api-token.yaml +26 -0
  468. package/semgrep-rules/generic/secrets/gitleaks/databricks-api-token.go +2 -0
  469. package/semgrep-rules/generic/secrets/gitleaks/databricks-api-token.yaml +26 -0
  470. package/semgrep-rules/generic/secrets/gitleaks/datadog-access-token.go +2 -0
  471. package/semgrep-rules/generic/secrets/gitleaks/datadog-access-token.yaml +26 -0
  472. package/semgrep-rules/generic/secrets/gitleaks/defined-networking-api-token.txt +2 -0
  473. package/semgrep-rules/generic/secrets/gitleaks/defined-networking-api-token.yaml +26 -0
  474. package/semgrep-rules/generic/secrets/gitleaks/digitalocean-access-token.go +2 -0
  475. package/semgrep-rules/generic/secrets/gitleaks/digitalocean-access-token.yaml +26 -0
  476. package/semgrep-rules/generic/secrets/gitleaks/digitalocean-pat.go +2 -0
  477. package/semgrep-rules/generic/secrets/gitleaks/digitalocean-pat.yaml +26 -0
  478. package/semgrep-rules/generic/secrets/gitleaks/digitalocean-refresh-token.go +2 -0
  479. package/semgrep-rules/generic/secrets/gitleaks/digitalocean-refresh-token.yaml +26 -0
  480. package/semgrep-rules/generic/secrets/gitleaks/discord-api-token.go +2 -0
  481. package/semgrep-rules/generic/secrets/gitleaks/discord-api-token.yaml +26 -0
  482. package/semgrep-rules/generic/secrets/gitleaks/discord-client-id.go +2 -0
  483. package/semgrep-rules/generic/secrets/gitleaks/discord-client-id.yaml +26 -0
  484. package/semgrep-rules/generic/secrets/gitleaks/discord-client-secret.go +2 -0
  485. package/semgrep-rules/generic/secrets/gitleaks/discord-client-secret.yaml +26 -0
  486. package/semgrep-rules/generic/secrets/gitleaks/doppler-api-token.go +2 -0
  487. package/semgrep-rules/generic/secrets/gitleaks/doppler-api-token.yaml +26 -0
  488. package/semgrep-rules/generic/secrets/gitleaks/droneci-access-token.go +2 -0
  489. package/semgrep-rules/generic/secrets/gitleaks/droneci-access-token.yaml +26 -0
  490. package/semgrep-rules/generic/secrets/gitleaks/dropbox-api-token.go +2 -0
  491. package/semgrep-rules/generic/secrets/gitleaks/dropbox-api-token.yaml +26 -0
  492. package/semgrep-rules/generic/secrets/gitleaks/dropbox-long-lived-api-token.go +2 -0
  493. package/semgrep-rules/generic/secrets/gitleaks/dropbox-long-lived-api-token.yaml +26 -0
  494. package/semgrep-rules/generic/secrets/gitleaks/dropbox-short-lived-api-token.go +2 -0
  495. package/semgrep-rules/generic/secrets/gitleaks/dropbox-short-lived-api-token.yaml +26 -0
  496. package/semgrep-rules/generic/secrets/gitleaks/duffel-api-token.go +2 -0
  497. package/semgrep-rules/generic/secrets/gitleaks/duffel-api-token.yaml +26 -0
  498. package/semgrep-rules/generic/secrets/gitleaks/dynatrace-api-token.go +2 -0
  499. package/semgrep-rules/generic/secrets/gitleaks/dynatrace-api-token.yaml +26 -0
  500. package/semgrep-rules/generic/secrets/gitleaks/easypost-api-token.go +2 -0
  501. package/semgrep-rules/generic/secrets/gitleaks/easypost-api-token.yaml +26 -0
  502. package/semgrep-rules/generic/secrets/gitleaks/easypost-test-api-token.go +2 -0
  503. package/semgrep-rules/generic/secrets/gitleaks/easypost-test-api-token.yaml +26 -0
  504. package/semgrep-rules/generic/secrets/gitleaks/etsy-access-token.go +2 -0
  505. package/semgrep-rules/generic/secrets/gitleaks/etsy-access-token.yaml +26 -0
  506. package/semgrep-rules/generic/secrets/gitleaks/facebook-access-token.yaml +26 -0
  507. package/semgrep-rules/generic/secrets/gitleaks/facebook-page-access-token.yaml +26 -0
  508. package/semgrep-rules/generic/secrets/gitleaks/facebook-secret.yaml +26 -0
  509. package/semgrep-rules/generic/secrets/gitleaks/facebook.go +2 -0
  510. package/semgrep-rules/generic/secrets/gitleaks/facebook.yaml +26 -0
  511. package/semgrep-rules/generic/secrets/gitleaks/fastly-api-token.go +2 -0
  512. package/semgrep-rules/generic/secrets/gitleaks/fastly-api-token.yaml +26 -0
  513. package/semgrep-rules/generic/secrets/gitleaks/finicity-api-token.go +3 -0
  514. package/semgrep-rules/generic/secrets/gitleaks/finicity-api-token.yaml +26 -0
  515. package/semgrep-rules/generic/secrets/gitleaks/finicity-client-secret.go +2 -0
  516. package/semgrep-rules/generic/secrets/gitleaks/finicity-client-secret.yaml +26 -0
  517. package/semgrep-rules/generic/secrets/gitleaks/finnhub-access-token.go +2 -0
  518. package/semgrep-rules/generic/secrets/gitleaks/finnhub-access-token.yaml +26 -0
  519. package/semgrep-rules/generic/secrets/gitleaks/flickr-access-token.go +2 -0
  520. package/semgrep-rules/generic/secrets/gitleaks/flickr-access-token.yaml +26 -0
  521. package/semgrep-rules/generic/secrets/gitleaks/flutterwave-encryption-key.go +2 -0
  522. package/semgrep-rules/generic/secrets/gitleaks/flutterwave-encryption-key.yaml +26 -0
  523. package/semgrep-rules/generic/secrets/gitleaks/flutterwave-public-key.go +4 -0
  524. package/semgrep-rules/generic/secrets/gitleaks/flutterwave-public-key.yaml +26 -0
  525. package/semgrep-rules/generic/secrets/gitleaks/flutterwave-secret-key.go +2 -0
  526. package/semgrep-rules/generic/secrets/gitleaks/flutterwave-secret-key.yaml +26 -0
  527. package/semgrep-rules/generic/secrets/gitleaks/frameio-api-token.go +2 -0
  528. package/semgrep-rules/generic/secrets/gitleaks/frameio-api-token.yaml +26 -0
  529. package/semgrep-rules/generic/secrets/gitleaks/freshbooks-access-token.go +2 -0
  530. package/semgrep-rules/generic/secrets/gitleaks/freshbooks-access-token.yaml +26 -0
  531. package/semgrep-rules/generic/secrets/gitleaks/gcp-api-key.go +2 -0
  532. package/semgrep-rules/generic/secrets/gitleaks/gcp-api-key.yaml +26 -0
  533. package/semgrep-rules/generic/secrets/gitleaks/generic-api-key.txt +228 -0
  534. package/semgrep-rules/generic/secrets/gitleaks/generic-api-key.yaml +75 -0
  535. package/semgrep-rules/generic/secrets/gitleaks/github-app-token.go +2 -0
  536. package/semgrep-rules/generic/secrets/gitleaks/github-app-token.yaml +26 -0
  537. package/semgrep-rules/generic/secrets/gitleaks/github-fine-grained-pat.go +6 -0
  538. package/semgrep-rules/generic/secrets/gitleaks/github-fine-grained-pat.yaml +26 -0
  539. package/semgrep-rules/generic/secrets/gitleaks/github-oauth.go +2 -0
  540. package/semgrep-rules/generic/secrets/gitleaks/github-oauth.yaml +26 -0
  541. package/semgrep-rules/generic/secrets/gitleaks/github-pat.go +2 -0
  542. package/semgrep-rules/generic/secrets/gitleaks/github-pat.yaml +26 -0
  543. package/semgrep-rules/generic/secrets/gitleaks/github-refresh-token.go +2 -0
  544. package/semgrep-rules/generic/secrets/gitleaks/github-refresh-token.yaml +26 -0
  545. package/semgrep-rules/generic/secrets/gitleaks/gitlab-pat.go +4 -0
  546. package/semgrep-rules/generic/secrets/gitleaks/gitlab-pat.yaml +26 -0
  547. package/semgrep-rules/generic/secrets/gitleaks/gitlab-ptt.go +2 -0
  548. package/semgrep-rules/generic/secrets/gitleaks/gitlab-ptt.yaml +26 -0
  549. package/semgrep-rules/generic/secrets/gitleaks/gitlab-rrt.go +2 -0
  550. package/semgrep-rules/generic/secrets/gitleaks/gitlab-rrt.yaml +26 -0
  551. package/semgrep-rules/generic/secrets/gitleaks/gitter-access-token.go +2 -0
  552. package/semgrep-rules/generic/secrets/gitleaks/gitter-access-token.yaml +26 -0
  553. package/semgrep-rules/generic/secrets/gitleaks/gocardless-api-token.go +2 -0
  554. package/semgrep-rules/generic/secrets/gitleaks/gocardless-api-token.yaml +26 -0
  555. package/semgrep-rules/generic/secrets/gitleaks/grafana-api-key.go +3 -0
  556. package/semgrep-rules/generic/secrets/gitleaks/grafana-api-key.yaml +26 -0
  557. package/semgrep-rules/generic/secrets/gitleaks/grafana-cloud-api-token.go +2 -0
  558. package/semgrep-rules/generic/secrets/gitleaks/grafana-cloud-api-token.yaml +26 -0
  559. package/semgrep-rules/generic/secrets/gitleaks/grafana-service-account-token.go +2 -0
  560. package/semgrep-rules/generic/secrets/gitleaks/grafana-service-account-token.yaml +26 -0
  561. package/semgrep-rules/generic/secrets/gitleaks/harness-api-key.yaml +26 -0
  562. package/semgrep-rules/generic/secrets/gitleaks/hashicorp-tf-api-token.go +2 -0
  563. package/semgrep-rules/generic/secrets/gitleaks/hashicorp-tf-api-token.yaml +26 -0
  564. package/semgrep-rules/generic/secrets/gitleaks/hashicorp-tf-password.txt +2 -0
  565. package/semgrep-rules/generic/secrets/gitleaks/hashicorp-tf-password.yaml +26 -0
  566. package/semgrep-rules/generic/secrets/gitleaks/heroku-api-key.js +2 -0
  567. package/semgrep-rules/generic/secrets/gitleaks/heroku-api-key.yaml +26 -0
  568. package/semgrep-rules/generic/secrets/gitleaks/hubspot-api-key.js +2 -0
  569. package/semgrep-rules/generic/secrets/gitleaks/hubspot-api-key.yaml +26 -0
  570. package/semgrep-rules/generic/secrets/gitleaks/huggingface-access-token.txt +3 -0
  571. package/semgrep-rules/generic/secrets/gitleaks/huggingface-access-token.yaml +26 -0
  572. package/semgrep-rules/generic/secrets/gitleaks/huggingface-organization-api-token.txt +21 -0
  573. package/semgrep-rules/generic/secrets/gitleaks/huggingface-organization-api-token.yaml +26 -0
  574. package/semgrep-rules/generic/secrets/gitleaks/infracost-api-token.txt +2 -0
  575. package/semgrep-rules/generic/secrets/gitleaks/infracost-api-token.yaml +26 -0
  576. package/semgrep-rules/generic/secrets/gitleaks/intercom-api-key.go +2 -0
  577. package/semgrep-rules/generic/secrets/gitleaks/intercom-api-key.yaml +26 -0
  578. package/semgrep-rules/generic/secrets/gitleaks/intra42-client-secret.yaml +26 -0
  579. package/semgrep-rules/generic/secrets/gitleaks/jfrog-api-key.txt +2 -0
  580. package/semgrep-rules/generic/secrets/gitleaks/jfrog-api-key.yaml +26 -0
  581. package/semgrep-rules/generic/secrets/gitleaks/jfrog-identity-token.txt +8 -0
  582. package/semgrep-rules/generic/secrets/gitleaks/jfrog-identity-token.yaml +26 -0
  583. package/semgrep-rules/generic/secrets/gitleaks/jwt-base64.txt +2 -0
  584. package/semgrep-rules/generic/secrets/gitleaks/jwt-base64.yaml +26 -0
  585. package/semgrep-rules/generic/secrets/gitleaks/jwt.go +2 -0
  586. package/semgrep-rules/generic/secrets/gitleaks/jwt.yaml +26 -0
  587. package/semgrep-rules/generic/secrets/gitleaks/kraken-access-token.go +2 -0
  588. package/semgrep-rules/generic/secrets/gitleaks/kraken-access-token.yaml +26 -0
  589. package/semgrep-rules/generic/secrets/gitleaks/kucoin-access-token.go +2 -0
  590. package/semgrep-rules/generic/secrets/gitleaks/kucoin-access-token.yaml +26 -0
  591. package/semgrep-rules/generic/secrets/gitleaks/kucoin-secret-key.go +2 -0
  592. package/semgrep-rules/generic/secrets/gitleaks/kucoin-secret-key.yaml +26 -0
  593. package/semgrep-rules/generic/secrets/gitleaks/launchdarkly-access-token.go +2 -0
  594. package/semgrep-rules/generic/secrets/gitleaks/launchdarkly-access-token.yaml +26 -0
  595. package/semgrep-rules/generic/secrets/gitleaks/linear-api-key.go +2 -0
  596. package/semgrep-rules/generic/secrets/gitleaks/linear-api-key.yaml +26 -0
  597. package/semgrep-rules/generic/secrets/gitleaks/linear-client-secret.go +2 -0
  598. package/semgrep-rules/generic/secrets/gitleaks/linear-client-secret.yaml +26 -0
  599. package/semgrep-rules/generic/secrets/gitleaks/linkedin-client-id.go +3 -0
  600. package/semgrep-rules/generic/secrets/gitleaks/linkedin-client-id.yaml +26 -0
  601. package/semgrep-rules/generic/secrets/gitleaks/linkedin-client-secret.go +2 -0
  602. package/semgrep-rules/generic/secrets/gitleaks/linkedin-client-secret.yaml +26 -0
  603. package/semgrep-rules/generic/secrets/gitleaks/lob-api-key.go +3 -0
  604. package/semgrep-rules/generic/secrets/gitleaks/lob-api-key.yaml +26 -0
  605. package/semgrep-rules/generic/secrets/gitleaks/lob-pub-api-key.go +2 -0
  606. package/semgrep-rules/generic/secrets/gitleaks/lob-pub-api-key.yaml +26 -0
  607. package/semgrep-rules/generic/secrets/gitleaks/mailchimp-api-key.go +2 -0
  608. package/semgrep-rules/generic/secrets/gitleaks/mailchimp-api-key.yaml +26 -0
  609. package/semgrep-rules/generic/secrets/gitleaks/mailgun-private-api-token.go +2 -0
  610. package/semgrep-rules/generic/secrets/gitleaks/mailgun-private-api-token.yaml +26 -0
  611. package/semgrep-rules/generic/secrets/gitleaks/mailgun-pub-key.go +4 -0
  612. package/semgrep-rules/generic/secrets/gitleaks/mailgun-pub-key.yaml +26 -0
  613. package/semgrep-rules/generic/secrets/gitleaks/mailgun-signing-key.go +2 -0
  614. package/semgrep-rules/generic/secrets/gitleaks/mailgun-signing-key.yaml +26 -0
  615. package/semgrep-rules/generic/secrets/gitleaks/mapbox-api-token.go +2 -0
  616. package/semgrep-rules/generic/secrets/gitleaks/mapbox-api-token.yaml +26 -0
  617. package/semgrep-rules/generic/secrets/gitleaks/mattermost-access-token.go +2 -0
  618. package/semgrep-rules/generic/secrets/gitleaks/mattermost-access-token.yaml +26 -0
  619. package/semgrep-rules/generic/secrets/gitleaks/messagebird-api-token.go +2 -0
  620. package/semgrep-rules/generic/secrets/gitleaks/messagebird-api-token.yaml +26 -0
  621. package/semgrep-rules/generic/secrets/gitleaks/messagebird-client-id.js +2 -0
  622. package/semgrep-rules/generic/secrets/gitleaks/messagebird-client-id.yaml +26 -0
  623. package/semgrep-rules/generic/secrets/gitleaks/microsoft-teams-webhook.go +2 -0
  624. package/semgrep-rules/generic/secrets/gitleaks/microsoft-teams-webhook.yaml +26 -0
  625. package/semgrep-rules/generic/secrets/gitleaks/netlify-access-token.go +2 -0
  626. package/semgrep-rules/generic/secrets/gitleaks/netlify-access-token.yaml +26 -0
  627. package/semgrep-rules/generic/secrets/gitleaks/new-relic-browser-api-token.go +2 -0
  628. package/semgrep-rules/generic/secrets/gitleaks/new-relic-browser-api-token.yaml +26 -0
  629. package/semgrep-rules/generic/secrets/gitleaks/new-relic-insert-key.yaml +26 -0
  630. package/semgrep-rules/generic/secrets/gitleaks/new-relic-user-api-id.go +2 -0
  631. package/semgrep-rules/generic/secrets/gitleaks/new-relic-user-api-id.yaml +26 -0
  632. package/semgrep-rules/generic/secrets/gitleaks/new-relic-user-api-key.go +4 -0
  633. package/semgrep-rules/generic/secrets/gitleaks/new-relic-user-api-key.yaml +26 -0
  634. package/semgrep-rules/generic/secrets/gitleaks/npm-access-token.go +2 -0
  635. package/semgrep-rules/generic/secrets/gitleaks/npm-access-token.yaml +26 -0
  636. package/semgrep-rules/generic/secrets/gitleaks/nytimes-access-token.go +2 -0
  637. package/semgrep-rules/generic/secrets/gitleaks/nytimes-access-token.yaml +26 -0
  638. package/semgrep-rules/generic/secrets/gitleaks/okta-access-token.go +2 -0
  639. package/semgrep-rules/generic/secrets/gitleaks/okta-access-token.yaml +26 -0
  640. package/semgrep-rules/generic/secrets/gitleaks/openai-api-key.txt +2 -0
  641. package/semgrep-rules/generic/secrets/gitleaks/openai-api-key.yaml +26 -0
  642. package/semgrep-rules/generic/secrets/gitleaks/plaid-api-token.go +2 -0
  643. package/semgrep-rules/generic/secrets/gitleaks/plaid-api-token.yaml +26 -0
  644. package/semgrep-rules/generic/secrets/gitleaks/plaid-client-id.go +4 -0
  645. package/semgrep-rules/generic/secrets/gitleaks/plaid-client-id.yaml +26 -0
  646. package/semgrep-rules/generic/secrets/gitleaks/plaid-secret-key.go +2 -0
  647. package/semgrep-rules/generic/secrets/gitleaks/plaid-secret-key.yaml +26 -0
  648. package/semgrep-rules/generic/secrets/gitleaks/planetscale-api-token.go +2 -0
  649. package/semgrep-rules/generic/secrets/gitleaks/planetscale-api-token.yaml +26 -0
  650. package/semgrep-rules/generic/secrets/gitleaks/planetscale-oauth-token.go +2 -0
  651. package/semgrep-rules/generic/secrets/gitleaks/planetscale-oauth-token.yaml +26 -0
  652. package/semgrep-rules/generic/secrets/gitleaks/planetscale-password.go +4 -0
  653. package/semgrep-rules/generic/secrets/gitleaks/planetscale-password.yaml +26 -0
  654. package/semgrep-rules/generic/secrets/gitleaks/postman-api-token.go +2 -0
  655. package/semgrep-rules/generic/secrets/gitleaks/postman-api-token.yaml +26 -0
  656. package/semgrep-rules/generic/secrets/gitleaks/prefect-api-token.go +2 -0
  657. package/semgrep-rules/generic/secrets/gitleaks/prefect-api-token.yaml +26 -0
  658. package/semgrep-rules/generic/secrets/gitleaks/private-key.go +12 -0
  659. package/semgrep-rules/generic/secrets/gitleaks/private-key.yaml +26 -0
  660. package/semgrep-rules/generic/secrets/gitleaks/pulumi-api-token.go +2 -0
  661. package/semgrep-rules/generic/secrets/gitleaks/pulumi-api-token.yaml +26 -0
  662. package/semgrep-rules/generic/secrets/gitleaks/pypi-upload-token.go +2 -0
  663. package/semgrep-rules/generic/secrets/gitleaks/pypi-upload-token.yaml +26 -0
  664. package/semgrep-rules/generic/secrets/gitleaks/rapidapi-access-token.go +2 -0
  665. package/semgrep-rules/generic/secrets/gitleaks/rapidapi-access-token.yaml +26 -0
  666. package/semgrep-rules/generic/secrets/gitleaks/readme-api-token.go +2 -0
  667. package/semgrep-rules/generic/secrets/gitleaks/readme-api-token.yaml +26 -0
  668. package/semgrep-rules/generic/secrets/gitleaks/rubygems-api-token.go +2 -0
  669. package/semgrep-rules/generic/secrets/gitleaks/rubygems-api-token.yaml +26 -0
  670. package/semgrep-rules/generic/secrets/gitleaks/scalingo-api-token.go +2 -0
  671. package/semgrep-rules/generic/secrets/gitleaks/scalingo-api-token.yaml +26 -0
  672. package/semgrep-rules/generic/secrets/gitleaks/sendbird-access-id.go +2 -0
  673. package/semgrep-rules/generic/secrets/gitleaks/sendbird-access-id.yaml +26 -0
  674. package/semgrep-rules/generic/secrets/gitleaks/sendbird-access-token.go +2 -0
  675. package/semgrep-rules/generic/secrets/gitleaks/sendbird-access-token.yaml +26 -0
  676. package/semgrep-rules/generic/secrets/gitleaks/sendgrid-api-token.go +2 -0
  677. package/semgrep-rules/generic/secrets/gitleaks/sendgrid-api-token.yaml +26 -0
  678. package/semgrep-rules/generic/secrets/gitleaks/sendinblue-api-token.go +2 -0
  679. package/semgrep-rules/generic/secrets/gitleaks/sendinblue-api-token.yaml +26 -0
  680. package/semgrep-rules/generic/secrets/gitleaks/sentry-access-token.go +2 -0
  681. package/semgrep-rules/generic/secrets/gitleaks/sentry-access-token.yaml +26 -0
  682. package/semgrep-rules/generic/secrets/gitleaks/shippo-api-token.go +2 -0
  683. package/semgrep-rules/generic/secrets/gitleaks/shippo-api-token.yaml +26 -0
  684. package/semgrep-rules/generic/secrets/gitleaks/shopify-access-token.go +2 -0
  685. package/semgrep-rules/generic/secrets/gitleaks/shopify-access-token.yaml +26 -0
  686. package/semgrep-rules/generic/secrets/gitleaks/shopify-custom-access-token.go +2 -0
  687. package/semgrep-rules/generic/secrets/gitleaks/shopify-custom-access-token.yaml +26 -0
  688. package/semgrep-rules/generic/secrets/gitleaks/shopify-private-app-access-token.go +2 -0
  689. package/semgrep-rules/generic/secrets/gitleaks/shopify-private-app-access-token.yaml +26 -0
  690. package/semgrep-rules/generic/secrets/gitleaks/shopify-shared-secret.go +2 -0
  691. package/semgrep-rules/generic/secrets/gitleaks/shopify-shared-secret.yaml +26 -0
  692. package/semgrep-rules/generic/secrets/gitleaks/sidekiq-secret.go +2 -0
  693. package/semgrep-rules/generic/secrets/gitleaks/sidekiq-secret.yaml +26 -0
  694. package/semgrep-rules/generic/secrets/gitleaks/sidekiq-sensitive-url.go +2 -0
  695. package/semgrep-rules/generic/secrets/gitleaks/sidekiq-sensitive-url.yaml +26 -0
  696. package/semgrep-rules/generic/secrets/gitleaks/slack-access-token.go +2 -0
  697. package/semgrep-rules/generic/secrets/gitleaks/slack-app-token.txt +8 -0
  698. package/semgrep-rules/generic/secrets/gitleaks/slack-app-token.yaml +26 -0
  699. package/semgrep-rules/generic/secrets/gitleaks/slack-bot-token.txt +8 -0
  700. package/semgrep-rules/generic/secrets/gitleaks/slack-bot-token.yaml +26 -0
  701. package/semgrep-rules/generic/secrets/gitleaks/slack-config-access-token.txt +8 -0
  702. package/semgrep-rules/generic/secrets/gitleaks/slack-config-access-token.yaml +26 -0
  703. package/semgrep-rules/generic/secrets/gitleaks/slack-config-refresh-token.txt +6 -0
  704. package/semgrep-rules/generic/secrets/gitleaks/slack-config-refresh-token.yaml +26 -0
  705. package/semgrep-rules/generic/secrets/gitleaks/slack-legacy-bot-token.txt +22 -0
  706. package/semgrep-rules/generic/secrets/gitleaks/slack-legacy-bot-token.yaml +26 -0
  707. package/semgrep-rules/generic/secrets/gitleaks/slack-legacy-token.txt +14 -0
  708. package/semgrep-rules/generic/secrets/gitleaks/slack-legacy-token.yaml +26 -0
  709. package/semgrep-rules/generic/secrets/gitleaks/slack-legacy-workspace-token.txt +10 -0
  710. package/semgrep-rules/generic/secrets/gitleaks/slack-legacy-workspace-token.yaml +26 -0
  711. package/semgrep-rules/generic/secrets/gitleaks/slack-user-token.txt +14 -0
  712. package/semgrep-rules/generic/secrets/gitleaks/slack-user-token.yaml +26 -0
  713. package/semgrep-rules/generic/secrets/gitleaks/slack-web-hook.go +2 -0
  714. package/semgrep-rules/generic/secrets/gitleaks/slack-webhook-url.txt +20 -0
  715. package/semgrep-rules/generic/secrets/gitleaks/slack-webhook-url.yaml +26 -0
  716. package/semgrep-rules/generic/secrets/gitleaks/snyk-api-token.txt +18 -0
  717. package/semgrep-rules/generic/secrets/gitleaks/snyk-api-token.yaml +26 -0
  718. package/semgrep-rules/generic/secrets/gitleaks/square-access-token.go +2 -0
  719. package/semgrep-rules/generic/secrets/gitleaks/square-access-token.yaml +26 -0
  720. package/semgrep-rules/generic/secrets/gitleaks/squarespace-access-token.go +2 -0
  721. package/semgrep-rules/generic/secrets/gitleaks/squarespace-access-token.yaml +26 -0
  722. package/semgrep-rules/generic/secrets/gitleaks/stripe-access-token.go +2 -0
  723. package/semgrep-rules/generic/secrets/gitleaks/stripe-access-token.yaml +26 -0
  724. package/semgrep-rules/generic/secrets/gitleaks/sumologic-access-id.go +10 -0
  725. package/semgrep-rules/generic/secrets/gitleaks/sumologic-access-id.yaml +26 -0
  726. package/semgrep-rules/generic/secrets/gitleaks/sumologic-access-token.go +2 -0
  727. package/semgrep-rules/generic/secrets/gitleaks/sumologic-access-token.yaml +26 -0
  728. package/semgrep-rules/generic/secrets/gitleaks/telegram-bot-api-token.go +2 -0
  729. package/semgrep-rules/generic/secrets/gitleaks/telegram-bot-api-token.yaml +26 -0
  730. package/semgrep-rules/generic/secrets/gitleaks/travisci-access-token.go +2 -0
  731. package/semgrep-rules/generic/secrets/gitleaks/travisci-access-token.yaml +26 -0
  732. package/semgrep-rules/generic/secrets/gitleaks/twilio-api-key.go +2 -0
  733. package/semgrep-rules/generic/secrets/gitleaks/twilio-api-key.yaml +26 -0
  734. package/semgrep-rules/generic/secrets/gitleaks/twitch-api-token.go +2 -0
  735. package/semgrep-rules/generic/secrets/gitleaks/twitch-api-token.yaml +26 -0
  736. package/semgrep-rules/generic/secrets/gitleaks/twitter-access-secret.go +2 -0
  737. package/semgrep-rules/generic/secrets/gitleaks/twitter-access-secret.yaml +26 -0
  738. package/semgrep-rules/generic/secrets/gitleaks/twitter-access-token.go +2 -0
  739. package/semgrep-rules/generic/secrets/gitleaks/twitter-access-token.yaml +26 -0
  740. package/semgrep-rules/generic/secrets/gitleaks/twitter-api-key.go +2 -0
  741. package/semgrep-rules/generic/secrets/gitleaks/twitter-api-key.yaml +26 -0
  742. package/semgrep-rules/generic/secrets/gitleaks/twitter-api-secret.go +2 -0
  743. package/semgrep-rules/generic/secrets/gitleaks/twitter-api-secret.yaml +26 -0
  744. package/semgrep-rules/generic/secrets/gitleaks/twitter-bearer-token.go +2 -0
  745. package/semgrep-rules/generic/secrets/gitleaks/twitter-bearer-token.yaml +26 -0
  746. package/semgrep-rules/generic/secrets/gitleaks/typeform-api-token.go +2 -0
  747. package/semgrep-rules/generic/secrets/gitleaks/typeform-api-token.yaml +26 -0
  748. package/semgrep-rules/generic/secrets/gitleaks/vault-batch-token.go +2 -0
  749. package/semgrep-rules/generic/secrets/gitleaks/vault-batch-token.yaml +26 -0
  750. package/semgrep-rules/generic/secrets/gitleaks/vault-service-token.go +2 -0
  751. package/semgrep-rules/generic/secrets/gitleaks/vault-service-token.yaml +26 -0
  752. package/semgrep-rules/generic/secrets/gitleaks/yandex-access-token.go +2 -0
  753. package/semgrep-rules/generic/secrets/gitleaks/yandex-access-token.yaml +26 -0
  754. package/semgrep-rules/generic/secrets/gitleaks/yandex-api-key.go +2 -0
  755. package/semgrep-rules/generic/secrets/gitleaks/yandex-api-key.yaml +26 -0
  756. package/semgrep-rules/generic/secrets/gitleaks/yandex-aws-access-token.go +2 -0
  757. package/semgrep-rules/generic/secrets/gitleaks/yandex-aws-access-token.yaml +26 -0
  758. package/semgrep-rules/generic/secrets/gitleaks/zendesk-secret-key.go +2 -0
  759. package/semgrep-rules/generic/secrets/gitleaks/zendesk-secret-key.yaml +26 -0
  760. package/semgrep-rules/generic/secrets/security/detected-amazon-mws-auth-token.txt +2 -0
  761. package/semgrep-rules/generic/secrets/security/detected-amazon-mws-auth-token.yaml +25 -0
  762. package/semgrep-rules/generic/secrets/security/detected-artifactory-password.txt +130 -0
  763. package/semgrep-rules/generic/secrets/security/detected-artifactory-password.yaml +46 -0
  764. package/semgrep-rules/generic/secrets/security/detected-artifactory-token.txt +28 -0
  765. package/semgrep-rules/generic/secrets/security/detected-artifactory-token.yaml +43 -0
  766. package/semgrep-rules/generic/secrets/security/detected-aws-access-key-id-value.txt +11 -0
  767. package/semgrep-rules/generic/secrets/security/detected-aws-access-key-id-value.yaml +28 -0
  768. package/semgrep-rules/generic/secrets/security/detected-aws-account-id.txt +56 -0
  769. package/semgrep-rules/generic/secrets/security/detected-aws-account-id.yaml +57 -0
  770. package/semgrep-rules/generic/secrets/security/detected-aws-appsync-graphql-key.txt +2 -0
  771. package/semgrep-rules/generic/secrets/security/detected-aws-appsync-graphql-key.yaml +26 -0
  772. package/semgrep-rules/generic/secrets/security/detected-aws-secret-access-key.txt +23 -0
  773. package/semgrep-rules/generic/secrets/security/detected-aws-secret-access-key.yaml +29 -0
  774. package/semgrep-rules/generic/secrets/security/detected-aws-session-token.txt +11 -0
  775. package/semgrep-rules/generic/secrets/security/detected-aws-session-token.yaml +30 -0
  776. package/semgrep-rules/generic/secrets/security/detected-bcrypt-hash.txt +7 -0
  777. package/semgrep-rules/generic/secrets/security/detected-bcrypt-hash.yaml +24 -0
  778. package/semgrep-rules/generic/secrets/security/detected-codeclimate.txt +9 -0
  779. package/semgrep-rules/generic/secrets/security/detected-codeclimate.yaml +26 -0
  780. package/semgrep-rules/generic/secrets/security/detected-etc-shadow.txt +21 -0
  781. package/semgrep-rules/generic/secrets/security/detected-etc-shadow.yaml +26 -0
  782. package/semgrep-rules/generic/secrets/security/detected-facebook-access-token.txt +22 -0
  783. package/semgrep-rules/generic/secrets/security/detected-facebook-access-token.yaml +28 -0
  784. package/semgrep-rules/generic/secrets/security/detected-facebook-oauth.txt +5 -0
  785. package/semgrep-rules/generic/secrets/security/detected-facebook-oauth.yaml +26 -0
  786. package/semgrep-rules/generic/secrets/security/detected-generic-api-key.txt +21 -0
  787. package/semgrep-rules/generic/secrets/security/detected-generic-api-key.yaml +28 -0
  788. package/semgrep-rules/generic/secrets/security/detected-generic-secret.txt +8 -0
  789. package/semgrep-rules/generic/secrets/security/detected-generic-secret.yaml +29 -0
  790. package/semgrep-rules/generic/secrets/security/detected-github-token.txt +14 -0
  791. package/semgrep-rules/generic/secrets/security/detected-github-token.yaml +46 -0
  792. package/semgrep-rules/generic/secrets/security/detected-google-api-key.txt +14 -0
  793. package/semgrep-rules/generic/secrets/security/detected-google-api-key.yaml +28 -0
  794. package/semgrep-rules/generic/secrets/security/detected-google-cloud-api-key.txt +5 -0
  795. package/semgrep-rules/generic/secrets/security/detected-google-cloud-api-key.yaml +26 -0
  796. package/semgrep-rules/generic/secrets/security/detected-google-gcm-service-account.txt +2 -0
  797. package/semgrep-rules/generic/secrets/security/detected-google-gcm-service-account.yaml +26 -0
  798. package/semgrep-rules/generic/secrets/security/detected-google-oauth-access-token.txt +6 -0
  799. package/semgrep-rules/generic/secrets/security/detected-google-oauth-access-token.yaml +25 -0
  800. package/semgrep-rules/generic/secrets/security/detected-google-oauth.txt +2 -0
  801. package/semgrep-rules/generic/secrets/security/detected-google-oauth.yaml +25 -0
  802. package/semgrep-rules/generic/secrets/security/detected-heroku-api-key.txt +5 -0
  803. package/semgrep-rules/generic/secrets/security/detected-heroku-api-key.yaml +26 -0
  804. package/semgrep-rules/generic/secrets/security/detected-hockeyapp.txt +2 -0
  805. package/semgrep-rules/generic/secrets/security/detected-hockeyapp.yaml +26 -0
  806. package/semgrep-rules/generic/secrets/security/detected-jwt-token.txt +23 -0
  807. package/semgrep-rules/generic/secrets/security/detected-jwt-token.yaml +24 -0
  808. package/semgrep-rules/generic/secrets/security/detected-kolide-api-key.txt +2 -0
  809. package/semgrep-rules/generic/secrets/security/detected-kolide-api-key.yaml +24 -0
  810. package/semgrep-rules/generic/secrets/security/detected-mailchimp-api-key.txt +2 -0
  811. package/semgrep-rules/generic/secrets/security/detected-mailchimp-api-key.yaml +25 -0
  812. package/semgrep-rules/generic/secrets/security/detected-mailgun-api-key.txt +2 -0
  813. package/semgrep-rules/generic/secrets/security/detected-mailgun-api-key.yaml +25 -0
  814. package/semgrep-rules/generic/secrets/security/detected-npm-registry-auth-token.npmrc +19 -0
  815. package/semgrep-rules/generic/secrets/security/detected-npm-registry-auth-token.yaml +32 -0
  816. package/semgrep-rules/generic/secrets/security/detected-onfido-live-api-token.txt +8 -0
  817. package/semgrep-rules/generic/secrets/security/detected-onfido-live-api-token.yaml +20 -0
  818. package/semgrep-rules/generic/secrets/security/detected-outlook-team.txt +2 -0
  819. package/semgrep-rules/generic/secrets/security/detected-outlook-team.yaml +26 -0
  820. package/semgrep-rules/generic/secrets/security/detected-paypal-braintree-access-token.txt +2 -0
  821. package/semgrep-rules/generic/secrets/security/detected-paypal-braintree-access-token.yaml +26 -0
  822. package/semgrep-rules/generic/secrets/security/detected-pgp-private-key-block.txt +58 -0
  823. package/semgrep-rules/generic/secrets/security/detected-pgp-private-key-block.yaml +27 -0
  824. package/semgrep-rules/generic/secrets/security/detected-picatic-api-key.jsx +24 -0
  825. package/semgrep-rules/generic/secrets/security/detected-picatic-api-key.yaml +25 -0
  826. package/semgrep-rules/generic/secrets/security/detected-private-key.txt +27 -0
  827. package/semgrep-rules/generic/secrets/security/detected-private-key.yaml +38 -0
  828. package/semgrep-rules/generic/secrets/security/detected-sauce-token.txt +14 -0
  829. package/semgrep-rules/generic/secrets/security/detected-sauce-token.yaml +26 -0
  830. package/semgrep-rules/generic/secrets/security/detected-sendgrid-api-key.txt +20 -0
  831. package/semgrep-rules/generic/secrets/security/detected-sendgrid-api-key.yaml +26 -0
  832. package/semgrep-rules/generic/secrets/security/detected-slack-token.txt +5 -0
  833. package/semgrep-rules/generic/secrets/security/detected-slack-token.yaml +27 -0
  834. package/semgrep-rules/generic/secrets/security/detected-slack-webhook.txt +8 -0
  835. package/semgrep-rules/generic/secrets/security/detected-slack-webhook.yaml +27 -0
  836. package/semgrep-rules/generic/secrets/security/detected-snyk-api-key.txt +17 -0
  837. package/semgrep-rules/generic/secrets/security/detected-snyk-api-key.yaml +25 -0
  838. package/semgrep-rules/generic/secrets/security/detected-softlayer-api-key.txt +17 -0
  839. package/semgrep-rules/generic/secrets/security/detected-softlayer-api-key.yaml +26 -0
  840. package/semgrep-rules/generic/secrets/security/detected-sonarqube-docs-api-key.txt +2 -0
  841. package/semgrep-rules/generic/secrets/security/detected-sonarqube-docs-api-key.yaml +39 -0
  842. package/semgrep-rules/generic/secrets/security/detected-square-access-token.txt +2 -0
  843. package/semgrep-rules/generic/secrets/security/detected-square-access-token.yaml +25 -0
  844. package/semgrep-rules/generic/secrets/security/detected-square-oauth-secret.txt +5 -0
  845. package/semgrep-rules/generic/secrets/security/detected-square-oauth-secret.yaml +26 -0
  846. package/semgrep-rules/generic/secrets/security/detected-ssh-password.txt +8 -0
  847. package/semgrep-rules/generic/secrets/security/detected-ssh-password.yaml +26 -0
  848. package/semgrep-rules/generic/secrets/security/detected-stripe-api-key.txt +5 -0
  849. package/semgrep-rules/generic/secrets/security/detected-stripe-api-key.yaml +25 -0
  850. package/semgrep-rules/generic/secrets/security/detected-stripe-restricted-api-key.txt +5 -0
  851. package/semgrep-rules/generic/secrets/security/detected-stripe-restricted-api-key.yaml +25 -0
  852. package/semgrep-rules/generic/secrets/security/detected-telegram-bot-api-key.php +12 -0
  853. package/semgrep-rules/generic/secrets/security/detected-telegram-bot-api-key.yaml +29 -0
  854. package/semgrep-rules/generic/secrets/security/detected-twilio-api-key.txt +5 -0
  855. package/semgrep-rules/generic/secrets/security/detected-twilio-api-key.yaml +25 -0
  856. package/semgrep-rules/generic/secrets/security/detected-username-and-password-in-uri.txt +94 -0
  857. package/semgrep-rules/generic/secrets/security/detected-username-and-password-in-uri.yaml +34 -0
  858. package/semgrep-rules/generic/secrets/security/google-maps-apikeyleak.generic +2 -0
  859. package/semgrep-rules/generic/secrets/security/google-maps-apikeyleak.yaml +25 -0
  860. package/semgrep-rules/generic/unicode/security/bidi.py +48 -0
  861. package/semgrep-rules/generic/unicode/security/bidi.yml +57 -0
  862. package/semgrep-rules/generic/visualforce/security/ncino/html/UseSRIForCDNs.page +61 -0
  863. package/semgrep-rules/generic/visualforce/security/ncino/html/UseSRIForCDNs.yaml +49 -0
  864. package/semgrep-rules/generic/visualforce/security/ncino/vf/XSSFromUnescapedURLParam.page +14 -0
  865. package/semgrep-rules/generic/visualforce/security/ncino/vf/XSSFromUnescapedURLParam.yaml +47 -0
  866. package/semgrep-rules/generic/visualforce/security/ncino/xml/CSPHeaderAttribute.page +54 -0
  867. package/semgrep-rules/generic/visualforce/security/ncino/xml/CSPHeaderAttribute.yaml +35 -0
  868. package/semgrep-rules/generic/visualforce/security/ncino/xml/VisualForceAPIVersion.page-meta.xml +85 -0
  869. package/semgrep-rules/generic/visualforce/security/ncino/xml/VisualForceAPIVersion.yaml +35 -0
  870. package/semgrep-rules/go/aws-lambda/security/database-sqli.go +120 -0
  871. package/semgrep-rules/go/aws-lambda/security/database-sqli.yaml +62 -0
  872. package/semgrep-rules/go/aws-lambda/security/tainted-sql-string.go +101 -0
  873. package/semgrep-rules/go/aws-lambda/security/tainted-sql-string.yaml +68 -0
  874. package/semgrep-rules/go/gorilla/security/audit/handler-assignment-from-multiple-sources.go +104 -0
  875. package/semgrep-rules/go/gorilla/security/audit/handler-assignment-from-multiple-sources.yaml +48 -0
  876. package/semgrep-rules/go/gorilla/security/audit/session-cookie-missing-httponly.go +94 -0
  877. package/semgrep-rules/go/gorilla/security/audit/session-cookie-missing-httponly.yaml +39 -0
  878. package/semgrep-rules/go/gorilla/security/audit/session-cookie-missing-secure.go +94 -0
  879. package/semgrep-rules/go/gorilla/security/audit/session-cookie-missing-secure.yaml +38 -0
  880. package/semgrep-rules/go/gorilla/security/audit/session-cookie-samesitenone.go +40 -0
  881. package/semgrep-rules/go/gorilla/security/audit/session-cookie-samesitenone.yaml +36 -0
  882. package/semgrep-rules/go/gorilla/security/audit/websocket-missing-origin-check.go +49 -0
  883. package/semgrep-rules/go/gorilla/security/audit/websocket-missing-origin-check.yaml +39 -0
  884. package/semgrep-rules/go/gorm/security/audit/gorm-dangerous-methods-usage.go +81 -0
  885. package/semgrep-rules/go/gorm/security/audit/gorm-dangerous-methods-usage.yaml +69 -0
  886. package/semgrep-rules/go/grpc/security/grpc-client-insecure-connection.go +24 -0
  887. package/semgrep-rules/go/grpc/security/grpc-client-insecure-connection.yaml +33 -0
  888. package/semgrep-rules/go/grpc/security/grpc-server-insecure-connection.go +89 -0
  889. package/semgrep-rules/go/grpc/security/grpc-server-insecure-connection.yaml +43 -0
  890. package/semgrep-rules/go/jwt-go/security/audit/jwt-parse-unverified.go +37 -0
  891. package/semgrep-rules/go/jwt-go/security/audit/jwt-parse-unverified.yaml +32 -0
  892. package/semgrep-rules/go/jwt-go/security/jwt-none-alg.go +31 -0
  893. package/semgrep-rules/go/jwt-go/security/jwt-none-alg.yaml +39 -0
  894. package/semgrep-rules/go/jwt-go/security/jwt.go +96 -0
  895. package/semgrep-rules/go/jwt-go/security/jwt.yaml +42 -0
  896. package/semgrep-rules/go/lang/best-practice/channel-guarded-with-mutex.go +33 -0
  897. package/semgrep-rules/go/lang/best-practice/channel-guarded-with-mutex.yaml +22 -0
  898. package/semgrep-rules/go/lang/best-practice/hidden-goroutine.go +26 -0
  899. package/semgrep-rules/go/lang/best-practice/hidden-goroutine.yaml +27 -0
  900. package/semgrep-rules/go/lang/correctness/dos/zip_bomb.go +38 -0
  901. package/semgrep-rules/go/lang/correctness/dos/zlib_bomb.go +22 -0
  902. package/semgrep-rules/go/lang/correctness/looppointer.go +39 -0
  903. package/semgrep-rules/go/lang/correctness/looppointer.yaml +29 -0
  904. package/semgrep-rules/go/lang/correctness/overflow/overflow.go +53 -0
  905. package/semgrep-rules/go/lang/correctness/overflow/overflow.yaml +39 -0
  906. package/semgrep-rules/go/lang/correctness/permissions/file_permission.fixed.go +73 -0
  907. package/semgrep-rules/go/lang/correctness/permissions/file_permission.go +73 -0
  908. package/semgrep-rules/go/lang/correctness/permissions/file_permission.yaml +31 -0
  909. package/semgrep-rules/go/lang/correctness/use-filepath-join.go +40 -0
  910. package/semgrep-rules/go/lang/correctness/use-filepath-join.yaml +50 -0
  911. package/semgrep-rules/go/lang/correctness/useless-eqeq.go +16 -0
  912. package/semgrep-rules/go/lang/correctness/useless-eqeq.yaml +31 -0
  913. package/semgrep-rules/go/lang/maintainability/useless-ifelse.go +33 -0
  914. package/semgrep-rules/go/lang/maintainability/useless-ifelse.yaml +33 -0
  915. package/semgrep-rules/go/lang/security/audit/crypto/bad_imports.go +64 -0
  916. package/semgrep-rules/go/lang/security/audit/crypto/bad_imports.yaml +32 -0
  917. package/semgrep-rules/go/lang/security/audit/crypto/insecure_ssh.go +23 -0
  918. package/semgrep-rules/go/lang/security/audit/crypto/insecure_ssh.yaml +29 -0
  919. package/semgrep-rules/go/lang/security/audit/crypto/math_random.fixed.go +46 -0
  920. package/semgrep-rules/go/lang/security/audit/crypto/math_random.go +46 -0
  921. package/semgrep-rules/go/lang/security/audit/crypto/math_random.yaml +40 -0
  922. package/semgrep-rules/go/lang/security/audit/crypto/missing-ssl-minversion.fixed.go +68 -0
  923. package/semgrep-rules/go/lang/security/audit/crypto/missing-ssl-minversion.go +70 -0
  924. package/semgrep-rules/go/lang/security/audit/crypto/missing-ssl-minversion.yaml +38 -0
  925. package/semgrep-rules/go/lang/security/audit/crypto/sha224-hash.go +43 -0
  926. package/semgrep-rules/go/lang/security/audit/crypto/sha224-hash.yaml +44 -0
  927. package/semgrep-rules/go/lang/security/audit/crypto/ssl.go +69 -0
  928. package/semgrep-rules/go/lang/security/audit/crypto/ssl.yaml +30 -0
  929. package/semgrep-rules/go/lang/security/audit/crypto/tls.go +32 -0
  930. package/semgrep-rules/go/lang/security/audit/crypto/tls.yaml +60 -0
  931. package/semgrep-rules/go/lang/security/audit/crypto/use_of_weak_crypto.go +79 -0
  932. package/semgrep-rules/go/lang/security/audit/crypto/use_of_weak_crypto.yaml +128 -0
  933. package/semgrep-rules/go/lang/security/audit/crypto/use_of_weak_rsa_key.fixed.go +24 -0
  934. package/semgrep-rules/go/lang/security/audit/crypto/use_of_weak_rsa_key.go +24 -0
  935. package/semgrep-rules/go/lang/security/audit/crypto/use_of_weak_rsa_key.yaml +35 -0
  936. package/semgrep-rules/go/lang/security/audit/dangerous-command-write.go +30 -0
  937. package/semgrep-rules/go/lang/security/audit/dangerous-command-write.yaml +48 -0
  938. package/semgrep-rules/go/lang/security/audit/dangerous-exec-cmd.go +89 -0
  939. package/semgrep-rules/go/lang/security/audit/dangerous-exec-cmd.yaml +85 -0
  940. package/semgrep-rules/go/lang/security/audit/dangerous-exec-command.go +133 -0
  941. package/semgrep-rules/go/lang/security/audit/dangerous-exec-command.yaml +61 -0
  942. package/semgrep-rules/go/lang/security/audit/dangerous-syscall-exec.go +80 -0
  943. package/semgrep-rules/go/lang/security/audit/dangerous-syscall-exec.yaml +97 -0
  944. package/semgrep-rules/go/lang/security/audit/database/string-formatted-query.go +277 -0
  945. package/semgrep-rules/go/lang/security/audit/database/string-formatted-query.yaml +107 -0
  946. package/semgrep-rules/go/lang/security/audit/md5-used-as-password.go +42 -0
  947. package/semgrep-rules/go/lang/security/audit/md5-used-as-password.yaml +43 -0
  948. package/semgrep-rules/go/lang/security/audit/net/bind_all.go +33 -0
  949. package/semgrep-rules/go/lang/security/audit/net/bind_all.yaml +30 -0
  950. package/semgrep-rules/go/lang/security/audit/net/bind_all_default.go +15 -0
  951. package/semgrep-rules/go/lang/security/audit/net/cookie-missing-httponly.go +68 -0
  952. package/semgrep-rules/go/lang/security/audit/net/cookie-missing-httponly.yaml +40 -0
  953. package/semgrep-rules/go/lang/security/audit/net/cookie-missing-secure.go +68 -0
  954. package/semgrep-rules/go/lang/security/audit/net/cookie-missing-secure.yaml +39 -0
  955. package/semgrep-rules/go/lang/security/audit/net/dynamic-httptrace-clienttrace-ok.go +343 -0
  956. package/semgrep-rules/go/lang/security/audit/net/dynamic-httptrace-clienttrace.go +13 -0
  957. package/semgrep-rules/go/lang/security/audit/net/dynamic-httptrace-clienttrace.yaml +38 -0
  958. package/semgrep-rules/go/lang/security/audit/net/formatted-template-string.go +75 -0
  959. package/semgrep-rules/go/lang/security/audit/net/formatted-template-string.yaml +55 -0
  960. package/semgrep-rules/go/lang/security/audit/net/fs-directory-listing.go +49 -0
  961. package/semgrep-rules/go/lang/security/audit/net/fs-directory-listing.yaml +48 -0
  962. package/semgrep-rules/go/lang/security/audit/net/pprof.go +43 -0
  963. package/semgrep-rules/go/lang/security/audit/net/pprof.yaml +40 -0
  964. package/semgrep-rules/go/lang/security/audit/net/pprof_good.go +18 -0
  965. package/semgrep-rules/go/lang/security/audit/net/pprof_good2.go +17 -0
  966. package/semgrep-rules/go/lang/security/audit/net/unescaped-data-in-htmlattr.go +15 -0
  967. package/semgrep-rules/go/lang/security/audit/net/unescaped-data-in-htmlattr.yaml +53 -0
  968. package/semgrep-rules/go/lang/security/audit/net/unescaped-data-in-js.go +15 -0
  969. package/semgrep-rules/go/lang/security/audit/net/unescaped-data-in-js.yaml +53 -0
  970. package/semgrep-rules/go/lang/security/audit/net/unescaped-data-in-url.go +16 -0
  971. package/semgrep-rules/go/lang/security/audit/net/unescaped-data-in-url.yaml +54 -0
  972. package/semgrep-rules/go/lang/security/audit/net/use-tls.fixed.go +17 -0
  973. package/semgrep-rules/go/lang/security/audit/net/use-tls.go +17 -0
  974. package/semgrep-rules/go/lang/security/audit/net/use-tls.yaml +25 -0
  975. package/semgrep-rules/go/lang/security/audit/net/wip-xss-using-responsewriter-and-printf.go +65 -0
  976. package/semgrep-rules/go/lang/security/audit/net/wip-xss-using-responsewriter-and-printf.yaml +72 -0
  977. package/semgrep-rules/go/lang/security/audit/reflect-makefunc.go +831 -0
  978. package/semgrep-rules/go/lang/security/audit/reflect-makefunc.yaml +26 -0
  979. package/semgrep-rules/go/lang/security/audit/sqli/gosql-sqli.go +72 -0
  980. package/semgrep-rules/go/lang/security/audit/sqli/gosql-sqli.yaml +63 -0
  981. package/semgrep-rules/go/lang/security/audit/sqli/pg-orm-sqli.go +149 -0
  982. package/semgrep-rules/go/lang/security/audit/sqli/pg-orm-sqli.yaml +87 -0
  983. package/semgrep-rules/go/lang/security/audit/sqli/pg-sqli.go +111 -0
  984. package/semgrep-rules/go/lang/security/audit/sqli/pg-sqli.yaml +66 -0
  985. package/semgrep-rules/go/lang/security/audit/sqli/pgx-sqli.go +121 -0
  986. package/semgrep-rules/go/lang/security/audit/sqli/pgx-sqli.yaml +70 -0
  987. package/semgrep-rules/go/lang/security/audit/unsafe-reflect-by-name.go +43 -0
  988. package/semgrep-rules/go/lang/security/audit/unsafe-reflect-by-name.yaml +42 -0
  989. package/semgrep-rules/go/lang/security/audit/unsafe.go +25 -0
  990. package/semgrep-rules/go/lang/security/audit/unsafe.yaml +24 -0
  991. package/semgrep-rules/go/lang/security/audit/xss/import-text-template.fixed.go +53 -0
  992. package/semgrep-rules/go/lang/security/audit/xss/import-text-template.go +53 -0
  993. package/semgrep-rules/go/lang/security/audit/xss/import-text-template.yaml +42 -0
  994. package/semgrep-rules/go/lang/security/audit/xss/no-direct-write-to-responsewriter.go +77 -0
  995. package/semgrep-rules/go/lang/security/audit/xss/no-direct-write-to-responsewriter.yaml +46 -0
  996. package/semgrep-rules/go/lang/security/audit/xss/no-fprintf-to-responsewriter.go +52 -0
  997. package/semgrep-rules/go/lang/security/audit/xss/no-fprintf-to-responsewriter.yaml +40 -0
  998. package/semgrep-rules/go/lang/security/audit/xss/no-interpolation-in-tag.html +27 -0
  999. package/semgrep-rules/go/lang/security/audit/xss/no-interpolation-in-tag.yaml +38 -0
  1000. package/semgrep-rules/go/lang/security/audit/xss/no-interpolation-js-template-string.html +23 -0
  1001. package/semgrep-rules/go/lang/security/audit/xss/no-interpolation-js-template-string.yaml +42 -0
  1002. package/semgrep-rules/go/lang/security/audit/xss/no-io-writestring-to-responsewriter.go +31 -0
  1003. package/semgrep-rules/go/lang/security/audit/xss/no-io-writestring-to-responsewriter.yaml +41 -0
  1004. package/semgrep-rules/go/lang/security/audit/xss/no-printf-in-responsewriter.go +66 -0
  1005. package/semgrep-rules/go/lang/security/audit/xss/no-printf-in-responsewriter.yaml +40 -0
  1006. package/semgrep-rules/go/lang/security/audit/xss/template-html-does-not-escape.go +101 -0
  1007. package/semgrep-rules/go/lang/security/audit/xss/template-html-does-not-escape.yaml +41 -0
  1008. package/semgrep-rules/go/lang/security/audit/xxe/parsing-external-entities-enabled.go +30 -0
  1009. package/semgrep-rules/go/lang/security/audit/xxe/parsing-external-entities-enabled.yaml +33 -0
  1010. package/semgrep-rules/go/lang/security/bad_tmp.go +21 -0
  1011. package/semgrep-rules/go/lang/security/bad_tmp.yaml +24 -0
  1012. package/semgrep-rules/go/lang/security/decompression_bomb.go +101 -0
  1013. package/semgrep-rules/go/lang/security/decompression_bomb.yaml +62 -0
  1014. package/semgrep-rules/go/lang/security/filepath-clean-misuse.fixed.go +103 -0
  1015. package/semgrep-rules/go/lang/security/filepath-clean-misuse.go +103 -0
  1016. package/semgrep-rules/go/lang/security/filepath-clean-misuse.yaml +58 -0
  1017. package/semgrep-rules/go/lang/security/injection/open-redirect.go +48 -0
  1018. package/semgrep-rules/go/lang/security/injection/open-redirect.yaml +58 -0
  1019. package/semgrep-rules/go/lang/security/injection/raw-html-format.go +129 -0
  1020. package/semgrep-rules/go/lang/security/injection/raw-html-format.yaml +54 -0
  1021. package/semgrep-rules/go/lang/security/injection/tainted-sql-string.go +145 -0
  1022. package/semgrep-rules/go/lang/security/injection/tainted-sql-string.yaml +83 -0
  1023. package/semgrep-rules/go/lang/security/injection/tainted-url-host.go +387 -0
  1024. package/semgrep-rules/go/lang/security/injection/tainted-url-host.yaml +80 -0
  1025. package/semgrep-rules/go/lang/security/reverseproxy-director.go +65 -0
  1026. package/semgrep-rules/go/lang/security/reverseproxy-director.yaml +33 -0
  1027. package/semgrep-rules/go/lang/security/shared-url-struct-mutation.go +118 -0
  1028. package/semgrep-rules/go/lang/security/shared-url-struct-mutation.yaml +52 -0
  1029. package/semgrep-rules/go/lang/security/zip.go +75 -0
  1030. package/semgrep-rules/go/lang/security/zip.yaml +32 -0
  1031. package/semgrep-rules/go/otto/security/audit/dangerous-execution.go +28 -0
  1032. package/semgrep-rules/go/otto/security/audit/dangerous-execution.yaml +33 -0
  1033. package/semgrep-rules/go/template/security/insecure-types.go +31 -0
  1034. package/semgrep-rules/go/template/security/insecure-types.yaml +37 -0
  1035. package/semgrep-rules/go/template/security/ssti.go +86 -0
  1036. package/semgrep-rules/go/template/security/ssti.yaml +56 -0
  1037. package/semgrep-rules/html/best-practice/robots-denied.html +58 -0
  1038. package/semgrep-rules/html/best-practice/robots-denied.yaml +12 -0
  1039. package/semgrep-rules/html/correctness/https-equiv.html +28 -0
  1040. package/semgrep-rules/html/correctness/https-equiv.yaml +17 -0
  1041. package/semgrep-rules/html/security/audit/eval-detected.html +21 -0
  1042. package/semgrep-rules/html/security/audit/eval-detected.yaml +45 -0
  1043. package/semgrep-rules/html/security/audit/insecure-document-method.html +22 -0
  1044. package/semgrep-rules/html/security/audit/insecure-document-method.yaml +43 -0
  1045. package/semgrep-rules/html/security/audit/missing-integrity.html +47 -0
  1046. package/semgrep-rules/html/security/audit/missing-integrity.yaml +50 -0
  1047. package/semgrep-rules/html/security/plaintext-http-link.html +29 -0
  1048. package/semgrep-rules/html/security/plaintext-http-link.yaml +27 -0
  1049. package/semgrep-rules/java/android/best-practice/manifest-security-features.xml +90 -0
  1050. package/semgrep-rules/java/android/best-practice/manifest-security-features.yaml +52 -0
  1051. package/semgrep-rules/java/android/best-practice/network-security-config.xml +129 -0
  1052. package/semgrep-rules/java/android/best-practice/network-security-config.yml +161 -0
  1053. package/semgrep-rules/java/android/security/exported_activity.AndroidManifest.xml +49 -0
  1054. package/semgrep-rules/java/android/security/exported_activity.yaml +38 -0
  1055. package/semgrep-rules/java/aws-lambda/security/tainted-sql-string.java +77 -0
  1056. package/semgrep-rules/java/aws-lambda/security/tainted-sql-string.yaml +68 -0
  1057. package/semgrep-rules/java/aws-lambda/security/tainted-sqli.java +68 -0
  1058. package/semgrep-rules/java/aws-lambda/security/tainted-sqli.yaml +72 -0
  1059. package/semgrep-rules/java/java-jwt/security/audit/jwt-decode-without-verify.java +61 -0
  1060. package/semgrep-rules/java/java-jwt/security/audit/jwt-decode-without-verify.yaml +37 -0
  1061. package/semgrep-rules/java/java-jwt/security/jwt-hardcode.java +59 -0
  1062. package/semgrep-rules/java/java-jwt/security/jwt-hardcode.yaml +53 -0
  1063. package/semgrep-rules/java/java-jwt/security/jwt-none-alg.java +51 -0
  1064. package/semgrep-rules/java/java-jwt/security/jwt-none-alg.yaml +46 -0
  1065. package/semgrep-rules/java/jax-rs/security/insecure-resteasy.java +68 -0
  1066. package/semgrep-rules/java/jax-rs/security/insecure-resteasy.yaml +80 -0
  1067. package/semgrep-rules/java/jax-rs/security/jax-rs-path-traversal.java +46 -0
  1068. package/semgrep-rules/java/jax-rs/security/jax-rs-path-traversal.yaml +44 -0
  1069. package/semgrep-rules/java/jboss/security/seam-log-injection.java +48 -0
  1070. package/semgrep-rules/java/jboss/security/seam-log-injection.yaml +39 -0
  1071. package/semgrep-rules/java/jboss/security/session_sqli.java +70 -0
  1072. package/semgrep-rules/java/jboss/security/session_sqli.yaml +49 -0
  1073. package/semgrep-rules/java/jjwt/security/jwt-none-alg.java +33 -0
  1074. package/semgrep-rules/java/jjwt/security/jwt-none-alg.yaml +41 -0
  1075. package/semgrep-rules/java/lang/correctness/assignment-comparison.java +17 -0
  1076. package/semgrep-rules/java/lang/correctness/assignment-comparison.yaml +12 -0
  1077. package/semgrep-rules/java/lang/correctness/eqeq.java +23 -0
  1078. package/semgrep-rules/java/lang/correctness/eqeq.yaml +20 -0
  1079. package/semgrep-rules/java/lang/correctness/hardcoded-conditional.java +48 -0
  1080. package/semgrep-rules/java/lang/correctness/hardcoded-conditional.yaml +19 -0
  1081. package/semgrep-rules/java/lang/correctness/no-string-eqeq.java +14 -0
  1082. package/semgrep-rules/java/lang/correctness/no-string-eqeq.yaml +15 -0
  1083. package/semgrep-rules/java/lang/security/audit/anonymous-ldap-bind.java +13 -0
  1084. package/semgrep-rules/java/lang/security/audit/anonymous-ldap-bind.yaml +33 -0
  1085. package/semgrep-rules/java/lang/security/audit/bad-hexa-conversion.java +39 -0
  1086. package/semgrep-rules/java/lang/security/audit/bad-hexa-conversion.yaml +32 -0
  1087. package/semgrep-rules/java/lang/security/audit/blowfish-insufficient-key-size.java +25 -0
  1088. package/semgrep-rules/java/lang/security/audit/blowfish-insufficient-key-size.yaml +38 -0
  1089. package/semgrep-rules/java/lang/security/audit/cbc-padding-oracle.fixed.java +31 -0
  1090. package/semgrep-rules/java/lang/security/audit/cbc-padding-oracle.java +31 -0
  1091. package/semgrep-rules/java/lang/security/audit/cbc-padding-oracle.yaml +37 -0
  1092. package/semgrep-rules/java/lang/security/audit/command-injection-formatted-runtime-call.java +62 -0
  1093. package/semgrep-rules/java/lang/security/audit/command-injection-formatted-runtime-call.yaml +89 -0
  1094. package/semgrep-rules/java/lang/security/audit/command-injection-process-builder.java +51 -0
  1095. package/semgrep-rules/java/lang/security/audit/command-injection-process-builder.yaml +147 -0
  1096. package/semgrep-rules/java/lang/security/audit/cookie-missing-httponly.java +116 -0
  1097. package/semgrep-rules/java/lang/security/audit/cookie-missing-httponly.yaml +37 -0
  1098. package/semgrep-rules/java/lang/security/audit/cookie-missing-secure-flag.java +114 -0
  1099. package/semgrep-rules/java/lang/security/audit/cookie-missing-secure-flag.yaml +37 -0
  1100. package/semgrep-rules/java/lang/security/audit/crlf-injection-logs.java +92 -0
  1101. package/semgrep-rules/java/lang/security/audit/crlf-injection-logs.yaml +85 -0
  1102. package/semgrep-rules/java/lang/security/audit/crypto/des-is-deprecated.fixed.java +38 -0
  1103. package/semgrep-rules/java/lang/security/audit/crypto/des-is-deprecated.java +38 -0
  1104. package/semgrep-rules/java/lang/security/audit/crypto/des-is-deprecated.yaml +47 -0
  1105. package/semgrep-rules/java/lang/security/audit/crypto/desede-is-deprecated.java +131 -0
  1106. package/semgrep-rules/java/lang/security/audit/crypto/desede-is-deprecated.yaml +34 -0
  1107. package/semgrep-rules/java/lang/security/audit/crypto/ecb-cipher.java +15 -0
  1108. package/semgrep-rules/java/lang/security/audit/crypto/ecb-cipher.yaml +36 -0
  1109. package/semgrep-rules/java/lang/security/audit/crypto/gcm-detection.java +72 -0
  1110. package/semgrep-rules/java/lang/security/audit/crypto/gcm-detection.yaml +37 -0
  1111. package/semgrep-rules/java/lang/security/audit/crypto/gcm-nonce-reuse.java +73 -0
  1112. package/semgrep-rules/java/lang/security/audit/crypto/gcm-nonce-reuse.yaml +28 -0
  1113. package/semgrep-rules/java/lang/security/audit/crypto/no-null-cipher.java +39 -0
  1114. package/semgrep-rules/java/lang/security/audit/crypto/no-null-cipher.yaml +37 -0
  1115. package/semgrep-rules/java/lang/security/audit/crypto/no-static-initialization-vector.java +47 -0
  1116. package/semgrep-rules/java/lang/security/audit/crypto/no-static-initialization-vector.yaml +49 -0
  1117. package/semgrep-rules/java/lang/security/audit/crypto/rsa-no-padding.java +16 -0
  1118. package/semgrep-rules/java/lang/security/audit/crypto/rsa-no-padding.yaml +34 -0
  1119. package/semgrep-rules/java/lang/security/audit/crypto/ssl/avoid-implementing-custom-digests.java +15 -0
  1120. package/semgrep-rules/java/lang/security/audit/crypto/ssl/avoid-implementing-custom-digests.yaml +35 -0
  1121. package/semgrep-rules/java/lang/security/audit/crypto/ssl/defaulthttpclient-is-deprecated.java +31 -0
  1122. package/semgrep-rules/java/lang/security/audit/crypto/ssl/defaulthttpclient-is-deprecated.yaml +34 -0
  1123. package/semgrep-rules/java/lang/security/audit/crypto/ssl/insecure-hostname-verifier.java +31 -0
  1124. package/semgrep-rules/java/lang/security/audit/crypto/ssl/insecure-hostname-verifier.yaml +43 -0
  1125. package/semgrep-rules/java/lang/security/audit/crypto/ssl/insecure-trust-manager.java +124 -0
  1126. package/semgrep-rules/java/lang/security/audit/crypto/ssl/insecure-trust-manager.yaml +57 -0
  1127. package/semgrep-rules/java/lang/security/audit/crypto/unencrypted-socket.java +70 -0
  1128. package/semgrep-rules/java/lang/security/audit/crypto/unencrypted-socket.yaml +36 -0
  1129. package/semgrep-rules/java/lang/security/audit/crypto/use-of-aes-ecb.java +16 -0
  1130. package/semgrep-rules/java/lang/security/audit/crypto/use-of-aes-ecb.yaml +31 -0
  1131. package/semgrep-rules/java/lang/security/audit/crypto/use-of-blowfish.java +16 -0
  1132. package/semgrep-rules/java/lang/security/audit/crypto/use-of-blowfish.yaml +31 -0
  1133. package/semgrep-rules/java/lang/security/audit/crypto/use-of-default-aes.java +69 -0
  1134. package/semgrep-rules/java/lang/security/audit/crypto/use-of-default-aes.yaml +61 -0
  1135. package/semgrep-rules/java/lang/security/audit/crypto/use-of-md5-digest-utils.fixed.java +25 -0
  1136. package/semgrep-rules/java/lang/security/audit/crypto/use-of-md5-digest-utils.java +25 -0
  1137. package/semgrep-rules/java/lang/security/audit/crypto/use-of-md5-digest-utils.yaml +40 -0
  1138. package/semgrep-rules/java/lang/security/audit/crypto/use-of-md5.fixed.java +48 -0
  1139. package/semgrep-rules/java/lang/security/audit/crypto/use-of-md5.java +48 -0
  1140. package/semgrep-rules/java/lang/security/audit/crypto/use-of-md5.yaml +36 -0
  1141. package/semgrep-rules/java/lang/security/audit/crypto/use-of-rc2.java +16 -0
  1142. package/semgrep-rules/java/lang/security/audit/crypto/use-of-rc2.yaml +31 -0
  1143. package/semgrep-rules/java/lang/security/audit/crypto/use-of-rc4.java +16 -0
  1144. package/semgrep-rules/java/lang/security/audit/crypto/use-of-rc4.yaml +31 -0
  1145. package/semgrep-rules/java/lang/security/audit/crypto/use-of-sha1.java +49 -0
  1146. package/semgrep-rules/java/lang/security/audit/crypto/use-of-sha1.yaml +42 -0
  1147. package/semgrep-rules/java/lang/security/audit/crypto/use-of-sha224.java +56 -0
  1148. package/semgrep-rules/java/lang/security/audit/crypto/use-of-sha224.yaml +47 -0
  1149. package/semgrep-rules/java/lang/security/audit/crypto/weak-random.java +218 -0
  1150. package/semgrep-rules/java/lang/security/audit/crypto/weak-random.yaml +30 -0
  1151. package/semgrep-rules/java/lang/security/audit/crypto/weak-rsa.java +16 -0
  1152. package/semgrep-rules/java/lang/security/audit/crypto/weak-rsa.yaml +37 -0
  1153. package/semgrep-rules/java/lang/security/audit/dangerous-groovy-shell.java +70 -0
  1154. package/semgrep-rules/java/lang/security/audit/dangerous-groovy-shell.yaml +45 -0
  1155. package/semgrep-rules/java/lang/security/audit/el-injection.java +57 -0
  1156. package/semgrep-rules/java/lang/security/audit/el-injection.yaml +136 -0
  1157. package/semgrep-rules/java/lang/security/audit/formatted-sql-string.java +145 -0
  1158. package/semgrep-rules/java/lang/security/audit/formatted-sql-string.yaml +89 -0
  1159. package/semgrep-rules/java/lang/security/audit/http-response-splitting.java +40 -0
  1160. package/semgrep-rules/java/lang/security/audit/http-response-splitting.yaml +43 -0
  1161. package/semgrep-rules/java/lang/security/audit/insecure-smtp-connection.java +31 -0
  1162. package/semgrep-rules/java/lang/security/audit/insecure-smtp-connection.yaml +33 -0
  1163. package/semgrep-rules/java/lang/security/audit/java-reverse-shell.java +3 -0
  1164. package/semgrep-rules/java/lang/security/audit/java-reverse-shell.yaml +42 -0
  1165. package/semgrep-rules/java/lang/security/audit/jdbc-sql-formatted-string.java +64 -0
  1166. package/semgrep-rules/java/lang/security/audit/jdbc-sql-formatted-string.yaml +119 -0
  1167. package/semgrep-rules/java/lang/security/audit/ldap-entry-poisoning.java +26 -0
  1168. package/semgrep-rules/java/lang/security/audit/ldap-entry-poisoning.yaml +40 -0
  1169. package/semgrep-rules/java/lang/security/audit/ldap-injection.java +142 -0
  1170. package/semgrep-rules/java/lang/security/audit/ldap-injection.yaml +81 -0
  1171. package/semgrep-rules/java/lang/security/audit/md5-used-as-password.java +68 -0
  1172. package/semgrep-rules/java/lang/security/audit/md5-used-as-password.yaml +43 -0
  1173. package/semgrep-rules/java/lang/security/audit/object-deserialization.java +26 -0
  1174. package/semgrep-rules/java/lang/security/audit/object-deserialization.yaml +33 -0
  1175. package/semgrep-rules/java/lang/security/audit/ognl-injection.java +43 -0
  1176. package/semgrep-rules/java/lang/security/audit/ognl-injection.yaml +838 -0
  1177. package/semgrep-rules/java/lang/security/audit/overly-permissive-file-permission.java +44 -0
  1178. package/semgrep-rules/java/lang/security/audit/overly-permissive-file-permission.yaml +48 -0
  1179. package/semgrep-rules/java/lang/security/audit/permissive-cors.java +147 -0
  1180. package/semgrep-rules/java/lang/security/audit/permissive-cors.yaml +76 -0
  1181. package/semgrep-rules/java/lang/security/audit/script-engine-injection.java +31 -0
  1182. package/semgrep-rules/java/lang/security/audit/script-engine-injection.yaml +65 -0
  1183. package/semgrep-rules/java/lang/security/audit/sqli/hibernate-sqli.java +46 -0
  1184. package/semgrep-rules/java/lang/security/audit/sqli/hibernate-sqli.yaml +89 -0
  1185. package/semgrep-rules/java/lang/security/audit/sqli/jdbc-sqli.java +91 -0
  1186. package/semgrep-rules/java/lang/security/audit/sqli/jdbc-sqli.yaml +62 -0
  1187. package/semgrep-rules/java/lang/security/audit/sqli/jdo-sqli.java +102 -0
  1188. package/semgrep-rules/java/lang/security/audit/sqli/jdo-sqli.yaml +95 -0
  1189. package/semgrep-rules/java/lang/security/audit/sqli/jpa-sqli.java +61 -0
  1190. package/semgrep-rules/java/lang/security/audit/sqli/jpa-sqli.yaml +62 -0
  1191. package/semgrep-rules/java/lang/security/audit/sqli/tainted-sql-from-http-request.java +289 -0
  1192. package/semgrep-rules/java/lang/security/audit/sqli/tainted-sql-from-http-request.yaml +77 -0
  1193. package/semgrep-rules/java/lang/security/audit/sqli/turbine-sqli.java +83 -0
  1194. package/semgrep-rules/java/lang/security/audit/sqli/turbine-sqli.yaml +94 -0
  1195. package/semgrep-rules/java/lang/security/audit/sqli/vertx-sqli.java +39 -0
  1196. package/semgrep-rules/java/lang/security/audit/sqli/vertx-sqli.yaml +69 -0
  1197. package/semgrep-rules/java/lang/security/audit/tainted-cmd-from-http-request.java +328 -0
  1198. package/semgrep-rules/java/lang/security/audit/tainted-cmd-from-http-request.yaml +73 -0
  1199. package/semgrep-rules/java/lang/security/audit/tainted-env-from-http-request.java +122 -0
  1200. package/semgrep-rules/java/lang/security/audit/tainted-env-from-http-request.yaml +45 -0
  1201. package/semgrep-rules/java/lang/security/audit/tainted-ldapi-from-http-request.java +377 -0
  1202. package/semgrep-rules/java/lang/security/audit/tainted-ldapi-from-http-request.yaml +41 -0
  1203. package/semgrep-rules/java/lang/security/audit/tainted-session-from-http-request.java +172 -0
  1204. package/semgrep-rules/java/lang/security/audit/tainted-session-from-http-request.yaml +69 -0
  1205. package/semgrep-rules/java/lang/security/audit/tainted-xpath-from-http-request.java +252 -0
  1206. package/semgrep-rules/java/lang/security/audit/tainted-xpath-from-http-request.yaml +37 -0
  1207. package/semgrep-rules/java/lang/security/audit/unsafe-reflection.java +27 -0
  1208. package/semgrep-rules/java/lang/security/audit/unsafe-reflection.yaml +38 -0
  1209. package/semgrep-rules/java/lang/security/audit/unvalidated-redirect.java +54 -0
  1210. package/semgrep-rules/java/lang/security/audit/unvalidated-redirect.yaml +126 -0
  1211. package/semgrep-rules/java/lang/security/audit/url-rewriting.java +45 -0
  1212. package/semgrep-rules/java/lang/security/audit/url-rewriting.yaml +81 -0
  1213. package/semgrep-rules/java/lang/security/audit/weak-ssl-context.java +52 -0
  1214. package/semgrep-rules/java/lang/security/audit/weak-ssl-context.yaml +33 -0
  1215. package/semgrep-rules/java/lang/security/audit/xml-decoder.java +50 -0
  1216. package/semgrep-rules/java/lang/security/audit/xml-decoder.yaml +52 -0
  1217. package/semgrep-rules/java/lang/security/audit/xss/jsf/autoescape-disabled.xhtml +4 -0
  1218. package/semgrep-rules/java/lang/security/audit/xss/jsf/autoescape-disabled.yaml +29 -0
  1219. package/semgrep-rules/java/lang/security/audit/xss/jsp/no-scriptlets.jsp +27 -0
  1220. package/semgrep-rules/java/lang/security/audit/xss/jsp/no-scriptlets.yaml +30 -0
  1221. package/semgrep-rules/java/lang/security/audit/xss/jsp/use-escapexml.jsp +9 -0
  1222. package/semgrep-rules/java/lang/security/audit/xss/jsp/use-escapexml.yaml +32 -0
  1223. package/semgrep-rules/java/lang/security/audit/xss/jsp/use-jstl-escaping.jsp +9 -0
  1224. package/semgrep-rules/java/lang/security/audit/xss/jsp/use-jstl-escaping.yaml +33 -0
  1225. package/semgrep-rules/java/lang/security/audit/xss/no-direct-response-writer.java +340 -0
  1226. package/semgrep-rules/java/lang/security/audit/xss/no-direct-response-writer.yaml +73 -0
  1227. package/semgrep-rules/java/lang/security/audit/xssrequestwrapper-is-insecure.java +170 -0
  1228. package/semgrep-rules/java/lang/security/audit/xssrequestwrapper-is-insecure.yaml +39 -0
  1229. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-disallow-doctype-decl-false.java +73 -0
  1230. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-disallow-doctype-decl-false.yaml +73 -0
  1231. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-disallow-doctype-decl-missing.fixed.java +169 -0
  1232. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-disallow-doctype-decl-missing.java +165 -0
  1233. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-disallow-doctype-decl-missing.yaml +161 -0
  1234. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-external-general-entities-true.java +38 -0
  1235. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-external-general-entities-true.yaml +37 -0
  1236. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-external-parameter-entities-true.java +38 -0
  1237. package/semgrep-rules/java/lang/security/audit/xxe/documentbuilderfactory-external-parameter-entities-true.yaml +37 -0
  1238. package/semgrep-rules/java/lang/security/audit/xxe/saxparserfactory-disallow-doctype-decl-missing.java +165 -0
  1239. package/semgrep-rules/java/lang/security/audit/xxe/saxparserfactory-disallow-doctype-decl-missing.yaml +164 -0
  1240. package/semgrep-rules/java/lang/security/audit/xxe/transformerfactory-dtds-not-disabled.java +52 -0
  1241. package/semgrep-rules/java/lang/security/audit/xxe/transformerfactory-dtds-not-disabled.yaml +190 -0
  1242. package/semgrep-rules/java/lang/security/do-privileged-use.java +47 -0
  1243. package/semgrep-rules/java/lang/security/do-privileged-use.yaml +34 -0
  1244. package/semgrep-rules/java/lang/security/httpservlet-path-traversal.java +121 -0
  1245. package/semgrep-rules/java/lang/security/httpservlet-path-traversal.yaml +63 -0
  1246. package/semgrep-rules/java/lang/security/insecure-jms-deserialization.java +74 -0
  1247. package/semgrep-rules/java/lang/security/insecure-jms-deserialization.yaml +49 -0
  1248. package/semgrep-rules/java/lang/security/jackson-unsafe-deserialization.java +107 -0
  1249. package/semgrep-rules/java/lang/security/jackson-unsafe-deserialization.yaml +74 -0
  1250. package/semgrep-rules/java/lang/security/servletresponse-writer-xss.java +37 -0
  1251. package/semgrep-rules/java/lang/security/servletresponse-writer-xss.yaml +39 -0
  1252. package/semgrep-rules/java/lang/security/use-snakeyaml-constructor.java +22 -0
  1253. package/semgrep-rules/java/lang/security/use-snakeyaml-constructor.yaml +33 -0
  1254. package/semgrep-rules/java/lang/security/xmlinputfactory-external-entities-enabled.java +47 -0
  1255. package/semgrep-rules/java/lang/security/xmlinputfactory-external-entities-enabled.yaml +41 -0
  1256. package/semgrep-rules/java/lang/security/xmlinputfactory-possible-xxe.java +65 -0
  1257. package/semgrep-rules/java/lang/security/xmlinputfactory-possible-xxe.yaml +64 -0
  1258. package/semgrep-rules/java/mongodb/security/injection/audit/mongodb-nosqli.java +530 -0
  1259. package/semgrep-rules/java/mongodb/security/injection/audit/mongodb-nosqli.yaml +69 -0
  1260. package/semgrep-rules/java/rmi/security/server-dangerous-class-deserialization.java +47 -0
  1261. package/semgrep-rules/java/rmi/security/server-dangerous-class-deserialization.yaml +37 -0
  1262. package/semgrep-rules/java/rmi/security/server-dangerous-object-deserialization.java +56 -0
  1263. package/semgrep-rules/java/rmi/security/server-dangerous-object-deserialization.yaml +71 -0
  1264. package/semgrep-rules/java/servlets/security/cookie-issecure-false.java +14 -0
  1265. package/semgrep-rules/java/servlets/security/cookie-issecure-false.yaml +36 -0
  1266. package/semgrep-rules/java/servlets/security/cookie-setSecure.java +16 -0
  1267. package/semgrep-rules/java/servlets/security/cookie-setSecure.yaml +41 -0
  1268. package/semgrep-rules/java/spring/security/audit/spel-injection.java +81 -0
  1269. package/semgrep-rules/java/spring/security/audit/spel-injection.yaml +100 -0
  1270. package/semgrep-rules/java/spring/security/audit/spring-actuator-fully-enabled-yaml.test.yaml +10 -0
  1271. package/semgrep-rules/java/spring/security/audit/spring-actuator-fully-enabled-yaml.yaml +39 -0
  1272. package/semgrep-rules/java/spring/security/audit/spring-actuator-fully-enabled.properties +4 -0
  1273. package/semgrep-rules/java/spring/security/audit/spring-actuator-fully-enabled.yaml +31 -0
  1274. package/semgrep-rules/java/spring/security/audit/spring-actuator-non-health-enabled-yaml.test.yaml +13 -0
  1275. package/semgrep-rules/java/spring/security/audit/spring-actuator-non-health-enabled-yaml.yaml +42 -0
  1276. package/semgrep-rules/java/spring/security/audit/spring-actuator-non-health-enabled.properties +8 -0
  1277. package/semgrep-rules/java/spring/security/audit/spring-actuator-non-health-enabled.yaml +33 -0
  1278. package/semgrep-rules/java/spring/security/audit/spring-csrf-disabled.java +50 -0
  1279. package/semgrep-rules/java/spring/security/audit/spring-csrf-disabled.yaml +30 -0
  1280. package/semgrep-rules/java/spring/security/audit/spring-jsp-eval.jsp +7 -0
  1281. package/semgrep-rules/java/spring/security/audit/spring-jsp-eval.yaml +28 -0
  1282. package/semgrep-rules/java/spring/security/audit/spring-sqli.java +211 -0
  1283. package/semgrep-rules/java/spring/security/audit/spring-sqli.yaml +67 -0
  1284. package/semgrep-rules/java/spring/security/audit/spring-unvalidated-redirect.java +52 -0
  1285. package/semgrep-rules/java/spring/security/audit/spring-unvalidated-redirect.yaml +50 -0
  1286. package/semgrep-rules/java/spring/security/injection/tainted-file-path.java +121 -0
  1287. package/semgrep-rules/java/spring/security/injection/tainted-file-path.yaml +76 -0
  1288. package/semgrep-rules/java/spring/security/injection/tainted-html-string.java +541 -0
  1289. package/semgrep-rules/java/spring/security/injection/tainted-html-string.yaml +106 -0
  1290. package/semgrep-rules/java/spring/security/injection/tainted-sql-string.java +222 -0
  1291. package/semgrep-rules/java/spring/security/injection/tainted-sql-string.yaml +89 -0
  1292. package/semgrep-rules/java/spring/security/injection/tainted-system-command.java +286 -0
  1293. package/semgrep-rules/java/spring/security/injection/tainted-system-command.yaml +104 -0
  1294. package/semgrep-rules/java/spring/security/injection/tainted-url-host.java +86 -0
  1295. package/semgrep-rules/java/spring/security/injection/tainted-url-host.yaml +84 -0
  1296. package/semgrep-rules/java/spring/security/unrestricted-request-mapping.java +38 -0
  1297. package/semgrep-rules/java/spring/security/unrestricted-request-mapping.yaml +38 -0
  1298. package/semgrep-rules/javascript/ajv/security/audit/ajv-allerrors-true.js +41 -0
  1299. package/semgrep-rules/javascript/ajv/security/audit/ajv-allerrors-true.yaml +33 -0
  1300. package/semgrep-rules/javascript/angular/security/detect-angular-element-methods.js +17 -0
  1301. package/semgrep-rules/javascript/angular/security/detect-angular-element-methods.yaml +63 -0
  1302. package/semgrep-rules/javascript/angular/security/detect-angular-element-taint.js +13 -0
  1303. package/semgrep-rules/javascript/angular/security/detect-angular-element-taint.yaml +82 -0
  1304. package/semgrep-rules/javascript/angular/security/detect-angular-open-redirect.js +18 -0
  1305. package/semgrep-rules/javascript/angular/security/detect-angular-open-redirect.yaml +37 -0
  1306. package/semgrep-rules/javascript/angular/security/detect-angular-resource-loading.js +32 -0
  1307. package/semgrep-rules/javascript/angular/security/detect-angular-resource-loading.yaml +36 -0
  1308. package/semgrep-rules/javascript/angular/security/detect-angular-sce-disabled.js +18 -0
  1309. package/semgrep-rules/javascript/angular/security/detect-angular-sce-disabled.yaml +30 -0
  1310. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-css.js +17 -0
  1311. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-css.yaml +38 -0
  1312. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-html-method.js +17 -0
  1313. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-html-method.yaml +38 -0
  1314. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-js-method.js +17 -0
  1315. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-js-method.yaml +38 -0
  1316. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-method.js +24 -0
  1317. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-method.yaml +38 -0
  1318. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-resourceurl-method.js +17 -0
  1319. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-resourceurl-method.yaml +38 -0
  1320. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-url-method.js +17 -0
  1321. package/semgrep-rules/javascript/angular/security/detect-angular-trust-as-url-method.yaml +38 -0
  1322. package/semgrep-rules/javascript/angular/security/detect-third-party-angular-translate.js +10 -0
  1323. package/semgrep-rules/javascript/angular/security/detect-third-party-angular-translate.yaml +35 -0
  1324. package/semgrep-rules/javascript/apollo/security/apollo-axios-ssrf.jsx +89 -0
  1325. package/semgrep-rules/javascript/apollo/security/apollo-axios-ssrf.yaml +46 -0
  1326. package/semgrep-rules/javascript/argon2/security/unsafe-argon2-config.js +63 -0
  1327. package/semgrep-rules/javascript/argon2/security/unsafe-argon2-config.yaml +47 -0
  1328. package/semgrep-rules/javascript/audit/detect-replaceall-sanitization.ts +9 -0
  1329. package/semgrep-rules/javascript/audit/detect-replaceall-sanitization.yaml +41 -0
  1330. package/semgrep-rules/javascript/aws-lambda/security/detect-child-process.js +14 -0
  1331. package/semgrep-rules/javascript/aws-lambda/security/detect-child-process.yaml +66 -0
  1332. package/semgrep-rules/javascript/aws-lambda/security/dynamodb-request-object.js +81 -0
  1333. package/semgrep-rules/javascript/aws-lambda/security/dynamodb-request-object.yaml +70 -0
  1334. package/semgrep-rules/javascript/aws-lambda/security/knex-sqli.js +29 -0
  1335. package/semgrep-rules/javascript/aws-lambda/security/knex-sqli.yaml +64 -0
  1336. package/semgrep-rules/javascript/aws-lambda/security/mysql-sqli.js +55 -0
  1337. package/semgrep-rules/javascript/aws-lambda/security/mysql-sqli.yaml +75 -0
  1338. package/semgrep-rules/javascript/aws-lambda/security/pg-sqli.js +50 -0
  1339. package/semgrep-rules/javascript/aws-lambda/security/pg-sqli.yaml +62 -0
  1340. package/semgrep-rules/javascript/aws-lambda/security/sequelize-sqli.js +39 -0
  1341. package/semgrep-rules/javascript/aws-lambda/security/sequelize-sqli.yaml +62 -0
  1342. package/semgrep-rules/javascript/aws-lambda/security/tainted-eval.js +13 -0
  1343. package/semgrep-rules/javascript/aws-lambda/security/tainted-eval.yaml +51 -0
  1344. package/semgrep-rules/javascript/aws-lambda/security/tainted-html-response.js +20 -0
  1345. package/semgrep-rules/javascript/aws-lambda/security/tainted-html-response.yaml +51 -0
  1346. package/semgrep-rules/javascript/aws-lambda/security/tainted-html-string.js +29 -0
  1347. package/semgrep-rules/javascript/aws-lambda/security/tainted-html-string.yaml +71 -0
  1348. package/semgrep-rules/javascript/aws-lambda/security/tainted-sql-string.js +36 -0
  1349. package/semgrep-rules/javascript/aws-lambda/security/tainted-sql-string.yaml +68 -0
  1350. package/semgrep-rules/javascript/aws-lambda/security/vm-runincontext-injection.js +80 -0
  1351. package/semgrep-rules/javascript/aws-lambda/security/vm-runincontext-injection.yaml +67 -0
  1352. package/semgrep-rules/javascript/bluebird/security/audit/tofastproperties-code-execution.js +11 -0
  1353. package/semgrep-rules/javascript/bluebird/security/audit/tofastproperties-code-execution.yaml +43 -0
  1354. package/semgrep-rules/javascript/browser/security/dom-based-xss.js +5 -0
  1355. package/semgrep-rules/javascript/browser/security/dom-based-xss.yaml +33 -0
  1356. package/semgrep-rules/javascript/browser/security/eval-detected.js +41 -0
  1357. package/semgrep-rules/javascript/browser/security/eval-detected.yaml +34 -0
  1358. package/semgrep-rules/javascript/browser/security/insecure-document-method.js +28 -0
  1359. package/semgrep-rules/javascript/browser/security/insecure-document-method.yaml +39 -0
  1360. package/semgrep-rules/javascript/browser/security/insecure-innerhtml.js +28 -0
  1361. package/semgrep-rules/javascript/browser/security/insecure-innerhtml.yaml +31 -0
  1362. package/semgrep-rules/javascript/browser/security/insufficient-postmessage-origin-validation.js +69 -0
  1363. package/semgrep-rules/javascript/browser/security/insufficient-postmessage-origin-validation.yaml +50 -0
  1364. package/semgrep-rules/javascript/browser/security/open-redirect-from-function.js +18 -0
  1365. package/semgrep-rules/javascript/browser/security/open-redirect-from-function.yaml +57 -0
  1366. package/semgrep-rules/javascript/browser/security/open-redirect.js +27 -0
  1367. package/semgrep-rules/javascript/browser/security/open-redirect.yaml +94 -0
  1368. package/semgrep-rules/javascript/browser/security/raw-html-concat.js +191 -0
  1369. package/semgrep-rules/javascript/browser/security/raw-html-concat.yaml +166 -0
  1370. package/semgrep-rules/javascript/browser/security/raw-html-join.js +159 -0
  1371. package/semgrep-rules/javascript/browser/security/raw-html-join.yaml +42 -0
  1372. package/semgrep-rules/javascript/browser/security/wildcard-postmessage-configuration.js +11 -0
  1373. package/semgrep-rules/javascript/browser/security/wildcard-postmessage-configuration.yaml +25 -0
  1374. package/semgrep-rules/javascript/chrome-remote-interface/security/audit/chrome-remote-interface-compilescript-injection.js +112 -0
  1375. package/semgrep-rules/javascript/chrome-remote-interface/security/audit/chrome-remote-interface-compilescript-injection.yaml +54 -0
  1376. package/semgrep-rules/javascript/deno/security/audit/deno-dangerous-run.js +29 -0
  1377. package/semgrep-rules/javascript/deno/security/audit/deno-dangerous-run.yaml +46 -0
  1378. package/semgrep-rules/javascript/express/security/audit/express-check-csurf-middleware-usage.js +34 -0
  1379. package/semgrep-rules/javascript/express/security/audit/express-check-csurf-middleware-usage.yaml +49 -0
  1380. package/semgrep-rules/javascript/express/security/audit/express-check-directory-listing.js +26 -0
  1381. package/semgrep-rules/javascript/express/security/audit/express-check-directory-listing.yaml +53 -0
  1382. package/semgrep-rules/javascript/express/security/audit/express-cookie-settings.js +121 -0
  1383. package/semgrep-rules/javascript/express/security/audit/express-cookie-settings.yaml +357 -0
  1384. package/semgrep-rules/javascript/express/security/audit/express-detect-notevil-usage.ts +53 -0
  1385. package/semgrep-rules/javascript/express/security/audit/express-detect-notevil-usage.yaml +54 -0
  1386. package/semgrep-rules/javascript/express/security/audit/express-jwt-not-revoked.js +31 -0
  1387. package/semgrep-rules/javascript/express/security/audit/express-jwt-not-revoked.yaml +43 -0
  1388. package/semgrep-rules/javascript/express/security/audit/express-libxml-noent.js +18 -0
  1389. package/semgrep-rules/javascript/express/security/audit/express-libxml-noent.yaml +90 -0
  1390. package/semgrep-rules/javascript/express/security/audit/express-libxml-vm-noent.js +43 -0
  1391. package/semgrep-rules/javascript/express/security/audit/express-libxml-vm-noent.yaml +52 -0
  1392. package/semgrep-rules/javascript/express/security/audit/express-open-redirect.js +60 -0
  1393. package/semgrep-rules/javascript/express/security/audit/express-open-redirect.yaml +113 -0
  1394. package/semgrep-rules/javascript/express/security/audit/express-path-join-resolve-traversal.js +97 -0
  1395. package/semgrep-rules/javascript/express/security/audit/express-path-join-resolve-traversal.yaml +96 -0
  1396. package/semgrep-rules/javascript/express/security/audit/express-res-sendfile.ts +77 -0
  1397. package/semgrep-rules/javascript/express/security/audit/express-res-sendfile.yaml +75 -0
  1398. package/semgrep-rules/javascript/express/security/audit/express-session-hardcoded-secret.ts +47 -0
  1399. package/semgrep-rules/javascript/express/security/audit/express-session-hardcoded-secret.yaml +56 -0
  1400. package/semgrep-rules/javascript/express/security/audit/express-ssrf.ts +111 -0
  1401. package/semgrep-rules/javascript/express/security/audit/express-ssrf.yaml +194 -0
  1402. package/semgrep-rules/javascript/express/security/audit/express-third-party-object-deserialization.ts +18 -0
  1403. package/semgrep-rules/javascript/express/security/audit/express-third-party-object-deserialization.yaml +89 -0
  1404. package/semgrep-rules/javascript/express/security/audit/express-xml2json-xxe-event.js +57 -0
  1405. package/semgrep-rules/javascript/express/security/audit/express-xml2json-xxe-event.yaml +72 -0
  1406. package/semgrep-rules/javascript/express/security/audit/possible-user-input-redirect.js +31 -0
  1407. package/semgrep-rules/javascript/express/security/audit/possible-user-input-redirect.yaml +41 -0
  1408. package/semgrep-rules/javascript/express/security/audit/remote-property-injection.js +24 -0
  1409. package/semgrep-rules/javascript/express/security/audit/remote-property-injection.yaml +74 -0
  1410. package/semgrep-rules/javascript/express/security/audit/res-render-injection.js +24 -0
  1411. package/semgrep-rules/javascript/express/security/audit/res-render-injection.yaml +68 -0
  1412. package/semgrep-rules/javascript/express/security/audit/xss/direct-response-write.js +172 -0
  1413. package/semgrep-rules/javascript/express/security/audit/xss/direct-response-write.yaml +238 -0
  1414. package/semgrep-rules/javascript/express/security/audit/xss/ejs/explicit-unescape.ejs +55 -0
  1415. package/semgrep-rules/javascript/express/security/audit/xss/ejs/explicit-unescape.yaml +37 -0
  1416. package/semgrep-rules/javascript/express/security/audit/xss/ejs/var-in-href.ejs +56 -0
  1417. package/semgrep-rules/javascript/express/security/audit/xss/ejs/var-in-href.yaml +37 -0
  1418. package/semgrep-rules/javascript/express/security/audit/xss/ejs/var-in-script-src.ejs +46 -0
  1419. package/semgrep-rules/javascript/express/security/audit/xss/ejs/var-in-script-src.yaml +42 -0
  1420. package/semgrep-rules/javascript/express/security/audit/xss/ejs/var-in-script-tag.ejs +65 -0
  1421. package/semgrep-rules/javascript/express/security/audit/xss/ejs/var-in-script-tag.yaml +42 -0
  1422. package/semgrep-rules/javascript/express/security/audit/xss/mustache/escape-function-overwrite.js +25 -0
  1423. package/semgrep-rules/javascript/express/security/audit/xss/mustache/escape-function-overwrite.yaml +37 -0
  1424. package/semgrep-rules/javascript/express/security/audit/xss/mustache/explicit-unescape.mustache +68 -0
  1425. package/semgrep-rules/javascript/express/security/audit/xss/mustache/explicit-unescape.yaml +39 -0
  1426. package/semgrep-rules/javascript/express/security/audit/xss/mustache/var-in-script-tag.mustache +67 -0
  1427. package/semgrep-rules/javascript/express/security/audit/xss/mustache/var-in-script-tag.yaml +41 -0
  1428. package/semgrep-rules/javascript/express/security/audit/xss/pug/and-attributes.pug +33 -0
  1429. package/semgrep-rules/javascript/express/security/audit/xss/pug/and-attributes.yaml +33 -0
  1430. package/semgrep-rules/javascript/express/security/audit/xss/pug/explicit-unescape.pug +35 -0
  1431. package/semgrep-rules/javascript/express/security/audit/xss/pug/explicit-unescape.yaml +36 -0
  1432. package/semgrep-rules/javascript/express/security/audit/xss/pug/var-in-href.pug +32 -0
  1433. package/semgrep-rules/javascript/express/security/audit/xss/pug/var-in-href.yaml +36 -0
  1434. package/semgrep-rules/javascript/express/security/audit/xss/pug/var-in-script-tag.pug +23 -0
  1435. package/semgrep-rules/javascript/express/security/audit/xss/pug/var-in-script-tag.yaml +43 -0
  1436. package/semgrep-rules/javascript/express/security/cors-misconfiguration.js +30 -0
  1437. package/semgrep-rules/javascript/express/security/cors-misconfiguration.yaml +72 -0
  1438. package/semgrep-rules/javascript/express/security/express-data-exfiltration.js +57 -0
  1439. package/semgrep-rules/javascript/express/security/express-data-exfiltration.yaml +60 -0
  1440. package/semgrep-rules/javascript/express/security/express-expat-xxe.js +57 -0
  1441. package/semgrep-rules/javascript/express/security/express-expat-xxe.yaml +89 -0
  1442. package/semgrep-rules/javascript/express/security/express-insecure-template-usage.jsx +46 -0
  1443. package/semgrep-rules/javascript/express/security/express-insecure-template-usage.yaml +179 -0
  1444. package/semgrep-rules/javascript/express/security/express-jwt-hardcoded-secret.js +41 -0
  1445. package/semgrep-rules/javascript/express/security/express-jwt-hardcoded-secret.yaml +55 -0
  1446. package/semgrep-rules/javascript/express/security/express-phantom-injection.js +73 -0
  1447. package/semgrep-rules/javascript/express/security/express-phantom-injection.yaml +75 -0
  1448. package/semgrep-rules/javascript/express/security/express-puppeteer-injection.js +98 -0
  1449. package/semgrep-rules/javascript/express/security/express-puppeteer-injection.yaml +78 -0
  1450. package/semgrep-rules/javascript/express/security/express-sandbox-injection.js +56 -0
  1451. package/semgrep-rules/javascript/express/security/express-sandbox-injection.yaml +73 -0
  1452. package/semgrep-rules/javascript/express/security/express-vm-injection.js +140 -0
  1453. package/semgrep-rules/javascript/express/security/express-vm-injection.yaml +73 -0
  1454. package/semgrep-rules/javascript/express/security/express-vm2-injection.js +162 -0
  1455. package/semgrep-rules/javascript/express/security/express-vm2-injection.yaml +83 -0
  1456. package/semgrep-rules/javascript/express/security/express-wkhtml-injection.js +32 -0
  1457. package/semgrep-rules/javascript/express/security/express-wkhtml-injection.yaml +125 -0
  1458. package/semgrep-rules/javascript/express/security/express-xml2json-xxe.js +45 -0
  1459. package/semgrep-rules/javascript/express/security/express-xml2json-xxe.yaml +80 -0
  1460. package/semgrep-rules/javascript/express/security/injection/raw-html-format.js +61 -0
  1461. package/semgrep-rules/javascript/express/security/injection/raw-html-format.yaml +92 -0
  1462. package/semgrep-rules/javascript/express/security/injection/tainted-sql-string.js +87 -0
  1463. package/semgrep-rules/javascript/express/security/injection/tainted-sql-string.yaml +73 -0
  1464. package/semgrep-rules/javascript/express/security/require-request.js +52 -0
  1465. package/semgrep-rules/javascript/express/security/require-request.yaml +65 -0
  1466. package/semgrep-rules/javascript/express/security/x-frame-options-misconfiguration.js +14 -0
  1467. package/semgrep-rules/javascript/express/security/x-frame-options-misconfiguration.yaml +72 -0
  1468. package/semgrep-rules/javascript/fbjs/security/audit/insecure-createnodesfrommarkup.js +14 -0
  1469. package/semgrep-rules/javascript/fbjs/security/audit/insecure-createnodesfrommarkup.yaml +32 -0
  1470. package/semgrep-rules/javascript/grpc/security/grpc-nodejs-insecure-connection.js +59 -0
  1471. package/semgrep-rules/javascript/grpc/security/grpc-nodejs-insecure-connection.yaml +48 -0
  1472. package/semgrep-rules/javascript/intercom/security/audit/intercom-settings-user-identifier-without-user-hash.js +95 -0
  1473. package/semgrep-rules/javascript/intercom/security/audit/intercom-settings-user-identifier-without-user-hash.yaml +49 -0
  1474. package/semgrep-rules/javascript/jose/security/audit/jose-exposed-data.js +204 -0
  1475. package/semgrep-rules/javascript/jose/security/audit/jose-exposed-data.yaml +48 -0
  1476. package/semgrep-rules/javascript/jose/security/jwt-hardcode.js +178 -0
  1477. package/semgrep-rules/javascript/jose/security/jwt-hardcode.yaml +72 -0
  1478. package/semgrep-rules/javascript/jose/security/jwt-none-alg.js +4 -0
  1479. package/semgrep-rules/javascript/jose/security/jwt-none-alg.yaml +54 -0
  1480. package/semgrep-rules/javascript/jquery/security/audit/jquery-insecure-method.js +73 -0
  1481. package/semgrep-rules/javascript/jquery/security/audit/jquery-insecure-method.yaml +52 -0
  1482. package/semgrep-rules/javascript/jquery/security/audit/jquery-insecure-selector.js +74 -0
  1483. package/semgrep-rules/javascript/jquery/security/audit/jquery-insecure-selector.yaml +85 -0
  1484. package/semgrep-rules/javascript/jquery/security/audit/prohibit-jquery-html.js +40 -0
  1485. package/semgrep-rules/javascript/jquery/security/audit/prohibit-jquery-html.yaml +43 -0
  1486. package/semgrep-rules/javascript/jsonwebtoken/security/audit/example1.js +23 -0
  1487. package/semgrep-rules/javascript/jsonwebtoken/security/audit/jwt-decode-without-verify.js +24 -0
  1488. package/semgrep-rules/javascript/jsonwebtoken/security/audit/jwt-decode-without-verify.jsx +16 -0
  1489. package/semgrep-rules/javascript/jsonwebtoken/security/audit/jwt-decode-without-verify.yaml +45 -0
  1490. package/semgrep-rules/javascript/jsonwebtoken/security/audit/jwt-exposed-data.js +25 -0
  1491. package/semgrep-rules/javascript/jsonwebtoken/security/audit/jwt-exposed-data.yaml +40 -0
  1492. package/semgrep-rules/javascript/jsonwebtoken/security/example1.js +26 -0
  1493. package/semgrep-rules/javascript/jsonwebtoken/security/example2.js +21 -0
  1494. package/semgrep-rules/javascript/jsonwebtoken/security/example3.js +21 -0
  1495. package/semgrep-rules/javascript/jsonwebtoken/security/example4.js +16 -0
  1496. package/semgrep-rules/javascript/jsonwebtoken/security/jwt-hardcode.js +48 -0
  1497. package/semgrep-rules/javascript/jsonwebtoken/security/jwt-hardcode.yaml +70 -0
  1498. package/semgrep-rules/javascript/jsonwebtoken/security/jwt-none-alg.js +13 -0
  1499. package/semgrep-rules/javascript/jsonwebtoken/security/jwt-none-alg.yaml +39 -0
  1500. package/semgrep-rules/javascript/jsonwebtoken/security/simple-examples.js +39 -0
  1501. package/semgrep-rules/javascript/jwt-simple/security/jwt-simple-noverify.js +142 -0
  1502. package/semgrep-rules/javascript/jwt-simple/security/jwt-simple-noverify.yaml +46 -0
  1503. package/semgrep-rules/javascript/lang/best-practice/assigned-undefined.js +13 -0
  1504. package/semgrep-rules/javascript/lang/best-practice/assigned-undefined.yaml +18 -0
  1505. package/semgrep-rules/javascript/lang/best-practice/lazy-load-module.js +8 -0
  1506. package/semgrep-rules/javascript/lang/best-practice/lazy-load-module.yaml +24 -0
  1507. package/semgrep-rules/javascript/lang/best-practice/leftover_debugging.js +14 -0
  1508. package/semgrep-rules/javascript/lang/best-practice/leftover_debugging.yaml +50 -0
  1509. package/semgrep-rules/javascript/lang/best-practice/zlib-async-loop.js +21 -0
  1510. package/semgrep-rules/javascript/lang/best-practice/zlib-async-loop.yaml +41 -0
  1511. package/semgrep-rules/javascript/lang/correctness/missing-template-string-indicator.js +27 -0
  1512. package/semgrep-rules/javascript/lang/correctness/missing-template-string-indicator.yaml +18 -0
  1513. package/semgrep-rules/javascript/lang/correctness/no-replaceall.js +9 -0
  1514. package/semgrep-rules/javascript/lang/correctness/no-replaceall.yaml +18 -0
  1515. package/semgrep-rules/javascript/lang/correctness/no-stringify-keys.jsx +21 -0
  1516. package/semgrep-rules/javascript/lang/correctness/no-stringify-keys.yaml +29 -0
  1517. package/semgrep-rules/javascript/lang/correctness/useless-assign.js +39 -0
  1518. package/semgrep-rules/javascript/lang/correctness/useless-assign.yaml +18 -0
  1519. package/semgrep-rules/javascript/lang/correctness/useless-eqeq.js +9 -0
  1520. package/semgrep-rules/javascript/lang/correctness/useless-eqeq.yaml +21 -0
  1521. package/semgrep-rules/javascript/lang/security/audit/code-string-concat.js +19 -0
  1522. package/semgrep-rules/javascript/lang/security/audit/code-string-concat.yaml +89 -0
  1523. package/semgrep-rules/javascript/lang/security/audit/dangerous-spawn-shell.js +20 -0
  1524. package/semgrep-rules/javascript/lang/security/audit/dangerous-spawn-shell.yaml +66 -0
  1525. package/semgrep-rules/javascript/lang/security/audit/detect-non-literal-fs-filename.js +56 -0
  1526. package/semgrep-rules/javascript/lang/security/audit/detect-non-literal-fs-filename.ts +56 -0
  1527. package/semgrep-rules/javascript/lang/security/audit/detect-non-literal-fs-filename.yaml +271 -0
  1528. package/semgrep-rules/javascript/lang/security/audit/detect-non-literal-regexp.js +18 -0
  1529. package/semgrep-rules/javascript/lang/security/audit/detect-non-literal-regexp.yaml +44 -0
  1530. package/semgrep-rules/javascript/lang/security/audit/detect-non-literal-require.js +39 -0
  1531. package/semgrep-rules/javascript/lang/security/audit/detect-non-literal-require.yaml +33 -0
  1532. package/semgrep-rules/javascript/lang/security/audit/detect-redos.js +19 -0
  1533. package/semgrep-rules/javascript/lang/security/audit/detect-redos.yaml +42 -0
  1534. package/semgrep-rules/javascript/lang/security/audit/hardcoded-hmac-key.js +17 -0
  1535. package/semgrep-rules/javascript/lang/security/audit/hardcoded-hmac-key.yaml +38 -0
  1536. package/semgrep-rules/javascript/lang/security/audit/incomplete-sanitization.js +24 -0
  1537. package/semgrep-rules/javascript/lang/security/audit/incomplete-sanitization.yaml +31 -0
  1538. package/semgrep-rules/javascript/lang/security/audit/md5-used-as-password.js +13 -0
  1539. package/semgrep-rules/javascript/lang/security/audit/md5-used-as-password.yaml +39 -0
  1540. package/semgrep-rules/javascript/lang/security/audit/path-traversal/path-join-resolve-traversal.js +80 -0
  1541. package/semgrep-rules/javascript/lang/security/audit/path-traversal/path-join-resolve-traversal.ts +90 -0
  1542. package/semgrep-rules/javascript/lang/security/audit/path-traversal/path-join-resolve-traversal.yaml +74 -0
  1543. package/semgrep-rules/javascript/lang/security/audit/path-traversal/real-example1.js +35 -0
  1544. package/semgrep-rules/javascript/lang/security/audit/path-traversal/real-example2.js +29 -0
  1545. package/semgrep-rules/javascript/lang/security/audit/prototype-pollution/prototype-pollution-assignment.js +75 -0
  1546. package/semgrep-rules/javascript/lang/security/audit/prototype-pollution/prototype-pollution-assignment.yaml +73 -0
  1547. package/semgrep-rules/javascript/lang/security/audit/prototype-pollution/prototype-pollution-loop.js +87 -0
  1548. package/semgrep-rules/javascript/lang/security/audit/prototype-pollution/prototype-pollution-loop.yaml +70 -0
  1549. package/semgrep-rules/javascript/lang/security/audit/spawn-shell-true.js +13 -0
  1550. package/semgrep-rules/javascript/lang/security/audit/spawn-shell-true.yaml +49 -0
  1551. package/semgrep-rules/javascript/lang/security/audit/sqli/node-knex-sqli.js +29 -0
  1552. package/semgrep-rules/javascript/lang/security/audit/sqli/node-knex-sqli.yaml +89 -0
  1553. package/semgrep-rules/javascript/lang/security/audit/sqli/node-mssql-sqli.js +77 -0
  1554. package/semgrep-rules/javascript/lang/security/audit/sqli/node-mssql-sqli.yaml +55 -0
  1555. package/semgrep-rules/javascript/lang/security/audit/sqli/node-mysql-sqli.js +63 -0
  1556. package/semgrep-rules/javascript/lang/security/audit/sqli/node-mysql-sqli.yaml +71 -0
  1557. package/semgrep-rules/javascript/lang/security/audit/sqli/node-postgres-sqli.js +156 -0
  1558. package/semgrep-rules/javascript/lang/security/audit/sqli/node-postgres-sqli.yaml +62 -0
  1559. package/semgrep-rules/javascript/lang/security/audit/unknown-value-with-script-tag.js +126 -0
  1560. package/semgrep-rules/javascript/lang/security/audit/unknown-value-with-script-tag.yaml +36 -0
  1561. package/semgrep-rules/javascript/lang/security/audit/unsafe-dynamic-method.js +51 -0
  1562. package/semgrep-rules/javascript/lang/security/audit/unsafe-dynamic-method.yaml +54 -0
  1563. package/semgrep-rules/javascript/lang/security/audit/unsafe-formatstring.js +46 -0
  1564. package/semgrep-rules/javascript/lang/security/audit/unsafe-formatstring.yaml +50 -0
  1565. package/semgrep-rules/javascript/lang/security/detect-buffer-noassert.js +11 -0
  1566. package/semgrep-rules/javascript/lang/security/detect-buffer-noassert.yaml +32 -0
  1567. package/semgrep-rules/javascript/lang/security/detect-child-process.js +40 -0
  1568. package/semgrep-rules/javascript/lang/security/detect-child-process.ts +40 -0
  1569. package/semgrep-rules/javascript/lang/security/detect-child-process.yaml +78 -0
  1570. package/semgrep-rules/javascript/lang/security/detect-disable-mustache-escape.js +5 -0
  1571. package/semgrep-rules/javascript/lang/security/detect-disable-mustache-escape.yaml +26 -0
  1572. package/semgrep-rules/javascript/lang/security/detect-eval-with-expression.js +13 -0
  1573. package/semgrep-rules/javascript/lang/security/detect-eval-with-expression.yaml +87 -0
  1574. package/semgrep-rules/javascript/lang/security/detect-insecure-websocket.js +26 -0
  1575. package/semgrep-rules/javascript/lang/security/detect-insecure-websocket.yaml +31 -0
  1576. package/semgrep-rules/javascript/lang/security/detect-no-csrf-before-method-override.js +11 -0
  1577. package/semgrep-rules/javascript/lang/security/detect-no-csrf-before-method-override.yaml +34 -0
  1578. package/semgrep-rules/javascript/lang/security/detect-pseudoRandomBytes.js +5 -0
  1579. package/semgrep-rules/javascript/lang/security/detect-pseudoRandomBytes.yaml +31 -0
  1580. package/semgrep-rules/javascript/lang/security/html-in-template-string.js +25 -0
  1581. package/semgrep-rules/javascript/lang/security/html-in-template-string.yaml +35 -0
  1582. package/semgrep-rules/javascript/lang/security/insecure-object-assign.js +27 -0
  1583. package/semgrep-rules/javascript/lang/security/insecure-object-assign.yaml +32 -0
  1584. package/semgrep-rules/javascript/lang/security/spawn-git-clone.js +55 -0
  1585. package/semgrep-rules/javascript/lang/security/spawn-git-clone.yaml +39 -0
  1586. package/semgrep-rules/javascript/monaco-editor/security/audit/monaco-hover-htmlsupport.js +51 -0
  1587. package/semgrep-rules/javascript/monaco-editor/security/audit/monaco-hover-htmlsupport.yaml +46 -0
  1588. package/semgrep-rules/javascript/node-crypto/security/aead-no-final.js +114 -0
  1589. package/semgrep-rules/javascript/node-crypto/security/aead-no-final.yaml +37 -0
  1590. package/semgrep-rules/javascript/node-crypto/security/create-de-cipher-no-iv.js +53 -0
  1591. package/semgrep-rules/javascript/node-crypto/security/create-de-cipher-no-iv.yaml +31 -0
  1592. package/semgrep-rules/javascript/node-crypto/security/gcm-no-tag-length.js +84 -0
  1593. package/semgrep-rules/javascript/node-crypto/security/gcm-no-tag-length.yaml +33 -0
  1594. package/semgrep-rules/javascript/node-expat/security/audit/expat-xxe.js +35 -0
  1595. package/semgrep-rules/javascript/node-expat/security/audit/expat-xxe.yaml +85 -0
  1596. package/semgrep-rules/javascript/passport-jwt/security/passport-hardcode.js +103 -0
  1597. package/semgrep-rules/javascript/passport-jwt/security/passport-hardcode.yaml +106 -0
  1598. package/semgrep-rules/javascript/phantom/security/audit/phantom-injection.js +66 -0
  1599. package/semgrep-rules/javascript/phantom/security/audit/phantom-injection.yaml +41 -0
  1600. package/semgrep-rules/javascript/playwright/security/audit/playwright-addinitscript-code-injection.js +17 -0
  1601. package/semgrep-rules/javascript/playwright/security/audit/playwright-addinitscript-code-injection.yaml +36 -0
  1602. package/semgrep-rules/javascript/playwright/security/audit/playwright-evaluate-arg-injection.js +16 -0
  1603. package/semgrep-rules/javascript/playwright/security/audit/playwright-evaluate-arg-injection.yaml +36 -0
  1604. package/semgrep-rules/javascript/playwright/security/audit/playwright-evaluate-code-injection.js +16 -0
  1605. package/semgrep-rules/javascript/playwright/security/audit/playwright-evaluate-code-injection.yaml +43 -0
  1606. package/semgrep-rules/javascript/playwright/security/audit/playwright-exposed-chrome-devtools.js +26 -0
  1607. package/semgrep-rules/javascript/playwright/security/audit/playwright-exposed-chrome-devtools.yaml +34 -0
  1608. package/semgrep-rules/javascript/playwright/security/audit/playwright-goto-injection.js +22 -0
  1609. package/semgrep-rules/javascript/playwright/security/audit/playwright-goto-injection.yaml +37 -0
  1610. package/semgrep-rules/javascript/playwright/security/audit/playwright-setcontent-injection.js +15 -0
  1611. package/semgrep-rules/javascript/playwright/security/audit/playwright-setcontent-injection.yaml +38 -0
  1612. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-evaluate-arg-injection.js +16 -0
  1613. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-evaluate-arg-injection.yaml +37 -0
  1614. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-evaluate-code-injection.js +16 -0
  1615. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-evaluate-code-injection.yaml +43 -0
  1616. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-exposed-chrome-devtools.js +26 -0
  1617. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-exposed-chrome-devtools.yaml +34 -0
  1618. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-goto-injection.js +22 -0
  1619. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-goto-injection.yaml +37 -0
  1620. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-setcontent-injection.js +15 -0
  1621. package/semgrep-rules/javascript/puppeteer/security/audit/puppeteer-setcontent-injection.yaml +37 -0
  1622. package/semgrep-rules/javascript/react/correctness/hooks/set-state-no-op.jsx +40 -0
  1623. package/semgrep-rules/javascript/react/correctness/hooks/set-state-no-op.yaml +16 -0
  1624. package/semgrep-rules/javascript/sandbox/security/audit/sandbox-code-injection.js +39 -0
  1625. package/semgrep-rules/javascript/sandbox/security/audit/sandbox-code-injection.yaml +45 -0
  1626. package/semgrep-rules/javascript/sax/security/audit/sax-xxe.js +49 -0
  1627. package/semgrep-rules/javascript/sax/security/audit/sax-xxe.yaml +40 -0
  1628. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-enforce-tls.js +70 -0
  1629. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-enforce-tls.yaml +59 -0
  1630. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-injection-express.ts +38 -0
  1631. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-injection-express.yaml +81 -0
  1632. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-raw-query.js +24 -0
  1633. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-raw-query.yaml +54 -0
  1634. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-tls-disabled-cert-validation.js +65 -0
  1635. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-tls-disabled-cert-validation.yaml +51 -0
  1636. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-weak-tls-version.js +75 -0
  1637. package/semgrep-rules/javascript/sequelize/security/audit/sequelize-weak-tls-version.yaml +55 -0
  1638. package/semgrep-rules/javascript/serialize-javascript/security/audit/unsafe-serialize-javascript.js +31 -0
  1639. package/semgrep-rules/javascript/serialize-javascript/security/audit/unsafe-serialize-javascript.yaml +31 -0
  1640. package/semgrep-rules/javascript/shelljs/security/shelljs-exec-injection.js +23 -0
  1641. package/semgrep-rules/javascript/shelljs/security/shelljs-exec-injection.yaml +37 -0
  1642. package/semgrep-rules/javascript/thenify/security/audit/multiargs-code-execution.js +33 -0
  1643. package/semgrep-rules/javascript/thenify/security/audit/multiargs-code-execution.yaml +45 -0
  1644. package/semgrep-rules/javascript/vm2/security/audit/vm2-code-injection.js +94 -0
  1645. package/semgrep-rules/javascript/vm2/security/audit/vm2-code-injection.yaml +65 -0
  1646. package/semgrep-rules/javascript/vm2/security/audit/vm2-context-injection.js +54 -0
  1647. package/semgrep-rules/javascript/vm2/security/audit/vm2-context-injection.yaml +349 -0
  1648. package/semgrep-rules/javascript/vue/security/audit/xss/templates/avoid-v-html.vue +6 -0
  1649. package/semgrep-rules/javascript/vue/security/audit/xss/templates/avoid-v-html.yaml +30 -0
  1650. package/semgrep-rules/javascript/wkhtmltoimage/security/audit/wkhtmltoimage-injection.js +13 -0
  1651. package/semgrep-rules/javascript/wkhtmltoimage/security/audit/wkhtmltoimage-injection.yaml +35 -0
  1652. package/semgrep-rules/javascript/wkhtmltopdf/security/audit/wkhtmltopdf-injection.js +18 -0
  1653. package/semgrep-rules/javascript/wkhtmltopdf/security/audit/wkhtmltopdf-injection.yaml +34 -0
  1654. package/semgrep-rules/javascript/xml2json/security/audit/xml2json-xxe.js +21 -0
  1655. package/semgrep-rules/javascript/xml2json/security/audit/xml2json-xxe.yaml +47 -0
  1656. package/semgrep-rules/json/aws/security/public-s3-bucket.json +52 -0
  1657. package/semgrep-rules/json/aws/security/public-s3-bucket.yaml +60 -0
  1658. package/semgrep-rules/json/aws/security/public-s3-policy-statement.json +31 -0
  1659. package/semgrep-rules/json/aws/security/public-s3-policy-statement.yaml +33 -0
  1660. package/semgrep-rules/json/aws/security/wildcard-assume-role.json +37 -0
  1661. package/semgrep-rules/json/aws/security/wildcard-assume-role.yaml +31 -0
  1662. package/semgrep-rules/json/npm/security/package-dependencies-check.package.json +41 -0
  1663. package/semgrep-rules/json/npm/security/package-dependencies-check.yml +53 -0
  1664. package/semgrep-rules/kotlin/gradle/security/build-gradle-password-hardcoded.build.gradle.kts +206 -0
  1665. package/semgrep-rules/kotlin/gradle/security/build-gradle-password-hardcoded.yaml +49 -0
  1666. package/semgrep-rules/kotlin/lang/security/anonymous-ldap-bind.kt +13 -0
  1667. package/semgrep-rules/kotlin/lang/security/anonymous-ldap-bind.yaml +33 -0
  1668. package/semgrep-rules/kotlin/lang/security/bad-hexa-conversion.kt +39 -0
  1669. package/semgrep-rules/kotlin/lang/security/bad-hexa-conversion.yaml +32 -0
  1670. package/semgrep-rules/kotlin/lang/security/command-injection-formatted-runtime-call.kt +19 -0
  1671. package/semgrep-rules/kotlin/lang/security/command-injection-formatted-runtime-call.yaml +36 -0
  1672. package/semgrep-rules/kotlin/lang/security/cookie-missing-httponly.kt +30 -0
  1673. package/semgrep-rules/kotlin/lang/security/cookie-missing-httponly.yaml +35 -0
  1674. package/semgrep-rules/kotlin/lang/security/cookie-missing-secure-flag.kt +100 -0
  1675. package/semgrep-rules/kotlin/lang/security/cookie-missing-secure-flag.yaml +35 -0
  1676. package/semgrep-rules/kotlin/lang/security/defaulthttpclient-is-deprecated.kt +31 -0
  1677. package/semgrep-rules/kotlin/lang/security/defaulthttpclient-is-deprecated.yaml +34 -0
  1678. package/semgrep-rules/kotlin/lang/security/ecb-cipher.kt +23 -0
  1679. package/semgrep-rules/kotlin/lang/security/ecb-cipher.yaml +38 -0
  1680. package/semgrep-rules/kotlin/lang/security/gcm-detection.kt +74 -0
  1681. package/semgrep-rules/kotlin/lang/security/gcm-detection.yaml +33 -0
  1682. package/semgrep-rules/kotlin/lang/security/no-null-cipher.kt +18 -0
  1683. package/semgrep-rules/kotlin/lang/security/no-null-cipher.yaml +32 -0
  1684. package/semgrep-rules/kotlin/lang/security/unencrypted-socket.kt +74 -0
  1685. package/semgrep-rules/kotlin/lang/security/unencrypted-socket.yaml +32 -0
  1686. package/semgrep-rules/kotlin/lang/security/use-of-md5.kt +28 -0
  1687. package/semgrep-rules/kotlin/lang/security/use-of-md5.yaml +29 -0
  1688. package/semgrep-rules/kotlin/lang/security/use-of-sha1.kt +24 -0
  1689. package/semgrep-rules/kotlin/lang/security/use-of-sha1.yaml +39 -0
  1690. package/semgrep-rules/kotlin/lang/security/weak-rsa.kt +16 -0
  1691. package/semgrep-rules/kotlin/lang/security/weak-rsa.yaml +36 -0
  1692. package/semgrep-rules/libsonnet/metadata/cwe.libsonnet +4905 -0
  1693. package/semgrep-rules/metadata-schema.yaml.schm +93 -0
  1694. package/semgrep-rules/ocaml/lang/best-practice/bool.ml +14 -0
  1695. package/semgrep-rules/ocaml/lang/best-practice/bool.yaml +25 -0
  1696. package/semgrep-rules/ocaml/lang/best-practice/exception.ml +29 -0
  1697. package/semgrep-rules/ocaml/lang/best-practice/exception.yaml +33 -0
  1698. package/semgrep-rules/ocaml/lang/best-practice/hashtbl.ml +20 -0
  1699. package/semgrep-rules/ocaml/lang/best-practice/hashtbl.yaml +22 -0
  1700. package/semgrep-rules/ocaml/lang/best-practice/ifs.ml +11 -0
  1701. package/semgrep-rules/ocaml/lang/best-practice/ifs.yaml +19 -0
  1702. package/semgrep-rules/ocaml/lang/best-practice/list.ml +13 -0
  1703. package/semgrep-rules/ocaml/lang/best-practice/list.yaml +14 -0
  1704. package/semgrep-rules/ocaml/lang/best-practice/ref.ml +6 -0
  1705. package/semgrep-rules/ocaml/lang/best-practice/ref.yaml +25 -0
  1706. package/semgrep-rules/ocaml/lang/best-practice/string.ml +20 -0
  1707. package/semgrep-rules/ocaml/lang/best-practice/string.yaml +39 -0
  1708. package/semgrep-rules/ocaml/lang/compatibility/deprecated.ml +4 -0
  1709. package/semgrep-rules/ocaml/lang/compatibility/deprecated.yaml +10 -0
  1710. package/semgrep-rules/ocaml/lang/correctness/physical-vs-structural.ml +11 -0
  1711. package/semgrep-rules/ocaml/lang/correctness/physical-vs-structural.yaml +23 -0
  1712. package/semgrep-rules/ocaml/lang/correctness/useless-compare.ml +14 -0
  1713. package/semgrep-rules/ocaml/lang/correctness/useless-compare.yaml +17 -0
  1714. package/semgrep-rules/ocaml/lang/correctness/useless-eq.ml +5 -0
  1715. package/semgrep-rules/ocaml/lang/correctness/useless-eq.yaml +10 -0
  1716. package/semgrep-rules/ocaml/lang/correctness/useless-if.ml +5 -0
  1717. package/semgrep-rules/ocaml/lang/correctness/useless-if.yaml +10 -0
  1718. package/semgrep-rules/ocaml/lang/correctness/useless-let.ml +4 -0
  1719. package/semgrep-rules/ocaml/lang/correctness/useless-let.yaml +10 -0
  1720. package/semgrep-rules/ocaml/lang/performance/list.ml +11 -0
  1721. package/semgrep-rules/ocaml/lang/performance/list.yaml +19 -0
  1722. package/semgrep-rules/ocaml/lang/portability/crlf-support.ml +34 -0
  1723. package/semgrep-rules/ocaml/lang/portability/crlf-support.yaml +49 -0
  1724. package/semgrep-rules/ocaml/lang/portability/slash-tmp.ml +4 -0
  1725. package/semgrep-rules/ocaml/lang/portability/slash-tmp.yaml +11 -0
  1726. package/semgrep-rules/ocaml/lang/security/digest.ml +3 -0
  1727. package/semgrep-rules/ocaml/lang/security/digest.yaml +25 -0
  1728. package/semgrep-rules/ocaml/lang/security/exec.ml +12 -0
  1729. package/semgrep-rules/ocaml/lang/security/exec.yaml +29 -0
  1730. package/semgrep-rules/ocaml/lang/security/filenameconcat.ml +3 -0
  1731. package/semgrep-rules/ocaml/lang/security/filenameconcat.yaml +18 -0
  1732. package/semgrep-rules/ocaml/lang/security/hashtable-dos.ml +8 -0
  1733. package/semgrep-rules/ocaml/lang/security/hashtable-dos.yaml +20 -0
  1734. package/semgrep-rules/ocaml/lang/security/marshal.ml +3 -0
  1735. package/semgrep-rules/ocaml/lang/security/marshal.yaml +22 -0
  1736. package/semgrep-rules/ocaml/lang/security/tempfile.ml +3 -0
  1737. package/semgrep-rules/ocaml/lang/security/tempfile.yaml +18 -0
  1738. package/semgrep-rules/ocaml/lang/security/unsafe.ml +3 -0
  1739. package/semgrep-rules/ocaml/lang/security/unsafe.yaml +49 -0
  1740. package/semgrep-rules/php/doctrine/security/audit/doctrine-dbal-dangerous-query.php +49 -0
  1741. package/semgrep-rules/php/doctrine/security/audit/doctrine-dbal-dangerous-query.yaml +42 -0
  1742. package/semgrep-rules/php/doctrine/security/audit/doctrine-orm-dangerous-query.php +40 -0
  1743. package/semgrep-rules/php/doctrine/security/audit/doctrine-orm-dangerous-query.yaml +70 -0
  1744. package/semgrep-rules/php/lang/correctness/empty-with-boolean-expression.php +15 -0
  1745. package/semgrep-rules/php/lang/correctness/empty-with-boolean-expression.yaml +16 -0
  1746. package/semgrep-rules/php/lang/security/assert-use.php +23 -0
  1747. package/semgrep-rules/php/lang/security/assert-use.yaml +41 -0
  1748. package/semgrep-rules/php/lang/security/audit/assert-use-audit.php +43 -0
  1749. package/semgrep-rules/php/lang/security/audit/assert-use-audit.yaml +29 -0
  1750. package/semgrep-rules/php/lang/security/audit/openssl-decrypt-validate.php +70 -0
  1751. package/semgrep-rules/php/lang/security/audit/openssl-decrypt-validate.yaml +74 -0
  1752. package/semgrep-rules/php/lang/security/audit/sha224-hash.php +22 -0
  1753. package/semgrep-rules/php/lang/security/audit/sha224-hash.yaml +32 -0
  1754. package/semgrep-rules/php/lang/security/backticks-use.php +4 -0
  1755. package/semgrep-rules/php/lang/security/backticks-use.yaml +24 -0
  1756. package/semgrep-rules/php/lang/security/base-convert-loses-precision.php +80 -0
  1757. package/semgrep-rules/php/lang/security/base-convert-loses-precision.yaml +50 -0
  1758. package/semgrep-rules/php/lang/security/curl-ssl-verifypeer-off.php +12 -0
  1759. package/semgrep-rules/php/lang/security/curl-ssl-verifypeer-off.yaml +33 -0
  1760. package/semgrep-rules/php/lang/security/deserialization.php +26 -0
  1761. package/semgrep-rules/php/lang/security/deserialization.yaml +35 -0
  1762. package/semgrep-rules/php/lang/security/eval-use.php +7 -0
  1763. package/semgrep-rules/php/lang/security/eval-use.yaml +28 -0
  1764. package/semgrep-rules/php/lang/security/exec-use.php +25 -0
  1765. package/semgrep-rules/php/lang/security/exec-use.yaml +28 -0
  1766. package/semgrep-rules/php/lang/security/file-inclusion.php +46 -0
  1767. package/semgrep-rules/php/lang/security/file-inclusion.yaml +51 -0
  1768. package/semgrep-rules/php/lang/security/ftp-use.php +10 -0
  1769. package/semgrep-rules/php/lang/security/ftp-use.yaml +28 -0
  1770. package/semgrep-rules/php/lang/security/injection/echoed-request.php +113 -0
  1771. package/semgrep-rules/php/lang/security/injection/echoed-request.yaml +62 -0
  1772. package/semgrep-rules/php/lang/security/injection/printed-request.php +112 -0
  1773. package/semgrep-rules/php/lang/security/injection/printed-request.yaml +62 -0
  1774. package/semgrep-rules/php/lang/security/injection/tainted-callable.php +12 -0
  1775. package/semgrep-rules/php/lang/security/injection/tainted-callable.yaml +115 -0
  1776. package/semgrep-rules/php/lang/security/injection/tainted-exec.php +21 -0
  1777. package/semgrep-rules/php/lang/security/injection/tainted-exec.yaml +51 -0
  1778. package/semgrep-rules/php/lang/security/injection/tainted-filename.php +20 -0
  1779. package/semgrep-rules/php/lang/security/injection/tainted-filename.yaml +175 -0
  1780. package/semgrep-rules/php/lang/security/injection/tainted-object-instantiation.php +14 -0
  1781. package/semgrep-rules/php/lang/security/injection/tainted-object-instantiation.yaml +36 -0
  1782. package/semgrep-rules/php/lang/security/injection/tainted-session.php +27 -0
  1783. package/semgrep-rules/php/lang/security/injection/tainted-session.yaml +75 -0
  1784. package/semgrep-rules/php/lang/security/injection/tainted-sql-string.php +85 -0
  1785. package/semgrep-rules/php/lang/security/injection/tainted-sql-string.yaml +61 -0
  1786. package/semgrep-rules/php/lang/security/injection/tainted-url-host.php +73 -0
  1787. package/semgrep-rules/php/lang/security/injection/tainted-url-host.yaml +64 -0
  1788. package/semgrep-rules/php/lang/security/ldap-bind-without-password.php +36 -0
  1789. package/semgrep-rules/php/lang/security/ldap-bind-without-password.yaml +33 -0
  1790. package/semgrep-rules/php/lang/security/mb-ereg-replace-eval.php +10 -0
  1791. package/semgrep-rules/php/lang/security/mb-ereg-replace-eval.yaml +28 -0
  1792. package/semgrep-rules/php/lang/security/mcrypt-use.php +16 -0
  1793. package/semgrep-rules/php/lang/security/mcrypt-use.yaml +26 -0
  1794. package/semgrep-rules/php/lang/security/md5-loose-equality.php +25 -0
  1795. package/semgrep-rules/php/lang/security/md5-loose-equality.yaml +48 -0
  1796. package/semgrep-rules/php/lang/security/md5-used-as-password.php +19 -0
  1797. package/semgrep-rules/php/lang/security/md5-used-as-password.yaml +41 -0
  1798. package/semgrep-rules/php/lang/security/openssl-cbc-static-iv.php +62 -0
  1799. package/semgrep-rules/php/lang/security/openssl-cbc-static-iv.yaml +30 -0
  1800. package/semgrep-rules/php/lang/security/php-permissive-cors.php +17 -0
  1801. package/semgrep-rules/php/lang/security/php-permissive-cors.yaml +32 -0
  1802. package/semgrep-rules/php/lang/security/php-ssrf.php +60 -0
  1803. package/semgrep-rules/php/lang/security/php-ssrf.yaml +49 -0
  1804. package/semgrep-rules/php/lang/security/phpinfo-use.php +4 -0
  1805. package/semgrep-rules/php/lang/security/phpinfo-use.yaml +24 -0
  1806. package/semgrep-rules/php/lang/security/redirect-to-request-uri.php +34 -0
  1807. package/semgrep-rules/php/lang/security/redirect-to-request-uri.yaml +35 -0
  1808. package/semgrep-rules/php/lang/security/tainted-exec.php +38 -0
  1809. package/semgrep-rules/php/lang/security/tainted-exec.yaml +41 -0
  1810. package/semgrep-rules/php/lang/security/unlink-use.php +8 -0
  1811. package/semgrep-rules/php/lang/security/unlink-use.yaml +30 -0
  1812. package/semgrep-rules/php/lang/security/unserialize-use.php +8 -0
  1813. package/semgrep-rules/php/lang/security/unserialize-use.yaml +30 -0
  1814. package/semgrep-rules/php/lang/security/weak-crypto.php +31 -0
  1815. package/semgrep-rules/php/lang/security/weak-crypto.yaml +33 -0
  1816. package/semgrep-rules/php/laravel/security/laravel-active-debug-code.php +23 -0
  1817. package/semgrep-rules/php/laravel/security/laravel-active-debug-code.yaml +35 -0
  1818. package/semgrep-rules/php/laravel/security/laravel-api-route-sql-injection.php +26 -0
  1819. package/semgrep-rules/php/laravel/security/laravel-api-route-sql-injection.yaml +40 -0
  1820. package/semgrep-rules/php/laravel/security/laravel-blade-form-missing-csrf.blade.php +189 -0
  1821. package/semgrep-rules/php/laravel/security/laravel-blade-form-missing-csrf.yaml +67 -0
  1822. package/semgrep-rules/php/laravel/security/laravel-cookie-http-only.session.php +788 -0
  1823. package/semgrep-rules/php/laravel/security/laravel-cookie-http-only.yaml +50 -0
  1824. package/semgrep-rules/php/laravel/security/laravel-cookie-long-timeout.session.php +591 -0
  1825. package/semgrep-rules/php/laravel/security/laravel-cookie-long-timeout.yaml +44 -0
  1826. package/semgrep-rules/php/laravel/security/laravel-cookie-null-domain.session.php +787 -0
  1827. package/semgrep-rules/php/laravel/security/laravel-cookie-null-domain.yaml +50 -0
  1828. package/semgrep-rules/php/laravel/security/laravel-cookie-same-site.session.php +982 -0
  1829. package/semgrep-rules/php/laravel/security/laravel-cookie-same-site.yaml +55 -0
  1830. package/semgrep-rules/php/laravel/security/laravel-cookie-secure-set.session.php +788 -0
  1831. package/semgrep-rules/php/laravel/security/laravel-cookie-secure-set.yaml +50 -0
  1832. package/semgrep-rules/php/laravel/security/laravel-dangerous-model-construction.php +23 -0
  1833. package/semgrep-rules/php/laravel/security/laravel-dangerous-model-construction.yaml +32 -0
  1834. package/semgrep-rules/php/laravel/security/laravel-sql-injection.php +37 -0
  1835. package/semgrep-rules/php/laravel/security/laravel-sql-injection.yaml +131 -0
  1836. package/semgrep-rules/php/laravel/security/laravel-unsafe-validator.php +171 -0
  1837. package/semgrep-rules/php/laravel/security/laravel-unsafe-validator.yaml +64 -0
  1838. package/semgrep-rules/php/symfony/security/audit/symfony-csrf-protection-disabled.php +110 -0
  1839. package/semgrep-rules/php/symfony/security/audit/symfony-csrf-protection-disabled.yaml +39 -0
  1840. package/semgrep-rules/php/symfony/security/audit/symfony-non-literal-redirect.php +39 -0
  1841. package/semgrep-rules/php/symfony/security/audit/symfony-non-literal-redirect.yaml +29 -0
  1842. package/semgrep-rules/php/symfony/security/audit/symfony-permissive-cors.php +46 -0
  1843. package/semgrep-rules/php/symfony/security/audit/symfony-permissive-cors.yaml +45 -0
  1844. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-ajax-no-auth-and-auth-hooks-audit.php +14 -0
  1845. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-ajax-no-auth-and-auth-hooks-audit.yaml +33 -0
  1846. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-authorisation-checks-audit.php +20 -0
  1847. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-authorisation-checks-audit.yaml +31 -0
  1848. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-code-execution-audit.php +13 -0
  1849. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-code-execution-audit.yaml +32 -0
  1850. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-command-execution-audit.php +14 -0
  1851. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-command-execution-audit.yaml +33 -0
  1852. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-csrf-audit.php +13 -0
  1853. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-csrf-audit.yaml +28 -0
  1854. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-file-download-audit.php +16 -0
  1855. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-file-download-audit.yaml +32 -0
  1856. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-file-inclusion-audit.php +25 -0
  1857. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-file-inclusion-audit.yaml +37 -0
  1858. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-file-manipulation-audit.php +13 -0
  1859. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-file-manipulation-audit.yaml +33 -0
  1860. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-open-redirect-audit.php +14 -0
  1861. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-open-redirect-audit.yaml +29 -0
  1862. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-php-object-injection-audit.php +18 -0
  1863. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-php-object-injection-audit.yaml +32 -0
  1864. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-sql-injection-audit.php +14 -0
  1865. package/semgrep-rules/php/wordpress-plugins/security/audit/wp-sql-injection-audit.yaml +42 -0
  1866. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/bypass-tls-verification.go +124 -0
  1867. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/bypass-tls-verification.yaml +28 -0
  1868. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/disallow-old-tls-versions.go +127 -0
  1869. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/disallow-old-tls-versions.yaml +32 -0
  1870. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/ftp-request.go +68 -0
  1871. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/ftp-request.yaml +47 -0
  1872. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/gorequest-http-request.go +44 -0
  1873. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/gorequest-http-request.yaml +37 -0
  1874. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/grequests-http-request.go +41 -0
  1875. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/grequests-http-request.yaml +31 -0
  1876. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/http-customized-request.go +9 -0
  1877. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/http-customized-request.yaml +31 -0
  1878. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/http-request.go +54 -0
  1879. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/http-request.yaml +45 -0
  1880. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/sling-http-request.go +72 -0
  1881. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/sling-http-request.yaml +60 -0
  1882. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/telnet-request.go +15 -0
  1883. package/semgrep-rules/problem-based-packs/insecure-transport/go-stdlib/telnet-request.yaml +24 -0
  1884. package/semgrep-rules/problem-based-packs/insecure-transport/java-spring/bypass-tls-verification.java +50 -0
  1885. package/semgrep-rules/problem-based-packs/insecure-transport/java-spring/bypass-tls-verification.yaml +47 -0
  1886. package/semgrep-rules/problem-based-packs/insecure-transport/java-spring/spring-ftp-request.java +81 -0
  1887. package/semgrep-rules/problem-based-packs/insecure-transport/java-spring/spring-ftp-request.yaml +42 -0
  1888. package/semgrep-rules/problem-based-packs/insecure-transport/java-spring/spring-http-request.java +143 -0
  1889. package/semgrep-rules/problem-based-packs/insecure-transport/java-spring/spring-http-request.yaml +50 -0
  1890. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/bypass-tls-verification.java +54 -0
  1891. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/bypass-tls-verification.yaml +51 -0
  1892. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/disallow-old-tls-versions1.java +69 -0
  1893. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/disallow-old-tls-versions1.yaml +49 -0
  1894. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/disallow-old-tls-versions2.java +21 -0
  1895. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/disallow-old-tls-versions2.yaml +33 -0
  1896. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/ftp-request.java +27 -0
  1897. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/ftp-request.yaml +36 -0
  1898. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/http-components-request.java +43 -0
  1899. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/http-components-request.yaml +39 -0
  1900. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/httpclient-http-request.java +185 -0
  1901. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/httpclient-http-request.yaml +69 -0
  1902. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/httpget-http-request.java +37 -0
  1903. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/httpget-http-request.yaml +36 -0
  1904. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/httpurlconnection-http-request.java +75 -0
  1905. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/httpurlconnection-http-request.yaml +45 -0
  1906. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/socket-request.java +165 -0
  1907. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/socket-request.yaml +41 -0
  1908. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/telnet-request.java +14 -0
  1909. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/telnet-request.yaml +26 -0
  1910. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/tls-renegotiation.java +13 -0
  1911. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/tls-renegotiation.yaml +26 -0
  1912. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/unirest-http-request.java +39 -0
  1913. package/semgrep-rules/problem-based-packs/insecure-transport/java-stdlib/unirest-http-request.yaml +33 -0
  1914. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/bypass-tls-verification.js +73 -0
  1915. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/bypass-tls-verification.yaml +33 -0
  1916. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/disallow-old-tls-versions1.js +63 -0
  1917. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/disallow-old-tls-versions1.yaml +51 -0
  1918. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/disallow-old-tls-versions2.js +87 -0
  1919. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/disallow-old-tls-versions2.yaml +65 -0
  1920. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/ftp-request.js +55 -0
  1921. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/ftp-request.yaml +39 -0
  1922. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/http-request.js +78 -0
  1923. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/http-request.yaml +48 -0
  1924. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/rest-http-client-support.js +181 -0
  1925. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/rest-http-client-support.yaml +45 -0
  1926. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/telnet-request.js +107 -0
  1927. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/telnet-request.yaml +41 -0
  1928. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/using-http-server.js +31 -0
  1929. package/semgrep-rules/problem-based-packs/insecure-transport/js-node/using-http-server.yaml +38 -0
  1930. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/http-client-requests.rb +58 -0
  1931. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/http-client-requests.yaml +35 -0
  1932. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/net-ftp-request.rb +19 -0
  1933. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/net-ftp-request.yaml +32 -0
  1934. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/net-http-request.rb +81 -0
  1935. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/net-http-request.yaml +38 -0
  1936. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/net-telnet-request.rb +38 -0
  1937. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/net-telnet-request.yaml +30 -0
  1938. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/openuri-request.rb +71 -0
  1939. package/semgrep-rules/problem-based-packs/insecure-transport/ruby-stdlib/openuri-request.yaml +34 -0
  1940. package/semgrep-rules/python/airflow/security/audit/formatted-string-bashoperator.py +98 -0
  1941. package/semgrep-rules/python/airflow/security/audit/formatted-string-bashoperator.yaml +58 -0
  1942. package/semgrep-rules/python/attr/correctness/mutable-initializer.py +62 -0
  1943. package/semgrep-rules/python/attr/correctness/mutable-initializer.yaml +36 -0
  1944. package/semgrep-rules/python/aws-lambda/security/dangerous-asyncio-create-exec.py +32 -0
  1945. package/semgrep-rules/python/aws-lambda/security/dangerous-asyncio-create-exec.yaml +58 -0
  1946. package/semgrep-rules/python/aws-lambda/security/dangerous-asyncio-exec.py +43 -0
  1947. package/semgrep-rules/python/aws-lambda/security/dangerous-asyncio-exec.yaml +53 -0
  1948. package/semgrep-rules/python/aws-lambda/security/dangerous-asyncio-shell.py +42 -0
  1949. package/semgrep-rules/python/aws-lambda/security/dangerous-asyncio-shell.yaml +50 -0
  1950. package/semgrep-rules/python/aws-lambda/security/dangerous-spawn-process.py +37 -0
  1951. package/semgrep-rules/python/aws-lambda/security/dangerous-spawn-process.yaml +66 -0
  1952. package/semgrep-rules/python/aws-lambda/security/dangerous-subprocess-use.py +48 -0
  1953. package/semgrep-rules/python/aws-lambda/security/dangerous-subprocess-use.yaml +51 -0
  1954. package/semgrep-rules/python/aws-lambda/security/dangerous-system-call.py +11 -0
  1955. package/semgrep-rules/python/aws-lambda/security/dangerous-system-call.yaml +51 -0
  1956. package/semgrep-rules/python/aws-lambda/security/dynamodb-filter-injection.py +31 -0
  1957. package/semgrep-rules/python/aws-lambda/security/dynamodb-filter-injection.yaml +56 -0
  1958. package/semgrep-rules/python/aws-lambda/security/mysql-sqli.py +27 -0
  1959. package/semgrep-rules/python/aws-lambda/security/mysql-sqli.yaml +52 -0
  1960. package/semgrep-rules/python/aws-lambda/security/psycopg-sqli.py +50 -0
  1961. package/semgrep-rules/python/aws-lambda/security/psycopg-sqli.yaml +51 -0
  1962. package/semgrep-rules/python/aws-lambda/security/pymssql-sqli.py +34 -0
  1963. package/semgrep-rules/python/aws-lambda/security/pymssql-sqli.yaml +45 -0
  1964. package/semgrep-rules/python/aws-lambda/security/pymysql-sqli.py +79 -0
  1965. package/semgrep-rules/python/aws-lambda/security/pymysql-sqli.yaml +49 -0
  1966. package/semgrep-rules/python/aws-lambda/security/sqlalchemy-sqli.py +65 -0
  1967. package/semgrep-rules/python/aws-lambda/security/sqlalchemy-sqli.yaml +45 -0
  1968. package/semgrep-rules/python/aws-lambda/security/tainted-code-exec.py +22 -0
  1969. package/semgrep-rules/python/aws-lambda/security/tainted-code-exec.yaml +42 -0
  1970. package/semgrep-rules/python/aws-lambda/security/tainted-html-response.py +18 -0
  1971. package/semgrep-rules/python/aws-lambda/security/tainted-html-response.yaml +40 -0
  1972. package/semgrep-rules/python/aws-lambda/security/tainted-html-string.py +30 -0
  1973. package/semgrep-rules/python/aws-lambda/security/tainted-html-string.yaml +61 -0
  1974. package/semgrep-rules/python/aws-lambda/security/tainted-pickle-deserialization.py +31 -0
  1975. package/semgrep-rules/python/aws-lambda/security/tainted-pickle-deserialization.yaml +50 -0
  1976. package/semgrep-rules/python/aws-lambda/security/tainted-sql-string.py +38 -0
  1977. package/semgrep-rules/python/aws-lambda/security/tainted-sql-string.yaml +53 -0
  1978. package/semgrep-rules/python/bokeh/maintainability/deprecated/deprecated_apis.py +8 -0
  1979. package/semgrep-rules/python/bokeh/maintainability/deprecated/deprecated_apis.yaml +15 -0
  1980. package/semgrep-rules/python/boto3/security/hardcoded-token.py +86 -0
  1981. package/semgrep-rules/python/boto3/security/hardcoded-token.yaml +52 -0
  1982. package/semgrep-rules/python/click/best-practice/echo-style.py +12 -0
  1983. package/semgrep-rules/python/click/best-practice/echo-style.yaml +10 -0
  1984. package/semgrep-rules/python/correctness/check-is-none-explicitly.py +19 -0
  1985. package/semgrep-rules/python/correctness/check-is-none-explicitly.yaml +19 -0
  1986. package/semgrep-rules/python/correctness/socket-shutdown-close.py +107 -0
  1987. package/semgrep-rules/python/correctness/socket-shutdown-close.yaml +32 -0
  1988. package/semgrep-rules/python/correctness/suppressed-exception-handling-finally-break.py +74 -0
  1989. package/semgrep-rules/python/correctness/suppressed-exception-handling-finally-break.yaml +46 -0
  1990. package/semgrep-rules/python/cryptography/security/empty-aes-key.py +11 -0
  1991. package/semgrep-rules/python/cryptography/security/empty-aes-key.yaml +32 -0
  1992. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms-arc4.fixed.py +17 -0
  1993. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms-arc4.py +17 -0
  1994. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms-arc4.yaml +40 -0
  1995. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms-blowfish.fixed.py +18 -0
  1996. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms-blowfish.py +18 -0
  1997. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms-blowfish.yaml +39 -0
  1998. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms.fixed.py +17 -0
  1999. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms.py +17 -0
  2000. package/semgrep-rules/python/cryptography/security/insecure-cipher-algorithms.yaml +41 -0
  2001. package/semgrep-rules/python/cryptography/security/insecure-cipher-mode-ecb.fixed.py +17 -0
  2002. package/semgrep-rules/python/cryptography/security/insecure-cipher-mode-ecb.py +17 -0
  2003. package/semgrep-rules/python/cryptography/security/insecure-cipher-mode-ecb.yaml +33 -0
  2004. package/semgrep-rules/python/cryptography/security/insecure-hash-algorithms-md5.fixed.py +10 -0
  2005. package/semgrep-rules/python/cryptography/security/insecure-hash-algorithms-md5.py +10 -0
  2006. package/semgrep-rules/python/cryptography/security/insecure-hash-algorithms-md5.yaml +40 -0
  2007. package/semgrep-rules/python/cryptography/security/insecure-hash-algorithms.fixed.py +10 -0
  2008. package/semgrep-rules/python/cryptography/security/insecure-hash-algorithms.py +10 -0
  2009. package/semgrep-rules/python/cryptography/security/insecure-hash-algorithms.yaml +42 -0
  2010. package/semgrep-rules/python/cryptography/security/insufficient-dsa-key-size.fixed.py +18 -0
  2011. package/semgrep-rules/python/cryptography/security/insufficient-dsa-key-size.py +18 -0
  2012. package/semgrep-rules/python/cryptography/security/insufficient-dsa-key-size.yaml +39 -0
  2013. package/semgrep-rules/python/cryptography/security/insufficient-ec-key-size.fixed.py +23 -0
  2014. package/semgrep-rules/python/cryptography/security/insufficient-ec-key-size.py +23 -0
  2015. package/semgrep-rules/python/cryptography/security/insufficient-ec-key-size.yaml +39 -0
  2016. package/semgrep-rules/python/cryptography/security/insufficient-rsa-key-size.fixed.py +33 -0
  2017. package/semgrep-rules/python/cryptography/security/insufficient-rsa-key-size.py +33 -0
  2018. package/semgrep-rules/python/cryptography/security/insufficient-rsa-key-size.yaml +38 -0
  2019. package/semgrep-rules/python/cryptography/security/mode-without-authentication.py +29 -0
  2020. package/semgrep-rules/python/cryptography/security/mode-without-authentication.yaml +46 -0
  2021. package/semgrep-rules/python/distributed/security.fixed.py +100 -0
  2022. package/semgrep-rules/python/distributed/security.py +100 -0
  2023. package/semgrep-rules/python/distributed/security.yaml +34 -0
  2024. package/semgrep-rules/python/django/best-practice/json_response.py +12 -0
  2025. package/semgrep-rules/python/django/best-practice/json_response.yaml +17 -0
  2026. package/semgrep-rules/python/django/best-practice/upsell_django_environ.py +24 -0
  2027. package/semgrep-rules/python/django/best-practice/upsell_django_environ.yaml +26 -0
  2028. package/semgrep-rules/python/django/best-practice/use-onetoonefield.py +31 -0
  2029. package/semgrep-rules/python/django/best-practice/use-onetoonefield.yaml +16 -0
  2030. package/semgrep-rules/python/django/compatibility/django-2_0-compat.py +56 -0
  2031. package/semgrep-rules/python/django/compatibility/django-2_0-compat.yaml +58 -0
  2032. package/semgrep-rules/python/django/correctness/model-save.py +36 -0
  2033. package/semgrep-rules/python/django/correctness/model-save.yaml +24 -0
  2034. package/semgrep-rules/python/django/correctness/nontext-field-must-set-null-true.py +57 -0
  2035. package/semgrep-rules/python/django/correctness/nontext-field-must-set-null-true.yaml +31 -0
  2036. package/semgrep-rules/python/django/correctness/string-field-null-checks-import.py +38 -0
  2037. package/semgrep-rules/python/django/correctness/string-field-null-checks.py +38 -0
  2038. package/semgrep-rules/python/django/correctness/string-field-null-checks.yaml +41 -0
  2039. package/semgrep-rules/python/django/correctness/use-decimalfield-for-money.py +34 -0
  2040. package/semgrep-rules/python/django/correctness/use-decimalfield-for-money.yaml +17 -0
  2041. package/semgrep-rules/python/django/maintainability/duplicate-path-assignment.py +140 -0
  2042. package/semgrep-rules/python/django/maintainability/duplicate-path-assignment.yaml +71 -0
  2043. package/semgrep-rules/python/django/performance/access-foreign-keys.py +19 -0
  2044. package/semgrep-rules/python/django/performance/access-foreign-keys.yaml +22 -0
  2045. package/semgrep-rules/python/django/performance/upsell-count.py +6 -0
  2046. package/semgrep-rules/python/django/performance/upsell-count.yaml +15 -0
  2047. package/semgrep-rules/python/django/performance/upsell_earliest_latest.py +18 -0
  2048. package/semgrep-rules/python/django/performance/upsell_earliest_latest.yaml +15 -0
  2049. package/semgrep-rules/python/django/security/audit/avoid-insecure-deserialization.py +82 -0
  2050. package/semgrep-rules/python/django/security/audit/avoid-insecure-deserialization.yaml +65 -0
  2051. package/semgrep-rules/python/django/security/audit/avoid-mark-safe.py +41 -0
  2052. package/semgrep-rules/python/django/security/audit/avoid-mark-safe.yaml +33 -0
  2053. package/semgrep-rules/python/django/security/audit/csrf-exempt.py +14 -0
  2054. package/semgrep-rules/python/django/security/audit/csrf-exempt.yaml +28 -0
  2055. package/semgrep-rules/python/django/security/audit/custom-expression-as-sql.py +64 -0
  2056. package/semgrep-rules/python/django/security/audit/custom-expression-as-sql.yaml +28 -0
  2057. package/semgrep-rules/python/django/security/audit/django-rest-framework/missing-throttle-config.py +18 -0
  2058. package/semgrep-rules/python/django/security/audit/django-rest-framework/missing-throttle-config.yaml +36 -0
  2059. package/semgrep-rules/python/django/security/audit/extends-custom-expression.py +135 -0
  2060. package/semgrep-rules/python/django/security/audit/extends-custom-expression.yaml +144 -0
  2061. package/semgrep-rules/python/django/security/audit/query-set-extra.py +47 -0
  2062. package/semgrep-rules/python/django/security/audit/query-set-extra.yaml +33 -0
  2063. package/semgrep-rules/python/django/security/audit/raw-query.py +15 -0
  2064. package/semgrep-rules/python/django/security/audit/raw-query.yaml +34 -0
  2065. package/semgrep-rules/python/django/security/audit/secure-cookies.py +57 -0
  2066. package/semgrep-rules/python/django/security/audit/secure-cookies.yaml +58 -0
  2067. package/semgrep-rules/python/django/security/audit/templates/debug-template-tag.html +10 -0
  2068. package/semgrep-rules/python/django/security/audit/templates/debug-template-tag.yaml +30 -0
  2069. package/semgrep-rules/python/django/security/audit/unvalidated-password.fixed.py +65 -0
  2070. package/semgrep-rules/python/django/security/audit/unvalidated-password.py +64 -0
  2071. package/semgrep-rules/python/django/security/audit/unvalidated-password.yaml +53 -0
  2072. package/semgrep-rules/python/django/security/audit/xss/class-extends-safestring.py +21 -0
  2073. package/semgrep-rules/python/django/security/audit/xss/class-extends-safestring.yaml +40 -0
  2074. package/semgrep-rules/python/django/security/audit/xss/context-autoescape-off.fixed.py +36 -0
  2075. package/semgrep-rules/python/django/security/audit/xss/context-autoescape-off.py +36 -0
  2076. package/semgrep-rules/python/django/security/audit/xss/context-autoescape-off.yaml +42 -0
  2077. package/semgrep-rules/python/django/security/audit/xss/direct-use-of-httpresponse.py +59 -0
  2078. package/semgrep-rules/python/django/security/audit/xss/direct-use-of-httpresponse.yaml +58 -0
  2079. package/semgrep-rules/python/django/security/audit/xss/filter-with-is-safe.py +263 -0
  2080. package/semgrep-rules/python/django/security/audit/xss/filter-with-is-safe.yaml +37 -0
  2081. package/semgrep-rules/python/django/security/audit/xss/formathtml-fstring-parameter.py +40 -0
  2082. package/semgrep-rules/python/django/security/audit/xss/formathtml-fstring-parameter.yaml +34 -0
  2083. package/semgrep-rules/python/django/security/audit/xss/global-autoescape-off.fixed.py +160 -0
  2084. package/semgrep-rules/python/django/security/audit/xss/global-autoescape-off.py +160 -0
  2085. package/semgrep-rules/python/django/security/audit/xss/global-autoescape-off.yaml +39 -0
  2086. package/semgrep-rules/python/django/security/audit/xss/html-magic-method.py +19 -0
  2087. package/semgrep-rules/python/django/security/audit/xss/html-magic-method.yaml +38 -0
  2088. package/semgrep-rules/python/django/security/audit/xss/html-safe.py +20 -0
  2089. package/semgrep-rules/python/django/security/audit/xss/html-safe.yaml +38 -0
  2090. package/semgrep-rules/python/django/security/audit/xss/template-autoescape-off.html +17 -0
  2091. package/semgrep-rules/python/django/security/audit/xss/template-autoescape-off.yaml +32 -0
  2092. package/semgrep-rules/python/django/security/audit/xss/template-blocktranslate-no-escape.html +18 -0
  2093. package/semgrep-rules/python/django/security/audit/xss/template-blocktranslate-no-escape.yaml +46 -0
  2094. package/semgrep-rules/python/django/security/audit/xss/template-translate-as-no-escape.html +21 -0
  2095. package/semgrep-rules/python/django/security/audit/xss/template-translate-as-no-escape.yaml +129 -0
  2096. package/semgrep-rules/python/django/security/audit/xss/template-var-unescaped-with-safeseq.html +22 -0
  2097. package/semgrep-rules/python/django/security/audit/xss/template-var-unescaped-with-safeseq.yaml +33 -0
  2098. package/semgrep-rules/python/django/security/django-no-csrf-token.html +99 -0
  2099. package/semgrep-rules/python/django/security/django-no-csrf-token.yaml +34 -0
  2100. package/semgrep-rules/python/django/security/django-using-request-post-after-is-valid.py +36 -0
  2101. package/semgrep-rules/python/django/security/django-using-request-post-after-is-valid.yaml +27 -0
  2102. package/semgrep-rules/python/django/security/globals-as-template-context.py +43 -0
  2103. package/semgrep-rules/python/django/security/globals-as-template-context.yaml +39 -0
  2104. package/semgrep-rules/python/django/security/hashids-with-django-secret.py +63 -0
  2105. package/semgrep-rules/python/django/security/hashids-with-django-secret.yaml +28 -0
  2106. package/semgrep-rules/python/django/security/injection/README.md +11 -0
  2107. package/semgrep-rules/python/django/security/injection/code/globals-misuse-code-execution.py +13 -0
  2108. package/semgrep-rules/python/django/security/injection/code/globals-misuse-code-execution.yaml +220 -0
  2109. package/semgrep-rules/python/django/security/injection/code/user-eval-format-string.py +74 -0
  2110. package/semgrep-rules/python/django/security/injection/code/user-eval-format-string.yaml +124 -0
  2111. package/semgrep-rules/python/django/security/injection/code/user-eval.py +22 -0
  2112. package/semgrep-rules/python/django/security/injection/code/user-eval.yaml +45 -0
  2113. package/semgrep-rules/python/django/security/injection/code/user-exec-format-string.py +74 -0
  2114. package/semgrep-rules/python/django/security/injection/code/user-exec-format-string.yaml +214 -0
  2115. package/semgrep-rules/python/django/security/injection/code/user-exec.py +45 -0
  2116. package/semgrep-rules/python/django/security/injection/code/user-exec.yaml +64 -0
  2117. package/semgrep-rules/python/django/security/injection/command/command-injection-os-system.py +21 -0
  2118. package/semgrep-rules/python/django/security/injection/command/command-injection-os-system.yaml +278 -0
  2119. package/semgrep-rules/python/django/security/injection/command/subprocess-injection.py +83 -0
  2120. package/semgrep-rules/python/django/security/injection/command/subprocess-injection.yaml +69 -0
  2121. package/semgrep-rules/python/django/security/injection/csv-writer-injection.py +27 -0
  2122. package/semgrep-rules/python/django/security/injection/csv-writer-injection.yaml +54 -0
  2123. package/semgrep-rules/python/django/security/injection/email/xss-html-email-body.py +79 -0
  2124. package/semgrep-rules/python/django/security/injection/email/xss-html-email-body.yaml +202 -0
  2125. package/semgrep-rules/python/django/security/injection/email/xss-send-mail-html-message.py +54 -0
  2126. package/semgrep-rules/python/django/security/injection/email/xss-send-mail-html-message.yaml +240 -0
  2127. package/semgrep-rules/python/django/security/injection/mass-assignment.py +24 -0
  2128. package/semgrep-rules/python/django/security/injection/mass-assignment.yaml +31 -0
  2129. package/semgrep-rules/python/django/security/injection/open-redirect.py +70 -0
  2130. package/semgrep-rules/python/django/security/injection/open-redirect.yaml +549 -0
  2131. package/semgrep-rules/python/django/security/injection/path-traversal/path-traversal-file-name.py +62 -0
  2132. package/semgrep-rules/python/django/security/injection/path-traversal/path-traversal-file-name.yaml +78 -0
  2133. package/semgrep-rules/python/django/security/injection/path-traversal/path-traversal-join.py +28 -0
  2134. package/semgrep-rules/python/django/security/injection/path-traversal/path-traversal-join.yaml +101 -0
  2135. package/semgrep-rules/python/django/security/injection/path-traversal/path-traversal-open.py +84 -0
  2136. package/semgrep-rules/python/django/security/injection/path-traversal/path-traversal-open.yaml +440 -0
  2137. package/semgrep-rules/python/django/security/injection/raw-html-format.py +122 -0
  2138. package/semgrep-rules/python/django/security/injection/raw-html-format.yaml +57 -0
  2139. package/semgrep-rules/python/django/security/injection/reflected-data-httpresponse.py +40 -0
  2140. package/semgrep-rules/python/django/security/injection/reflected-data-httpresponse.yaml +260 -0
  2141. package/semgrep-rules/python/django/security/injection/reflected-data-httpresponsebadrequest.py +38 -0
  2142. package/semgrep-rules/python/django/security/injection/reflected-data-httpresponsebadrequest.yaml +254 -0
  2143. package/semgrep-rules/python/django/security/injection/request-data-fileresponse.py +14 -0
  2144. package/semgrep-rules/python/django/security/injection/request-data-fileresponse.yaml +83 -0
  2145. package/semgrep-rules/python/django/security/injection/request-data-write.py +25 -0
  2146. package/semgrep-rules/python/django/security/injection/request-data-write.yaml +198 -0
  2147. package/semgrep-rules/python/django/security/injection/sql/sql-injection-extra.py +44 -0
  2148. package/semgrep-rules/python/django/security/injection/sql/sql-injection-extra.yaml +294 -0
  2149. package/semgrep-rules/python/django/security/injection/sql/sql-injection-rawsql.py +46 -0
  2150. package/semgrep-rules/python/django/security/injection/sql/sql-injection-rawsql.yaml +294 -0
  2151. package/semgrep-rules/python/django/security/injection/sql/sql-injection-using-db-cursor-execute.py +69 -0
  2152. package/semgrep-rules/python/django/security/injection/sql/sql-injection-using-db-cursor-execute.yaml +295 -0
  2153. package/semgrep-rules/python/django/security/injection/sql/sql-injection-using-raw.py +57 -0
  2154. package/semgrep-rules/python/django/security/injection/sql/sql-injection-using-raw.yaml +295 -0
  2155. package/semgrep-rules/python/django/security/injection/ssrf/ssrf-injection-requests.py +59 -0
  2156. package/semgrep-rules/python/django/security/injection/ssrf/ssrf-injection-requests.yaml +258 -0
  2157. package/semgrep-rules/python/django/security/injection/ssrf/ssrf-injection-urllib.py +19 -0
  2158. package/semgrep-rules/python/django/security/injection/ssrf/ssrf-injection-urllib.yaml +256 -0
  2159. package/semgrep-rules/python/django/security/injection/tainted-sql-string.py +134 -0
  2160. package/semgrep-rules/python/django/security/injection/tainted-sql-string.yaml +46 -0
  2161. package/semgrep-rules/python/django/security/injection/tainted-url-host.py +83 -0
  2162. package/semgrep-rules/python/django/security/injection/tainted-url-host.yaml +69 -0
  2163. package/semgrep-rules/python/django/security/locals-as-template-context.py +43 -0
  2164. package/semgrep-rules/python/django/security/locals-as-template-context.yaml +39 -0
  2165. package/semgrep-rules/python/django/security/nan-injection.py +76 -0
  2166. package/semgrep-rules/python/django/security/nan-injection.yaml +45 -0
  2167. package/semgrep-rules/python/django/security/passwords/password-empty-string.py +36 -0
  2168. package/semgrep-rules/python/django/security/passwords/password-empty-string.yaml +38 -0
  2169. package/semgrep-rules/python/django/security/passwords/use-none-for-password-default.fixed.py +85 -0
  2170. package/semgrep-rules/python/django/security/passwords/use-none-for-password-default.py +85 -0
  2171. package/semgrep-rules/python/django/security/passwords/use-none-for-password-default.yaml +41 -0
  2172. package/semgrep-rules/python/django/sensitive-variables.py +7 -0
  2173. package/semgrep-rules/python/docker/security/audit/docker-arbitrary-container-run.py +18 -0
  2174. package/semgrep-rules/python/docker/security/audit/docker-arbitrary-container-run.yaml +38 -0
  2175. package/semgrep-rules/python/fastapi/security/wildcard-cors.py +46 -0
  2176. package/semgrep-rules/python/fastapi/security/wildcard-cors.yaml +37 -0
  2177. package/semgrep-rules/python/flask/best-practice/get-class-method-with-side-effects.py +23 -0
  2178. package/semgrep-rules/python/flask/best-practice/get-class-method-with-side-effects.yaml +23 -0
  2179. package/semgrep-rules/python/flask/best-practice/use-jsonify.fixed.py +25 -0
  2180. package/semgrep-rules/python/flask/best-practice/use-jsonify.py +25 -0
  2181. package/semgrep-rules/python/flask/best-practice/use-jsonify.yaml +32 -0
  2182. package/semgrep-rules/python/flask/caching/query-string.py +74 -0
  2183. package/semgrep-rules/python/flask/caching/query-string.yaml +45 -0
  2184. package/semgrep-rules/python/flask/correctness/access-request-in-wrong-handler.py +22 -0
  2185. package/semgrep-rules/python/flask/correctness/access-request-in-wrong-handler.yaml +21 -0
  2186. package/semgrep-rules/python/flask/correctness/same-handler-name.py +17 -0
  2187. package/semgrep-rules/python/flask/correctness/same-handler-name.yaml +19 -0
  2188. package/semgrep-rules/python/flask/maintainability/deprecated/deprecated-apis.py +47 -0
  2189. package/semgrep-rules/python/flask/maintainability/deprecated/deprecated-apis.yaml +44 -0
  2190. package/semgrep-rules/python/flask/security/audit/app-run-param-config.py +8 -0
  2191. package/semgrep-rules/python/flask/security/audit/app-run-param-config.yaml +23 -0
  2192. package/semgrep-rules/python/flask/security/audit/app-run-security-config.py +15 -0
  2193. package/semgrep-rules/python/flask/security/audit/app-run-security-config.yaml +29 -0
  2194. package/semgrep-rules/python/flask/security/audit/debug-enabled.py +19 -0
  2195. package/semgrep-rules/python/flask/security/audit/debug-enabled.yaml +28 -0
  2196. package/semgrep-rules/python/flask/security/audit/directly-returned-format-string.py +125 -0
  2197. package/semgrep-rules/python/flask/security/audit/directly-returned-format-string.yaml +72 -0
  2198. package/semgrep-rules/python/flask/security/audit/flask-cors-misconfiguration.py +39 -0
  2199. package/semgrep-rules/python/flask/security/audit/flask-cors-misconfiguration.yaml +38 -0
  2200. package/semgrep-rules/python/flask/security/audit/hardcoded-config.py +43 -0
  2201. package/semgrep-rules/python/flask/security/audit/hardcoded-config.yaml +101 -0
  2202. package/semgrep-rules/python/flask/security/audit/host-header-injection-python.py +24 -0
  2203. package/semgrep-rules/python/flask/security/audit/host-header-injection-python.yaml +45 -0
  2204. package/semgrep-rules/python/flask/security/audit/render-template-string.py +21 -0
  2205. package/semgrep-rules/python/flask/security/audit/render-template-string.yaml +22 -0
  2206. package/semgrep-rules/python/flask/security/audit/secure-set-cookie.py +89 -0
  2207. package/semgrep-rules/python/flask/security/audit/secure-set-cookie.yaml +42 -0
  2208. package/semgrep-rules/python/flask/security/audit/wtf-csrf-disabled.fixed.py +75 -0
  2209. package/semgrep-rules/python/flask/security/audit/wtf-csrf-disabled.py +75 -0
  2210. package/semgrep-rules/python/flask/security/audit/wtf-csrf-disabled.yaml +74 -0
  2211. package/semgrep-rules/python/flask/security/audit/xss/make-response-with-unknown-content.py +84 -0
  2212. package/semgrep-rules/python/flask/security/audit/xss/make-response-with-unknown-content.yaml +53 -0
  2213. package/semgrep-rules/python/flask/security/dangerous-template-string.py +60 -0
  2214. package/semgrep-rules/python/flask/security/dangerous-template-string.yaml +61 -0
  2215. package/semgrep-rules/python/flask/security/flask-api-method-string-format.py +22 -0
  2216. package/semgrep-rules/python/flask/security/flask-api-method-string-format.yaml +36 -0
  2217. package/semgrep-rules/python/flask/security/hashids-with-flask-secret.py +20 -0
  2218. package/semgrep-rules/python/flask/security/hashids-with-flask-secret.yaml +35 -0
  2219. package/semgrep-rules/python/flask/security/injection/csv-writer-injection.py +29 -0
  2220. package/semgrep-rules/python/flask/security/injection/csv-writer-injection.yaml +72 -0
  2221. package/semgrep-rules/python/flask/security/injection/nan-injection.py +95 -0
  2222. package/semgrep-rules/python/flask/security/injection/nan-injection.yaml +42 -0
  2223. package/semgrep-rules/python/flask/security/injection/os-system-injection.py +130 -0
  2224. package/semgrep-rules/python/flask/security/injection/os-system-injection.yaml +71 -0
  2225. package/semgrep-rules/python/flask/security/injection/path-traversal-open.py +102 -0
  2226. package/semgrep-rules/python/flask/security/injection/path-traversal-open.yaml +105 -0
  2227. package/semgrep-rules/python/flask/security/injection/raw-html-concat.py +92 -0
  2228. package/semgrep-rules/python/flask/security/injection/raw-html-concat.yaml +71 -0
  2229. package/semgrep-rules/python/flask/security/injection/ssrf-requests.py +92 -0
  2230. package/semgrep-rules/python/flask/security/injection/ssrf-requests.yaml +75 -0
  2231. package/semgrep-rules/python/flask/security/injection/subprocess-injection.py +94 -0
  2232. package/semgrep-rules/python/flask/security/injection/subprocess-injection.yaml +86 -0
  2233. package/semgrep-rules/python/flask/security/injection/tainted-sql-string.py +102 -0
  2234. package/semgrep-rules/python/flask/security/injection/tainted-sql-string.yaml +56 -0
  2235. package/semgrep-rules/python/flask/security/injection/tainted-url-host.py +160 -0
  2236. package/semgrep-rules/python/flask/security/injection/tainted-url-host.yaml +77 -0
  2237. package/semgrep-rules/python/flask/security/injection/user-eval.py +68 -0
  2238. package/semgrep-rules/python/flask/security/injection/user-eval.yaml +65 -0
  2239. package/semgrep-rules/python/flask/security/injection/user-exec.py +68 -0
  2240. package/semgrep-rules/python/flask/security/injection/user-exec.yaml +65 -0
  2241. package/semgrep-rules/python/flask/security/insecure-deserialization.py +39 -0
  2242. package/semgrep-rules/python/flask/security/insecure-deserialization.yaml +42 -0
  2243. package/semgrep-rules/python/flask/security/open-redirect.py +71 -0
  2244. package/semgrep-rules/python/flask/security/open-redirect.yaml +63 -0
  2245. package/semgrep-rules/python/flask/security/secure-static-file-serve.py +12 -0
  2246. package/semgrep-rules/python/flask/security/secure-static-file-serve.yaml +28 -0
  2247. package/semgrep-rules/python/flask/security/unescaped-template-extension.py +114 -0
  2248. package/semgrep-rules/python/flask/security/unescaped-template-extension.yaml +54 -0
  2249. package/semgrep-rules/python/flask/security/unsanitized-input.py +26 -0
  2250. package/semgrep-rules/python/flask/security/unsanitized-input.yaml +46 -0
  2251. package/semgrep-rules/python/flask/security/xss/audit/direct-use-of-jinja2.py +24 -0
  2252. package/semgrep-rules/python/flask/security/xss/audit/direct-use-of-jinja2.yaml +42 -0
  2253. package/semgrep-rules/python/flask/security/xss/audit/explicit-unescape-with-markup.py +42 -0
  2254. package/semgrep-rules/python/flask/security/xss/audit/explicit-unescape-with-markup.yaml +39 -0
  2255. package/semgrep-rules/python/flask/security/xss/audit/template-autoescape-off.html +32 -0
  2256. package/semgrep-rules/python/flask/security/xss/audit/template-autoescape-off.yaml +33 -0
  2257. package/semgrep-rules/python/flask/security/xss/audit/template-unescaped-with-safe.html +39 -0
  2258. package/semgrep-rules/python/flask/security/xss/audit/template-unescaped-with-safe.yaml +32 -0
  2259. package/semgrep-rules/python/flask/security/xss/audit/template-unquoted-attribute-var.fixed.html +14 -0
  2260. package/semgrep-rules/python/flask/security/xss/audit/template-unquoted-attribute-var.fixed.py +32 -0
  2261. package/semgrep-rules/python/flask/security/xss/audit/template-unquoted-attribute-var.html +14 -0
  2262. package/semgrep-rules/python/flask/security/xss/audit/template-unquoted-attribute-var.py +32 -0
  2263. package/semgrep-rules/python/flask/security/xss/audit/template-unquoted-attribute-var.yaml +53 -0
  2264. package/semgrep-rules/python/jinja2/security/audit/autoescape-disabled-false.fixed.py +41 -0
  2265. package/semgrep-rules/python/jinja2/security/audit/autoescape-disabled-false.py +41 -0
  2266. package/semgrep-rules/python/jinja2/security/audit/autoescape-disabled-false.yaml +33 -0
  2267. package/semgrep-rules/python/jinja2/security/audit/missing-autoescape-disabled.fixed.py +46 -0
  2268. package/semgrep-rules/python/jinja2/security/audit/missing-autoescape-disabled.py +46 -0
  2269. package/semgrep-rules/python/jinja2/security/audit/missing-autoescape-disabled.yaml +32 -0
  2270. package/semgrep-rules/python/jwt/security/audit/jwt-exposed-data.py +11 -0
  2271. package/semgrep-rules/python/jwt/security/audit/jwt-exposed-data.yaml +31 -0
  2272. package/semgrep-rules/python/jwt/security/jwt-exposed-credentials.py +24 -0
  2273. package/semgrep-rules/python/jwt/security/jwt-exposed-credentials.yaml +33 -0
  2274. package/semgrep-rules/python/jwt/security/jwt-hardcode.py +32 -0
  2275. package/semgrep-rules/python/jwt/security/jwt-hardcode.yaml +32 -0
  2276. package/semgrep-rules/python/jwt/security/jwt-none-alg.py +16 -0
  2277. package/semgrep-rules/python/jwt/security/jwt-none-alg.yaml +32 -0
  2278. package/semgrep-rules/python/jwt/security/unverified-jwt-decode.fixed.py +33 -0
  2279. package/semgrep-rules/python/jwt/security/unverified-jwt-decode.py +33 -0
  2280. package/semgrep-rules/python/jwt/security/unverified-jwt-decode.yaml +49 -0
  2281. package/semgrep-rules/python/lang/best-practice/hardcoded-tmp-path.py +33 -0
  2282. package/semgrep-rules/python/lang/best-practice/hardcoded-tmp-path.yaml +14 -0
  2283. package/semgrep-rules/python/lang/best-practice/logging-error-without-handling.py +105 -0
  2284. package/semgrep-rules/python/lang/best-practice/logging-error-without-handling.yaml +33 -0
  2285. package/semgrep-rules/python/lang/best-practice/manual-collections-create.py +61 -0
  2286. package/semgrep-rules/python/lang/best-practice/manual-collections-create.yaml +94 -0
  2287. package/semgrep-rules/python/lang/best-practice/missing-hash-with-eq.py +14 -0
  2288. package/semgrep-rules/python/lang/best-practice/missing-hash-with-eq.yaml +23 -0
  2289. package/semgrep-rules/python/lang/best-practice/open-never-closed.py +18 -0
  2290. package/semgrep-rules/python/lang/best-practice/open-never-closed.yaml +95 -0
  2291. package/semgrep-rules/python/lang/best-practice/pass-body.py +27 -0
  2292. package/semgrep-rules/python/lang/best-practice/pass-body.yaml +30 -0
  2293. package/semgrep-rules/python/lang/best-practice/pdb.py +10 -0
  2294. package/semgrep-rules/python/lang/best-practice/pdb.yaml +13 -0
  2295. package/semgrep-rules/python/lang/best-practice/sleep.py +22 -0
  2296. package/semgrep-rules/python/lang/best-practice/sleep.yaml +16 -0
  2297. package/semgrep-rules/python/lang/best-practice/unspecified-open-encoding.py +77 -0
  2298. package/semgrep-rules/python/lang/best-practice/unspecified-open-encoding.yaml +36 -0
  2299. package/semgrep-rules/python/lang/compatibility/python36.py +11 -0
  2300. package/semgrep-rules/python/lang/compatibility/python36.yaml +28 -0
  2301. package/semgrep-rules/python/lang/compatibility/python37.py +60 -0
  2302. package/semgrep-rules/python/lang/compatibility/python37.yaml +192 -0
  2303. package/semgrep-rules/python/lang/correctness/baseclass-attribute-override.py +25 -0
  2304. package/semgrep-rules/python/lang/correctness/baseclass-attribute-override.yaml +34 -0
  2305. package/semgrep-rules/python/lang/correctness/cannot-cache-generators.py +36 -0
  2306. package/semgrep-rules/python/lang/correctness/cannot-cache-generators.yaml +17 -0
  2307. package/semgrep-rules/python/lang/correctness/common-mistakes/default-mutable-dict.py +394 -0
  2308. package/semgrep-rules/python/lang/correctness/common-mistakes/default-mutable-dict.yaml +64 -0
  2309. package/semgrep-rules/python/lang/correctness/common-mistakes/default-mutable-list.py +393 -0
  2310. package/semgrep-rules/python/lang/correctness/common-mistakes/default-mutable-list.yaml +66 -0
  2311. package/semgrep-rules/python/lang/correctness/common-mistakes/is-comparison-string.py +33 -0
  2312. package/semgrep-rules/python/lang/correctness/common-mistakes/is-comparison-string.yaml +32 -0
  2313. package/semgrep-rules/python/lang/correctness/common-mistakes/is-not-is-not.py +13 -0
  2314. package/semgrep-rules/python/lang/correctness/common-mistakes/is-not-is-not.yaml +12 -0
  2315. package/semgrep-rules/python/lang/correctness/common-mistakes/string-concat-in-list.py +71 -0
  2316. package/semgrep-rules/python/lang/correctness/common-mistakes/string-concat-in-list.yaml +20 -0
  2317. package/semgrep-rules/python/lang/correctness/concurrent.py +16 -0
  2318. package/semgrep-rules/python/lang/correctness/concurrent.yaml +33 -0
  2319. package/semgrep-rules/python/lang/correctness/dict-modify-iterating.py +19 -0
  2320. package/semgrep-rules/python/lang/correctness/dict-modify-iterating.yaml +22 -0
  2321. package/semgrep-rules/python/lang/correctness/exceptions/exceptions.py +24 -0
  2322. package/semgrep-rules/python/lang/correctness/exceptions/exceptions.yaml +21 -0
  2323. package/semgrep-rules/python/lang/correctness/exit.fixed.py +24 -0
  2324. package/semgrep-rules/python/lang/correctness/exit.py +24 -0
  2325. package/semgrep-rules/python/lang/correctness/exit.yaml +19 -0
  2326. package/semgrep-rules/python/lang/correctness/file-object-redefined-before-close.py +17 -0
  2327. package/semgrep-rules/python/lang/correctness/file-object-redefined-before-close.yaml +22 -0
  2328. package/semgrep-rules/python/lang/correctness/list-modify-iterating.py +37 -0
  2329. package/semgrep-rules/python/lang/correctness/list-modify-iterating.yaml +34 -0
  2330. package/semgrep-rules/python/lang/correctness/pdb.py +16 -0
  2331. package/semgrep-rules/python/lang/correctness/pdb.yaml +14 -0
  2332. package/semgrep-rules/python/lang/correctness/pytest-assert_match-after-path-patch.py +20 -0
  2333. package/semgrep-rules/python/lang/correctness/pytest-assert_match-after-path-patch.yaml +26 -0
  2334. package/semgrep-rules/python/lang/correctness/return-in-init.py +115 -0
  2335. package/semgrep-rules/python/lang/correctness/return-in-init.yaml +48 -0
  2336. package/semgrep-rules/python/lang/correctness/sync-sleep-in-async-code.py +28 -0
  2337. package/semgrep-rules/python/lang/correctness/sync-sleep-in-async-code.yaml +18 -0
  2338. package/semgrep-rules/python/lang/correctness/tempfile/flush.py +93 -0
  2339. package/semgrep-rules/python/lang/correctness/tempfile/flush.yaml +79 -0
  2340. package/semgrep-rules/python/lang/correctness/tempfile/mktemp.py +6 -0
  2341. package/semgrep-rules/python/lang/correctness/tempfile/mktemp.yaml +13 -0
  2342. package/semgrep-rules/python/lang/correctness/test-is-missing-assert.py +44 -0
  2343. package/semgrep-rules/python/lang/correctness/test-is-missing-assert.yaml +41 -0
  2344. package/semgrep-rules/python/lang/correctness/unchecked-returns.fixed.py +31 -0
  2345. package/semgrep-rules/python/lang/correctness/unchecked-returns.py +31 -0
  2346. package/semgrep-rules/python/lang/correctness/unchecked-returns.yaml +23 -0
  2347. package/semgrep-rules/python/lang/correctness/useless-comparison.py +25 -0
  2348. package/semgrep-rules/python/lang/correctness/useless-comparison.yaml +28 -0
  2349. package/semgrep-rules/python/lang/correctness/useless-eqeq.py +31 -0
  2350. package/semgrep-rules/python/lang/correctness/useless-eqeq.yaml +27 -0
  2351. package/semgrep-rules/python/lang/correctness/writing-to-file-in-read-mode.py +17 -0
  2352. package/semgrep-rules/python/lang/correctness/writing-to-file-in-read-mode.yaml +27 -0
  2353. package/semgrep-rules/python/lang/maintainability/improper-list-concat.py +10 -0
  2354. package/semgrep-rules/python/lang/maintainability/improper-list-concat.yaml +18 -0
  2355. package/semgrep-rules/python/lang/maintainability/is-function-without-parentheses.py +16 -0
  2356. package/semgrep-rules/python/lang/maintainability/is-function-without-parentheses.yaml +18 -0
  2357. package/semgrep-rules/python/lang/maintainability/return.py +36 -0
  2358. package/semgrep-rules/python/lang/maintainability/return.yaml +29 -0
  2359. package/semgrep-rules/python/lang/maintainability/useless-assign-keyed.py +23 -0
  2360. package/semgrep-rules/python/lang/maintainability/useless-assign-keyed.yaml +16 -0
  2361. package/semgrep-rules/python/lang/maintainability/useless-assign.notyaml +15 -0
  2362. package/semgrep-rules/python/lang/maintainability/useless-assign.py +32 -0
  2363. package/semgrep-rules/python/lang/maintainability/useless-ifelse.py +39 -0
  2364. package/semgrep-rules/python/lang/maintainability/useless-ifelse.yaml +31 -0
  2365. package/semgrep-rules/python/lang/maintainability/useless-innerfunction.py +69 -0
  2366. package/semgrep-rules/python/lang/maintainability/useless-innerfunction.yaml +36 -0
  2367. package/semgrep-rules/python/lang/maintainability/useless-literal-set.py +5 -0
  2368. package/semgrep-rules/python/lang/maintainability/useless-literal-set.yaml +15 -0
  2369. package/semgrep-rules/python/lang/maintainability/useless-literal.py +24 -0
  2370. package/semgrep-rules/python/lang/maintainability/useless-literal.yaml +18 -0
  2371. package/semgrep-rules/python/lang/security/audit/conn_recv.py +16 -0
  2372. package/semgrep-rules/python/lang/security/audit/conn_recv.yaml +34 -0
  2373. package/semgrep-rules/python/lang/security/audit/dangerous-annotations-usage.py +19 -0
  2374. package/semgrep-rules/python/lang/security/audit/dangerous-annotations-usage.yaml +33 -0
  2375. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-create-exec-audit.py +32 -0
  2376. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-create-exec-audit.yaml +61 -0
  2377. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-create-exec-tainted-env-args.py +42 -0
  2378. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-create-exec-tainted-env-args.yaml +109 -0
  2379. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-exec-audit.py +42 -0
  2380. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-exec-audit.yaml +47 -0
  2381. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-exec-tainted-env-args.py +55 -0
  2382. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-exec-tainted-env-args.yaml +94 -0
  2383. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-shell-audit.py +47 -0
  2384. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-shell-audit.yaml +47 -0
  2385. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-shell-tainted-env-args.py +74 -0
  2386. package/semgrep-rules/python/lang/security/audit/dangerous-asyncio-shell-tainted-env-args.yaml +95 -0
  2387. package/semgrep-rules/python/lang/security/audit/dangerous-code-run-audit.py +39 -0
  2388. package/semgrep-rules/python/lang/security/audit/dangerous-code-run-audit.yaml +54 -0
  2389. package/semgrep-rules/python/lang/security/audit/dangerous-code-run-tainted-env-args.py +55 -0
  2390. package/semgrep-rules/python/lang/security/audit/dangerous-code-run-tainted-env-args.yaml +104 -0
  2391. package/semgrep-rules/python/lang/security/audit/dangerous-os-exec-audit.py +18 -0
  2392. package/semgrep-rules/python/lang/security/audit/dangerous-os-exec-audit.yaml +56 -0
  2393. package/semgrep-rules/python/lang/security/audit/dangerous-os-exec-tainted-env-args.py +28 -0
  2394. package/semgrep-rules/python/lang/security/audit/dangerous-os-exec-tainted-env-args.yaml +108 -0
  2395. package/semgrep-rules/python/lang/security/audit/dangerous-spawn-process-audit.py +40 -0
  2396. package/semgrep-rules/python/lang/security/audit/dangerous-spawn-process-audit.yaml +57 -0
  2397. package/semgrep-rules/python/lang/security/audit/dangerous-spawn-process-tainted-env-args.py +72 -0
  2398. package/semgrep-rules/python/lang/security/audit/dangerous-spawn-process-tainted-env-args.yaml +111 -0
  2399. package/semgrep-rules/python/lang/security/audit/dangerous-subinterpreters-run-string-audit.py +9 -0
  2400. package/semgrep-rules/python/lang/security/audit/dangerous-subinterpreters-run-string-audit.yaml +31 -0
  2401. package/semgrep-rules/python/lang/security/audit/dangerous-subinterpreters-run-string-tainted-env-args.py +18 -0
  2402. package/semgrep-rules/python/lang/security/audit/dangerous-subinterpreters-run-string-tainted-env-args.yaml +80 -0
  2403. package/semgrep-rules/python/lang/security/audit/dangerous-subprocess-use-audit.py +63 -0
  2404. package/semgrep-rules/python/lang/security/audit/dangerous-subprocess-use-audit.yaml +74 -0
  2405. package/semgrep-rules/python/lang/security/audit/dangerous-subprocess-use-tainted-env-args.py +83 -0
  2406. package/semgrep-rules/python/lang/security/audit/dangerous-subprocess-use-tainted-env-args.yaml +114 -0
  2407. package/semgrep-rules/python/lang/security/audit/dangerous-system-call-audit.py +44 -0
  2408. package/semgrep-rules/python/lang/security/audit/dangerous-system-call-audit.yaml +62 -0
  2409. package/semgrep-rules/python/lang/security/audit/dangerous-system-call-tainted-env-args.py +156 -0
  2410. package/semgrep-rules/python/lang/security/audit/dangerous-system-call-tainted-env-args.yaml +109 -0
  2411. package/semgrep-rules/python/lang/security/audit/dangerous-testcapi-run-in-subinterp-audit.py +14 -0
  2412. package/semgrep-rules/python/lang/security/audit/dangerous-testcapi-run-in-subinterp-audit.yaml +35 -0
  2413. package/semgrep-rules/python/lang/security/audit/dangerous-testcapi-run-in-subinterp-tainted-env-args.py +30 -0
  2414. package/semgrep-rules/python/lang/security/audit/dangerous-testcapi-run-in-subinterp-tainted-env-args.yaml +84 -0
  2415. package/semgrep-rules/python/lang/security/audit/dynamic-urllib-use-detected.py +63 -0
  2416. package/semgrep-rules/python/lang/security/audit/dynamic-urllib-use-detected.yaml +57 -0
  2417. package/semgrep-rules/python/lang/security/audit/eval-detected.py +44 -0
  2418. package/semgrep-rules/python/lang/security/audit/eval-detected.yaml +34 -0
  2419. package/semgrep-rules/python/lang/security/audit/exec-detected.py +19 -0
  2420. package/semgrep-rules/python/lang/security/audit/exec-detected.yaml +33 -0
  2421. package/semgrep-rules/python/lang/security/audit/formatted-sql-query.py +55 -0
  2422. package/semgrep-rules/python/lang/security/audit/formatted-sql-query.yaml +41 -0
  2423. package/semgrep-rules/python/lang/security/audit/hardcoded-password-default-argument.py +24 -0
  2424. package/semgrep-rules/python/lang/security/audit/hardcoded-password-default-argument.yaml +32 -0
  2425. package/semgrep-rules/python/lang/security/audit/httpsconnection-detected.py +16 -0
  2426. package/semgrep-rules/python/lang/security/audit/httpsconnection-detected.yaml +32 -0
  2427. package/semgrep-rules/python/lang/security/audit/insecure-file-permissions.py +78 -0
  2428. package/semgrep-rules/python/lang/security/audit/insecure-file-permissions.yaml +62 -0
  2429. package/semgrep-rules/python/lang/security/audit/insecure-transport/ftplib/use-ftp-tls.py +10 -0
  2430. package/semgrep-rules/python/lang/security/audit/insecure-transport/ftplib/use-ftp-tls.yaml +39 -0
  2431. package/semgrep-rules/python/lang/security/audit/insecure-transport/requests/request-session-http-in-with-context.py +41 -0
  2432. package/semgrep-rules/python/lang/security/audit/insecure-transport/requests/request-session-http-in-with-context.yaml +57 -0
  2433. package/semgrep-rules/python/lang/security/audit/insecure-transport/requests/request-session-with-http.py +53 -0
  2434. package/semgrep-rules/python/lang/security/audit/insecure-transport/requests/request-session-with-http.yaml +55 -0
  2435. package/semgrep-rules/python/lang/security/audit/insecure-transport/requests/request-with-http.py +47 -0
  2436. package/semgrep-rules/python/lang/security/audit/insecure-transport/requests/request-with-http.yaml +56 -0
  2437. package/semgrep-rules/python/lang/security/audit/insecure-transport/ssl/no-set-ciphers.py +11 -0
  2438. package/semgrep-rules/python/lang/security/audit/insecure-transport/ssl/no-set-ciphers.yaml +31 -0
  2439. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-openerdirector-open-ftp.py +61 -0
  2440. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-openerdirector-open-ftp.yaml +55 -0
  2441. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-openerdirector-open.py +61 -0
  2442. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-openerdirector-open.yaml +57 -0
  2443. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-request-object-ftp.py +28 -0
  2444. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-request-object-ftp.yaml +35 -0
  2445. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-request-object.py +28 -0
  2446. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-request-object.yaml +38 -0
  2447. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopen-ftp.py +28 -0
  2448. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopen-ftp.yaml +34 -0
  2449. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopen.py +28 -0
  2450. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopen.yaml +36 -0
  2451. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopener-open-ftp.py +61 -0
  2452. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopener-open-ftp.yaml +54 -0
  2453. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopener-open.py +61 -0
  2454. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopener-open.yaml +57 -0
  2455. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopener-retrieve-ftp.py +61 -0
  2456. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopener-retrieve-ftp.yaml +54 -0
  2457. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopener-retrieve.py +61 -0
  2458. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlopener-retrieve.yaml +57 -0
  2459. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlretrieve-ftp.py +28 -0
  2460. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlretrieve-ftp.yaml +34 -0
  2461. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlretrieve.py +28 -0
  2462. package/semgrep-rules/python/lang/security/audit/insecure-transport/urllib/insecure-urlretrieve.yaml +36 -0
  2463. package/semgrep-rules/python/lang/security/audit/logging/listeneval.py +8 -0
  2464. package/semgrep-rules/python/lang/security/audit/logging/listeneval.yaml +30 -0
  2465. package/semgrep-rules/python/lang/security/audit/logging/logger-credential-leak.py +24 -0
  2466. package/semgrep-rules/python/lang/security/audit/logging/logger-credential-leak.yaml +36 -0
  2467. package/semgrep-rules/python/lang/security/audit/mako-templates-detected.py +15 -0
  2468. package/semgrep-rules/python/lang/security/audit/mako-templates-detected.yaml +31 -0
  2469. package/semgrep-rules/python/lang/security/audit/marshal.py +10 -0
  2470. package/semgrep-rules/python/lang/security/audit/marshal.yaml +33 -0
  2471. package/semgrep-rules/python/lang/security/audit/md5-used-as-password.py +45 -0
  2472. package/semgrep-rules/python/lang/security/audit/md5-used-as-password.yaml +47 -0
  2473. package/semgrep-rules/python/lang/security/audit/network/bind.py +21 -0
  2474. package/semgrep-rules/python/lang/security/audit/network/bind.yaml +38 -0
  2475. package/semgrep-rules/python/lang/security/audit/network/disabled-cert-validation.py +60 -0
  2476. package/semgrep-rules/python/lang/security/audit/network/disabled-cert-validation.yaml +34 -0
  2477. package/semgrep-rules/python/lang/security/audit/network/http-not-https-connection.py +7 -0
  2478. package/semgrep-rules/python/lang/security/audit/network/http-not-https-connection.yaml +27 -0
  2479. package/semgrep-rules/python/lang/security/audit/non-literal-import.py +29 -0
  2480. package/semgrep-rules/python/lang/security/audit/non-literal-import.yaml +29 -0
  2481. package/semgrep-rules/python/lang/security/audit/paramiko/paramiko-exec-command.py +23 -0
  2482. package/semgrep-rules/python/lang/security/audit/paramiko/paramiko-exec-command.yaml +35 -0
  2483. package/semgrep-rules/python/lang/security/audit/paramiko-implicit-trust-host-key.py +9 -0
  2484. package/semgrep-rules/python/lang/security/audit/paramiko-implicit-trust-host-key.yaml +33 -0
  2485. package/semgrep-rules/python/lang/security/audit/python-reverse-shell.py +8 -0
  2486. package/semgrep-rules/python/lang/security/audit/python-reverse-shell.yaml +32 -0
  2487. package/semgrep-rules/python/lang/security/audit/regex-dos.py +37 -0
  2488. package/semgrep-rules/python/lang/security/audit/regex-dos.yaml +34 -0
  2489. package/semgrep-rules/python/lang/security/audit/sha224-hash.py +10 -0
  2490. package/semgrep-rules/python/lang/security/audit/sha224-hash.yaml +29 -0
  2491. package/semgrep-rules/python/lang/security/audit/sqli/aiopg-sqli.py +177 -0
  2492. package/semgrep-rules/python/lang/security/audit/sqli/aiopg-sqli.yaml +102 -0
  2493. package/semgrep-rules/python/lang/security/audit/sqli/asyncpg-sqli.py +132 -0
  2494. package/semgrep-rules/python/lang/security/audit/sqli/asyncpg-sqli.yaml +95 -0
  2495. package/semgrep-rules/python/lang/security/audit/sqli/pg8000-sqli.py +119 -0
  2496. package/semgrep-rules/python/lang/security/audit/sqli/pg8000-sqli.yaml +89 -0
  2497. package/semgrep-rules/python/lang/security/audit/sqli/psycopg-sqli.py +144 -0
  2498. package/semgrep-rules/python/lang/security/audit/sqli/psycopg-sqli.yaml +85 -0
  2499. package/semgrep-rules/python/lang/security/audit/ssl-wrap-socket-is-deprecated.py +22 -0
  2500. package/semgrep-rules/python/lang/security/audit/ssl-wrap-socket-is-deprecated.yaml +26 -0
  2501. package/semgrep-rules/python/lang/security/audit/subprocess-shell-true.fixed.py +20 -0
  2502. package/semgrep-rules/python/lang/security/audit/subprocess-shell-true.py +20 -0
  2503. package/semgrep-rules/python/lang/security/audit/subprocess-shell-true.yaml +41 -0
  2504. package/semgrep-rules/python/lang/security/audit/system-wildcard-detected.py +27 -0
  2505. package/semgrep-rules/python/lang/security/audit/system-wildcard-detected.yaml +37 -0
  2506. package/semgrep-rules/python/lang/security/audit/telnetlib.py +22 -0
  2507. package/semgrep-rules/python/lang/security/audit/telnetlib.yaml +26 -0
  2508. package/semgrep-rules/python/lang/security/audit/weak-ssl-version.py +57 -0
  2509. package/semgrep-rules/python/lang/security/audit/weak-ssl-version.yaml +42 -0
  2510. package/semgrep-rules/python/lang/security/dangerous-code-run.py +26 -0
  2511. package/semgrep-rules/python/lang/security/dangerous-code-run.yaml +155 -0
  2512. package/semgrep-rules/python/lang/security/dangerous-globals-use.py +71 -0
  2513. package/semgrep-rules/python/lang/security/dangerous-globals-use.yaml +53 -0
  2514. package/semgrep-rules/python/lang/security/dangerous-os-exec.py +23 -0
  2515. package/semgrep-rules/python/lang/security/dangerous-os-exec.yaml +159 -0
  2516. package/semgrep-rules/python/lang/security/dangerous-spawn-process.py +72 -0
  2517. package/semgrep-rules/python/lang/security/dangerous-spawn-process.yaml +205 -0
  2518. package/semgrep-rules/python/lang/security/dangerous-subinterpreters-run-string.py +25 -0
  2519. package/semgrep-rules/python/lang/security/dangerous-subinterpreters-run-string.yaml +131 -0
  2520. package/semgrep-rules/python/lang/security/dangerous-subprocess-use.py +40 -0
  2521. package/semgrep-rules/python/lang/security/dangerous-subprocess-use.yaml +163 -0
  2522. package/semgrep-rules/python/lang/security/dangerous-system-call.py +202 -0
  2523. package/semgrep-rules/python/lang/security/dangerous-system-call.yaml +163 -0
  2524. package/semgrep-rules/python/lang/security/dangerous-testcapi-run-in-subinterp.py +25 -0
  2525. package/semgrep-rules/python/lang/security/dangerous-testcapi-run-in-subinterp.yaml +135 -0
  2526. package/semgrep-rules/python/lang/security/deserialization/avoid-jsonpickle.py +9 -0
  2527. package/semgrep-rules/python/lang/security/deserialization/avoid-jsonpickle.yaml +32 -0
  2528. package/semgrep-rules/python/lang/security/deserialization/avoid-pyyaml-load.py +65 -0
  2529. package/semgrep-rules/python/lang/security/deserialization/avoid-pyyaml-load.yaml +49 -0
  2530. package/semgrep-rules/python/lang/security/deserialization/avoid-unsafe-ruamel.py +16 -0
  2531. package/semgrep-rules/python/lang/security/deserialization/avoid-unsafe-ruamel.yaml +31 -0
  2532. package/semgrep-rules/python/lang/security/deserialization/pickle.py +62 -0
  2533. package/semgrep-rules/python/lang/security/deserialization/pickle.yaml +124 -0
  2534. package/semgrep-rules/python/lang/security/insecure-hash-algorithms-md5.py +23 -0
  2535. package/semgrep-rules/python/lang/security/insecure-hash-algorithms-md5.yaml +38 -0
  2536. package/semgrep-rules/python/lang/security/insecure-hash-algorithms.py +10 -0
  2537. package/semgrep-rules/python/lang/security/insecure-hash-algorithms.yaml +39 -0
  2538. package/semgrep-rules/python/lang/security/insecure-hash-function.py +24 -0
  2539. package/semgrep-rules/python/lang/security/insecure-hash-function.yaml +35 -0
  2540. package/semgrep-rules/python/lang/security/insecure-uuid-version.py +19 -0
  2541. package/semgrep-rules/python/lang/security/insecure-uuid-version.yaml +33 -0
  2542. package/semgrep-rules/python/lang/security/unverified-ssl-context.py +17 -0
  2543. package/semgrep-rules/python/lang/security/unverified-ssl-context.yaml +33 -0
  2544. package/semgrep-rules/python/lang/security/use-defused-xml-parse.fixed.py +21 -0
  2545. package/semgrep-rules/python/lang/security/use-defused-xml-parse.py +21 -0
  2546. package/semgrep-rules/python/lang/security/use-defused-xml-parse.yaml +33 -0
  2547. package/semgrep-rules/python/lang/security/use-defused-xml.py +15 -0
  2548. package/semgrep-rules/python/lang/security/use-defused-xml.yaml +29 -0
  2549. package/semgrep-rules/python/lang/security/use-defused-xmlrpc.py +9 -0
  2550. package/semgrep-rules/python/lang/security/use-defused-xmlrpc.yaml +30 -0
  2551. package/semgrep-rules/python/lang/security/use-defusedcsv.py +15 -0
  2552. package/semgrep-rules/python/lang/security/use-defusedcsv.yaml +36 -0
  2553. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm-blowfish.py +44 -0
  2554. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm-blowfish.yaml +37 -0
  2555. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm-des.py +44 -0
  2556. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm-des.yaml +39 -0
  2557. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm-rc2.py +37 -0
  2558. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm-rc2.yaml +37 -0
  2559. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm-rc4.py +36 -0
  2560. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm-rc4.yaml +35 -0
  2561. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm.py +35 -0
  2562. package/semgrep-rules/python/pycryptodome/security/insecure-cipher-algorithm.yaml +29 -0
  2563. package/semgrep-rules/python/pycryptodome/security/insecure-hash-algorithm-md2.py +24 -0
  2564. package/semgrep-rules/python/pycryptodome/security/insecure-hash-algorithm-md2.yaml +39 -0
  2565. package/semgrep-rules/python/pycryptodome/security/insecure-hash-algorithm-md4.py +26 -0
  2566. package/semgrep-rules/python/pycryptodome/security/insecure-hash-algorithm-md4.yaml +39 -0
  2567. package/semgrep-rules/python/pycryptodome/security/insecure-hash-algorithm-md5.py +25 -0
  2568. package/semgrep-rules/python/pycryptodome/security/insecure-hash-algorithm-md5.yaml +39 -0
  2569. package/semgrep-rules/python/pycryptodome/security/insecure-hash-algorithm.py +24 -0
  2570. package/semgrep-rules/python/pycryptodome/security/insecure-hash-algorithm.yaml +32 -0
  2571. package/semgrep-rules/python/pycryptodome/security/insufficient-dsa-key-size.py +28 -0
  2572. package/semgrep-rules/python/pycryptodome/security/insufficient-dsa-key-size.yaml +39 -0
  2573. package/semgrep-rules/python/pycryptodome/security/insufficient-rsa-key-size.py +33 -0
  2574. package/semgrep-rules/python/pycryptodome/security/insufficient-rsa-key-size.yaml +39 -0
  2575. package/semgrep-rules/python/pycryptodome/security/mode-without-authentication.py +29 -0
  2576. package/semgrep-rules/python/pycryptodome/security/mode-without-authentication.yaml +43 -0
  2577. package/semgrep-rules/python/pymongo/security/mongodb.py +17 -0
  2578. package/semgrep-rules/python/pymongo/security/mongodb.yaml +26 -0
  2579. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-httponly-unsafe-default.fixed.py +37 -0
  2580. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-httponly-unsafe-default.py +37 -0
  2581. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-httponly-unsafe-default.yaml +36 -0
  2582. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-httponly-unsafe-value.fixed.py +37 -0
  2583. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-httponly-unsafe-value.py +37 -0
  2584. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-httponly-unsafe-value.yaml +39 -0
  2585. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-samesite.fixed.py +37 -0
  2586. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-samesite.py +37 -0
  2587. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-samesite.yaml +34 -0
  2588. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-secure-unsafe-default.py +37 -0
  2589. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-secure-unsafe-default.yaml +37 -0
  2590. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-secure-unsafe-value.fixed.py +37 -0
  2591. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-secure-unsafe-value.py +37 -0
  2592. package/semgrep-rules/python/pyramid/audit/authtkt-cookie-secure-unsafe-value.yaml +39 -0
  2593. package/semgrep-rules/python/pyramid/audit/csrf-check-disabled.fixed.py +31 -0
  2594. package/semgrep-rules/python/pyramid/audit/csrf-check-disabled.py +31 -0
  2595. package/semgrep-rules/python/pyramid/audit/csrf-check-disabled.yaml +41 -0
  2596. package/semgrep-rules/python/pyramid/audit/csrf-origin-check-disabled-globally.fixed.py +13 -0
  2597. package/semgrep-rules/python/pyramid/audit/csrf-origin-check-disabled-globally.py +13 -0
  2598. package/semgrep-rules/python/pyramid/audit/csrf-origin-check-disabled-globally.yaml +36 -0
  2599. package/semgrep-rules/python/pyramid/audit/csrf-origin-check-disabled.fixed.py +31 -0
  2600. package/semgrep-rules/python/pyramid/audit/csrf-origin-check-disabled.py +31 -0
  2601. package/semgrep-rules/python/pyramid/audit/csrf-origin-check-disabled.yaml +43 -0
  2602. package/semgrep-rules/python/pyramid/audit/set-cookie-httponly-unsafe-default.py +50 -0
  2603. package/semgrep-rules/python/pyramid/audit/set-cookie-httponly-unsafe-default.yaml +43 -0
  2604. package/semgrep-rules/python/pyramid/audit/set-cookie-httponly-unsafe-value.fixed.py +51 -0
  2605. package/semgrep-rules/python/pyramid/audit/set-cookie-httponly-unsafe-value.py +51 -0
  2606. package/semgrep-rules/python/pyramid/audit/set-cookie-httponly-unsafe-value.yaml +48 -0
  2607. package/semgrep-rules/python/pyramid/audit/set-cookie-samesite-unsafe-default.py +48 -0
  2608. package/semgrep-rules/python/pyramid/audit/set-cookie-samesite-unsafe-default.yaml +43 -0
  2609. package/semgrep-rules/python/pyramid/audit/set-cookie-samesite-unsafe-value.fixed.py +49 -0
  2610. package/semgrep-rules/python/pyramid/audit/set-cookie-samesite-unsafe-value.py +49 -0
  2611. package/semgrep-rules/python/pyramid/audit/set-cookie-samesite-unsafe-value.yaml +45 -0
  2612. package/semgrep-rules/python/pyramid/audit/set-cookie-secure-unsafe-default.py +51 -0
  2613. package/semgrep-rules/python/pyramid/audit/set-cookie-secure-unsafe-default.yaml +43 -0
  2614. package/semgrep-rules/python/pyramid/audit/set-cookie-secure-unsafe-value.fixed.py +51 -0
  2615. package/semgrep-rules/python/pyramid/audit/set-cookie-secure-unsafe-value.py +51 -0
  2616. package/semgrep-rules/python/pyramid/audit/set-cookie-secure-unsafe-value.yaml +46 -0
  2617. package/semgrep-rules/python/pyramid/security/csrf-check-disabled-globally.fixed.py +13 -0
  2618. package/semgrep-rules/python/pyramid/security/csrf-check-disabled-globally.py +13 -0
  2619. package/semgrep-rules/python/pyramid/security/csrf-check-disabled-globally.yaml +35 -0
  2620. package/semgrep-rules/python/pyramid/security/direct-use-of-response.py +41 -0
  2621. package/semgrep-rules/python/pyramid/security/direct-use-of-response.yaml +53 -0
  2622. package/semgrep-rules/python/pyramid/security/sqlalchemy-sql-injection.py +98 -0
  2623. package/semgrep-rules/python/pyramid/security/sqlalchemy-sql-injection.yaml +61 -0
  2624. package/semgrep-rules/python/requests/best-practice/use-raise-for-status.py +112 -0
  2625. package/semgrep-rules/python/requests/best-practice/use-raise-for-status.yaml +62 -0
  2626. package/semgrep-rules/python/requests/best-practice/use-request-json-shortcut.py +14 -0
  2627. package/semgrep-rules/python/requests/best-practice/use-request-json-shortcut.yaml +19 -0
  2628. package/semgrep-rules/python/requests/best-practice/use-response-json-shortcut.fixed.py +10 -0
  2629. package/semgrep-rules/python/requests/best-practice/use-response-json-shortcut.py +10 -0
  2630. package/semgrep-rules/python/requests/best-practice/use-response-json-shortcut.yaml +20 -0
  2631. package/semgrep-rules/python/requests/best-practice/use-timeout.py +41 -0
  2632. package/semgrep-rules/python/requests/best-practice/use-timeout.yaml +46 -0
  2633. package/semgrep-rules/python/requests/security/disabled-cert-validation.py +17 -0
  2634. package/semgrep-rules/python/requests/security/disabled-cert-validation.yaml +36 -0
  2635. package/semgrep-rules/python/requests/security/no-auth-over-http.py +48 -0
  2636. package/semgrep-rules/python/requests/security/no-auth-over-http.yaml +37 -0
  2637. package/semgrep-rules/python/sh/security/string-concat.py +22 -0
  2638. package/semgrep-rules/python/sh/security/string-concat.yaml +30 -0
  2639. package/semgrep-rules/python/sqlalchemy/correctness/bad-operator-in-filter.py +40 -0
  2640. package/semgrep-rules/python/sqlalchemy/correctness/bad-operator-in-filter.yaml +29 -0
  2641. package/semgrep-rules/python/sqlalchemy/correctness/delete-where.py +3 -0
  2642. package/semgrep-rules/python/sqlalchemy/correctness/delete-where.yaml +15 -0
  2643. package/semgrep-rules/python/sqlalchemy/performance/performance-improvements.py +6 -0
  2644. package/semgrep-rules/python/sqlalchemy/performance/performance-improvements.yaml +23 -0
  2645. package/semgrep-rules/python/sqlalchemy/security/audit/avoid-sqlalchemy-text.py +46 -0
  2646. package/semgrep-rules/python/sqlalchemy/security/audit/avoid-sqlalchemy-text.yaml +59 -0
  2647. package/semgrep-rules/python/sqlalchemy/security/sqlalchemy-execute-raw-query.py +248 -0
  2648. package/semgrep-rules/python/sqlalchemy/security/sqlalchemy-execute-raw-query.yaml +66 -0
  2649. package/semgrep-rules/python/sqlalchemy/security/sqlalchemy-sql-injection.py +52 -0
  2650. package/semgrep-rules/python/sqlalchemy/security/sqlalchemy-sql-injection.yaml +58 -0
  2651. package/semgrep-rules/python/twilio/security/twiml-injection.py +88 -0
  2652. package/semgrep-rules/python/twilio/security/twiml-injection.yaml +48 -0
  2653. package/semgrep-rules/ruby/aws-lambda/security/activerecord-sqli.rb +23 -0
  2654. package/semgrep-rules/ruby/aws-lambda/security/activerecord-sqli.yaml +49 -0
  2655. package/semgrep-rules/ruby/aws-lambda/security/mysql2-sqli.rb +26 -0
  2656. package/semgrep-rules/ruby/aws-lambda/security/mysql2-sqli.yaml +49 -0
  2657. package/semgrep-rules/ruby/aws-lambda/security/pg-sqli.rb +15 -0
  2658. package/semgrep-rules/ruby/aws-lambda/security/pg-sqli.yaml +53 -0
  2659. package/semgrep-rules/ruby/aws-lambda/security/sequel-sqli.rb +22 -0
  2660. package/semgrep-rules/ruby/aws-lambda/security/sequel-sqli.yaml +48 -0
  2661. package/semgrep-rules/ruby/aws-lambda/security/tainted-deserialization.rb +26 -0
  2662. package/semgrep-rules/ruby/aws-lambda/security/tainted-deserialization.yaml +53 -0
  2663. package/semgrep-rules/ruby/aws-lambda/security/tainted-sql-string.rb +28 -0
  2664. package/semgrep-rules/ruby/aws-lambda/security/tainted-sql-string.yaml +56 -0
  2665. package/semgrep-rules/ruby/jwt/security/audit/jwt-decode-without-verify.rb +15 -0
  2666. package/semgrep-rules/ruby/jwt/security/audit/jwt-decode-without-verify.yaml +31 -0
  2667. package/semgrep-rules/ruby/jwt/security/audit/jwt-exposed-data.rb +14 -0
  2668. package/semgrep-rules/ruby/jwt/security/audit/jwt-exposed-data.yaml +35 -0
  2669. package/semgrep-rules/ruby/jwt/security/jwt-exposed-credentials.rb +15 -0
  2670. package/semgrep-rules/ruby/jwt/security/jwt-exposed-credentials.yaml +34 -0
  2671. package/semgrep-rules/ruby/jwt/security/jwt-hardcode.rb +49 -0
  2672. package/semgrep-rules/ruby/jwt/security/jwt-hardcode.yaml +52 -0
  2673. package/semgrep-rules/ruby/jwt/security/jwt-none-alg.rb +16 -0
  2674. package/semgrep-rules/ruby/jwt/security/jwt-none-alg.yaml +33 -0
  2675. package/semgrep-rules/ruby/lang/security/audit/sha224-hash.rb +48 -0
  2676. package/semgrep-rules/ruby/lang/security/audit/sha224-hash.yaml +40 -0
  2677. package/semgrep-rules/ruby/lang/security/bad-deserialization-env.rb +30 -0
  2678. package/semgrep-rules/ruby/lang/security/bad-deserialization-env.yaml +45 -0
  2679. package/semgrep-rules/ruby/lang/security/bad-deserialization-yaml.fixed.rb +43 -0
  2680. package/semgrep-rules/ruby/lang/security/bad-deserialization-yaml.rb +43 -0
  2681. package/semgrep-rules/ruby/lang/security/bad-deserialization-yaml.yaml +62 -0
  2682. package/semgrep-rules/ruby/lang/security/bad-deserialization.rb +40 -0
  2683. package/semgrep-rules/ruby/lang/security/bad-deserialization.yaml +46 -0
  2684. package/semgrep-rules/ruby/lang/security/cookie-serialization.rb +11 -0
  2685. package/semgrep-rules/ruby/lang/security/cookie-serialization.yaml +32 -0
  2686. package/semgrep-rules/ruby/lang/security/create-with.rb +11 -0
  2687. package/semgrep-rules/ruby/lang/security/create-with.yaml +32 -0
  2688. package/semgrep-rules/ruby/lang/security/dangerous-exec.rb +116 -0
  2689. package/semgrep-rules/ruby/lang/security/dangerous-exec.yaml +52 -0
  2690. package/semgrep-rules/ruby/lang/security/dangerous-open.rb +20 -0
  2691. package/semgrep-rules/ruby/lang/security/dangerous-open.yaml +33 -0
  2692. package/semgrep-rules/ruby/lang/security/dangerous-open3-pipeline.rb +21 -0
  2693. package/semgrep-rules/ruby/lang/security/dangerous-open3-pipeline.yaml +33 -0
  2694. package/semgrep-rules/ruby/lang/security/dangerous-subshell.rb +21 -0
  2695. package/semgrep-rules/ruby/lang/security/dangerous-subshell.yaml +33 -0
  2696. package/semgrep-rules/ruby/lang/security/dangerous-syscall.rb +4 -0
  2697. package/semgrep-rules/ruby/lang/security/dangerous-syscall.yaml +25 -0
  2698. package/semgrep-rules/ruby/lang/security/divide-by-zero.rb +19 -0
  2699. package/semgrep-rules/ruby/lang/security/divide-by-zero.yaml +31 -0
  2700. package/semgrep-rules/ruby/lang/security/file-disclosure.rb +9 -0
  2701. package/semgrep-rules/ruby/lang/security/file-disclosure.yaml +32 -0
  2702. package/semgrep-rules/ruby/lang/security/filter-skipping.rb +10 -0
  2703. package/semgrep-rules/ruby/lang/security/filter-skipping.yaml +32 -0
  2704. package/semgrep-rules/ruby/lang/security/force-ssl-false.rb +9 -0
  2705. package/semgrep-rules/ruby/lang/security/force-ssl-false.yaml +30 -0
  2706. package/semgrep-rules/ruby/lang/security/hardcoded-http-auth-in-controller.rb +16 -0
  2707. package/semgrep-rules/ruby/lang/security/hardcoded-http-auth-in-controller.yaml +36 -0
  2708. package/semgrep-rules/ruby/lang/security/hardcoded-secret-rsa-passphrase.rb +64 -0
  2709. package/semgrep-rules/ruby/lang/security/hardcoded-secret-rsa-passphrase.yaml +102 -0
  2710. package/semgrep-rules/ruby/lang/security/insufficient-rsa-key-size.rb +36 -0
  2711. package/semgrep-rules/ruby/lang/security/insufficient-rsa-key-size.yaml +50 -0
  2712. package/semgrep-rules/ruby/lang/security/json-entity-escape.rb +9 -0
  2713. package/semgrep-rules/ruby/lang/security/json-entity-escape.yaml +32 -0
  2714. package/semgrep-rules/ruby/lang/security/mass-assignment-protection-disabled.rb +5 -0
  2715. package/semgrep-rules/ruby/lang/security/mass-assignment-protection-disabled.yaml +28 -0
  2716. package/semgrep-rules/ruby/lang/security/md5-used-as-password.rb +31 -0
  2717. package/semgrep-rules/ruby/lang/security/md5-used-as-password.yaml +36 -0
  2718. package/semgrep-rules/ruby/lang/security/missing-csrf-protection.rb +24 -0
  2719. package/semgrep-rules/ruby/lang/security/missing-csrf-protection.yaml +42 -0
  2720. package/semgrep-rules/ruby/lang/security/model-attr-accessible.rb +49 -0
  2721. package/semgrep-rules/ruby/lang/security/model-attr-accessible.yaml +46 -0
  2722. package/semgrep-rules/ruby/lang/security/model-attributes-attr-accessible.rb +49 -0
  2723. package/semgrep-rules/ruby/lang/security/model-attributes-attr-accessible.yaml +46 -0
  2724. package/semgrep-rules/ruby/lang/security/no-eval.rb +62 -0
  2725. package/semgrep-rules/ruby/lang/security/no-eval.yaml +55 -0
  2726. package/semgrep-rules/ruby/lang/security/no-send.rb +10 -0
  2727. package/semgrep-rules/ruby/lang/security/no-send.yaml +45 -0
  2728. package/semgrep-rules/ruby/lang/security/ssl-mode-no-verify.rb +21 -0
  2729. package/semgrep-rules/ruby/lang/security/ssl-mode-no-verify.yaml +29 -0
  2730. package/semgrep-rules/ruby/lang/security/unprotected-mass-assign.rb +18 -0
  2731. package/semgrep-rules/ruby/lang/security/unprotected-mass-assign.yaml +38 -0
  2732. package/semgrep-rules/ruby/lang/security/weak-hashes-md5.rb +24 -0
  2733. package/semgrep-rules/ruby/lang/security/weak-hashes-md5.yaml +35 -0
  2734. package/semgrep-rules/ruby/lang/security/weak-hashes-sha1.rb +32 -0
  2735. package/semgrep-rules/ruby/lang/security/weak-hashes-sha1.yaml +30 -0
  2736. package/semgrep-rules/ruby/rails/correctness/rails-no-render-after-save.fixed.rb +45 -0
  2737. package/semgrep-rules/ruby/rails/correctness/rails-no-render-after-save.rb +45 -0
  2738. package/semgrep-rules/ruby/rails/correctness/rails-no-render-after-save.yaml +29 -0
  2739. package/semgrep-rules/ruby/rails/performance/ruby-rails-performance-indexes-are-really-beneficial.rb +21 -0
  2740. package/semgrep-rules/ruby/rails/performance/ruby-rails-performance-indexes-are-really-beneficial.yaml +27 -0
  2741. package/semgrep-rules/ruby/rails/security/audit/avoid-session-manipulation.rb +9 -0
  2742. package/semgrep-rules/ruby/rails/security/audit/avoid-session-manipulation.yaml +40 -0
  2743. package/semgrep-rules/ruby/rails/security/audit/avoid-tainted-file-access.rb +243 -0
  2744. package/semgrep-rules/ruby/rails/security/audit/avoid-tainted-file-access.yaml +70 -0
  2745. package/semgrep-rules/ruby/rails/security/audit/avoid-tainted-ftp-call.rb +95 -0
  2746. package/semgrep-rules/ruby/rails/security/audit/avoid-tainted-ftp-call.yaml +40 -0
  2747. package/semgrep-rules/ruby/rails/security/audit/avoid-tainted-http-request.rb +44 -0
  2748. package/semgrep-rules/ruby/rails/security/audit/avoid-tainted-http-request.yaml +78 -0
  2749. package/semgrep-rules/ruby/rails/security/audit/avoid-tainted-shell-call.rb +38 -0
  2750. package/semgrep-rules/ruby/rails/security/audit/avoid-tainted-shell-call.yaml +79 -0
  2751. package/semgrep-rules/ruby/rails/security/audit/detailed-exceptions.rb +37 -0
  2752. package/semgrep-rules/ruby/rails/security/audit/detailed-exceptions.yaml +46 -0
  2753. package/semgrep-rules/ruby/rails/security/audit/rails-skip-forgery-protection.rb +17 -0
  2754. package/semgrep-rules/ruby/rails/security/audit/rails-skip-forgery-protection.yaml +24 -0
  2755. package/semgrep-rules/ruby/rails/security/audit/sqli/ruby-pg-sqli.rb +115 -0
  2756. package/semgrep-rules/ruby/rails/security/audit/sqli/ruby-pg-sqli.yaml +63 -0
  2757. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-content-tag.rb +29 -0
  2758. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-content-tag.yaml +31 -0
  2759. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-default-routes.routes.rb +2 -0
  2760. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-default-routes.yaml +33 -0
  2761. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-html-safe.rb +19 -0
  2762. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-html-safe.yaml +31 -0
  2763. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-link-to.rb +18 -0
  2764. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-link-to.yaml +48 -0
  2765. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-raw.rb +61 -0
  2766. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-raw.yaml +29 -0
  2767. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-redirect.rb +14 -0
  2768. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-redirect.yaml +59 -0
  2769. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-render-dynamic-path.rb +20 -0
  2770. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-render-dynamic-path.yaml +43 -0
  2771. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-render-inline.rb +194 -0
  2772. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-render-inline.yaml +29 -0
  2773. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-render-text.rb +76 -0
  2774. package/semgrep-rules/ruby/rails/security/audit/xss/avoid-render-text.yaml +32 -0
  2775. package/semgrep-rules/ruby/rails/security/audit/xss/manual-template-creation.rb +20 -0
  2776. package/semgrep-rules/ruby/rails/security/audit/xss/manual-template-creation.yaml +29 -0
  2777. package/semgrep-rules/ruby/rails/security/audit/xss/templates/alias-for-html-safe.erb +9 -0
  2778. package/semgrep-rules/ruby/rails/security/audit/xss/templates/alias-for-html-safe.yaml +35 -0
  2779. package/semgrep-rules/ruby/rails/security/audit/xss/templates/avoid-content-tag.erb +7 -0
  2780. package/semgrep-rules/ruby/rails/security/audit/xss/templates/avoid-content-tag.yaml +35 -0
  2781. package/semgrep-rules/ruby/rails/security/audit/xss/templates/avoid-html-safe.erb +7 -0
  2782. package/semgrep-rules/ruby/rails/security/audit/xss/templates/avoid-html-safe.yaml +36 -0
  2783. package/semgrep-rules/ruby/rails/security/audit/xss/templates/avoid-raw.erb +7 -0
  2784. package/semgrep-rules/ruby/rails/security/audit/xss/templates/avoid-raw.yaml +36 -0
  2785. package/semgrep-rules/ruby/rails/security/audit/xss/templates/dangerous-link-to.erb +8 -0
  2786. package/semgrep-rules/ruby/rails/security/audit/xss/templates/dangerous-link-to.yaml +42 -0
  2787. package/semgrep-rules/ruby/rails/security/audit/xss/templates/unquoted-attribute.erb +25 -0
  2788. package/semgrep-rules/ruby/rails/security/audit/xss/templates/unquoted-attribute.yaml +40 -0
  2789. package/semgrep-rules/ruby/rails/security/audit/xss/templates/var-in-href.erb +24 -0
  2790. package/semgrep-rules/ruby/rails/security/audit/xss/templates/var-in-href.yaml +38 -0
  2791. package/semgrep-rules/ruby/rails/security/audit/xss/templates/var-in-script-tag.erb +23 -0
  2792. package/semgrep-rules/ruby/rails/security/audit/xss/templates/var-in-script-tag.yaml +42 -0
  2793. package/semgrep-rules/ruby/rails/security/audit/xxe/libxml-backend.rb +20 -0
  2794. package/semgrep-rules/ruby/rails/security/audit/xxe/libxml-backend.yaml +29 -0
  2795. package/semgrep-rules/ruby/rails/security/audit/xxe/xml-external-entities-enabled.rb +19 -0
  2796. package/semgrep-rules/ruby/rails/security/audit/xxe/xml-external-entities-enabled.yaml +41 -0
  2797. package/semgrep-rules/ruby/rails/security/brakeman/check-before-filter.rb +47 -0
  2798. package/semgrep-rules/ruby/rails/security/brakeman/check-before-filter.yaml +34 -0
  2799. package/semgrep-rules/ruby/rails/security/brakeman/check-cookie-store-session-security-attributes.rb +35 -0
  2800. package/semgrep-rules/ruby/rails/security/brakeman/check-cookie-store-session-security-attributes.yaml +38 -0
  2801. package/semgrep-rules/ruby/rails/security/brakeman/check-dynamic-render-local-file-include.html.erb +8 -0
  2802. package/semgrep-rules/ruby/rails/security/brakeman/check-dynamic-render-local-file-include.yaml +37 -0
  2803. package/semgrep-rules/ruby/rails/security/brakeman/check-http-verb-confusion.rb +27 -0
  2804. package/semgrep-rules/ruby/rails/security/brakeman/check-http-verb-confusion.yaml +38 -0
  2805. package/semgrep-rules/ruby/rails/security/brakeman/check-permit-attributes-high.rb +12 -0
  2806. package/semgrep-rules/ruby/rails/security/brakeman/check-permit-attributes-high.yaml +29 -0
  2807. package/semgrep-rules/ruby/rails/security/brakeman/check-permit-attributes-medium.rb +12 -0
  2808. package/semgrep-rules/ruby/rails/security/brakeman/check-permit-attributes-medium.yaml +29 -0
  2809. package/semgrep-rules/ruby/rails/security/brakeman/check-rails-secret-yaml.secrets.test.yml +26 -0
  2810. package/semgrep-rules/ruby/rails/security/brakeman/check-rails-secret-yaml.yaml +42 -0
  2811. package/semgrep-rules/ruby/rails/security/brakeman/check-rails-session-secret-handling.rb +24 -0
  2812. package/semgrep-rules/ruby/rails/security/brakeman/check-rails-session-secret-handling.yaml +42 -0
  2813. package/semgrep-rules/ruby/rails/security/brakeman/check-redirect-to.rb +41 -0
  2814. package/semgrep-rules/ruby/rails/security/brakeman/check-redirect-to.yaml +79 -0
  2815. package/semgrep-rules/ruby/rails/security/brakeman/check-regex-dos.rb +31 -0
  2816. package/semgrep-rules/ruby/rails/security/brakeman/check-regex-dos.yaml +66 -0
  2817. package/semgrep-rules/ruby/rails/security/brakeman/check-render-local-file-include.rb +61 -0
  2818. package/semgrep-rules/ruby/rails/security/brakeman/check-render-local-file-include.yaml +62 -0
  2819. package/semgrep-rules/ruby/rails/security/brakeman/check-reverse-tabnabbing.html.erb +36 -0
  2820. package/semgrep-rules/ruby/rails/security/brakeman/check-reverse-tabnabbing.yaml +63 -0
  2821. package/semgrep-rules/ruby/rails/security/brakeman/check-secrets.rb +7 -0
  2822. package/semgrep-rules/ruby/rails/security/brakeman/check-secrets.yaml +35 -0
  2823. package/semgrep-rules/ruby/rails/security/brakeman/check-send-file.rb +46 -0
  2824. package/semgrep-rules/ruby/rails/security/brakeman/check-send-file.yaml +44 -0
  2825. package/semgrep-rules/ruby/rails/security/brakeman/check-sql.rb +210 -0
  2826. package/semgrep-rules/ruby/rails/security/brakeman/check-sql.yaml +89 -0
  2827. package/semgrep-rules/ruby/rails/security/brakeman/check-unsafe-reflection-methods.rb +30 -0
  2828. package/semgrep-rules/ruby/rails/security/brakeman/check-unsafe-reflection-methods.yaml +59 -0
  2829. package/semgrep-rules/ruby/rails/security/brakeman/check-unsafe-reflection.rb +27 -0
  2830. package/semgrep-rules/ruby/rails/security/brakeman/check-unsafe-reflection.yaml +54 -0
  2831. package/semgrep-rules/ruby/rails/security/brakeman/check-unscoped-find.rb +45 -0
  2832. package/semgrep-rules/ruby/rails/security/brakeman/check-unscoped-find.yaml +51 -0
  2833. package/semgrep-rules/ruby/rails/security/brakeman/check-validation-regex.rb +36 -0
  2834. package/semgrep-rules/ruby/rails/security/brakeman/check-validation-regex.yaml +38 -0
  2835. package/semgrep-rules/ruby/rails/security/injection/raw-html-format.rb +75 -0
  2836. package/semgrep-rules/ruby/rails/security/injection/raw-html-format.yaml +59 -0
  2837. package/semgrep-rules/ruby/rails/security/injection/tainted-sql-string.rb +103 -0
  2838. package/semgrep-rules/ruby/rails/security/injection/tainted-sql-string.yaml +69 -0
  2839. package/semgrep-rules/ruby/rails/security/injection/tainted-url-host.rb +70 -0
  2840. package/semgrep-rules/ruby/rails/security/injection/tainted-url-host.yaml +58 -0
  2841. package/semgrep-rules/rust/lang/security/args-os.rs +4 -0
  2842. package/semgrep-rules/rust/lang/security/args-os.yml +21 -0
  2843. package/semgrep-rules/rust/lang/security/args.rs +4 -0
  2844. package/semgrep-rules/rust/lang/security/args.yml +21 -0
  2845. package/semgrep-rules/rust/lang/security/current-exe.rs +4 -0
  2846. package/semgrep-rules/rust/lang/security/current-exe.yml +21 -0
  2847. package/semgrep-rules/rust/lang/security/insecure-hashes.rs +20 -0
  2848. package/semgrep-rules/rust/lang/security/insecure-hashes.yml +25 -0
  2849. package/semgrep-rules/rust/lang/security/reqwest-accept-invalid.rs +30 -0
  2850. package/semgrep-rules/rust/lang/security/reqwest-accept-invalid.yml +20 -0
  2851. package/semgrep-rules/rust/lang/security/reqwest-set-sensitive.rs +33 -0
  2852. package/semgrep-rules/rust/lang/security/reqwest-set-sensitive.yml +44 -0
  2853. package/semgrep-rules/rust/lang/security/rustls-dangerous.rs +19 -0
  2854. package/semgrep-rules/rust/lang/security/rustls-dangerous.yml +24 -0
  2855. package/semgrep-rules/rust/lang/security/ssl-verify-none.rs +11 -0
  2856. package/semgrep-rules/rust/lang/security/ssl-verify-none.yml +17 -0
  2857. package/semgrep-rules/rust/lang/security/temp-dir.rs +4 -0
  2858. package/semgrep-rules/rust/lang/security/temp-dir.yml +23 -0
  2859. package/semgrep-rules/rust/lang/security/unsafe-usage.rs +5 -0
  2860. package/semgrep-rules/rust/lang/security/unsafe-usage.yml +17 -0
  2861. package/semgrep-rules/scala/jwt-scala/security/jwt-scala-hardcode.scala +53 -0
  2862. package/semgrep-rules/scala/jwt-scala/security/jwt-scala-hardcode.yaml +83 -0
  2863. package/semgrep-rules/scala/lang/correctness/positive-number-index-of.scala +35 -0
  2864. package/semgrep-rules/scala/lang/correctness/positive-number-index-of.yaml +29 -0
  2865. package/semgrep-rules/scala/lang/security/audit/dangerous-seq-run.scala +38 -0
  2866. package/semgrep-rules/scala/lang/security/audit/dangerous-seq-run.yaml +40 -0
  2867. package/semgrep-rules/scala/lang/security/audit/dangerous-shell-run.scala +38 -0
  2868. package/semgrep-rules/scala/lang/security/audit/dangerous-shell-run.yaml +43 -0
  2869. package/semgrep-rules/scala/lang/security/audit/dispatch-ssrf.scala +61 -0
  2870. package/semgrep-rules/scala/lang/security/audit/dispatch-ssrf.yaml +44 -0
  2871. package/semgrep-rules/scala/lang/security/audit/documentbuilder-dtd-enabled.scala +63 -0
  2872. package/semgrep-rules/scala/lang/security/audit/documentbuilder-dtd-enabled.yaml +86 -0
  2873. package/semgrep-rules/scala/lang/security/audit/insecure-random.scala +19 -0
  2874. package/semgrep-rules/scala/lang/security/audit/insecure-random.yaml +32 -0
  2875. package/semgrep-rules/scala/lang/security/audit/io-source-ssrf.scala +57 -0
  2876. package/semgrep-rules/scala/lang/security/audit/io-source-ssrf.yaml +45 -0
  2877. package/semgrep-rules/scala/lang/security/audit/path-traversal-fromfile.scala +57 -0
  2878. package/semgrep-rules/scala/lang/security/audit/path-traversal-fromfile.yaml +58 -0
  2879. package/semgrep-rules/scala/lang/security/audit/rsa-padding-set.scala +21 -0
  2880. package/semgrep-rules/scala/lang/security/audit/rsa-padding-set.yaml +33 -0
  2881. package/semgrep-rules/scala/lang/security/audit/sax-dtd-enabled.scala +116 -0
  2882. package/semgrep-rules/scala/lang/security/audit/sax-dtd-enabled.yaml +71 -0
  2883. package/semgrep-rules/scala/lang/security/audit/scala-dangerous-process-run.scala +62 -0
  2884. package/semgrep-rules/scala/lang/security/audit/scala-dangerous-process-run.yaml +53 -0
  2885. package/semgrep-rules/scala/lang/security/audit/scalac-debug.sbt +38 -0
  2886. package/semgrep-rules/scala/lang/security/audit/scalac-debug.yaml +30 -0
  2887. package/semgrep-rules/scala/lang/security/audit/scalaj-http-ssrf.scala +56 -0
  2888. package/semgrep-rules/scala/lang/security/audit/scalaj-http-ssrf.yaml +44 -0
  2889. package/semgrep-rules/scala/lang/security/audit/scalajs-eval.scala +23 -0
  2890. package/semgrep-rules/scala/lang/security/audit/scalajs-eval.yaml +51 -0
  2891. package/semgrep-rules/scala/lang/security/audit/tainted-sql-string.scala +102 -0
  2892. package/semgrep-rules/scala/lang/security/audit/tainted-sql-string.yaml +89 -0
  2893. package/semgrep-rules/scala/lang/security/audit/xmlinputfactory-dtd-enabled.scala +42 -0
  2894. package/semgrep-rules/scala/lang/security/audit/xmlinputfactory-dtd-enabled.yaml +38 -0
  2895. package/semgrep-rules/scala/play/security/conf-csrf-headers-bypass.conf +68 -0
  2896. package/semgrep-rules/scala/play/security/conf-csrf-headers-bypass.yaml +75 -0
  2897. package/semgrep-rules/scala/play/security/conf-insecure-cookie-settings.conf +78 -0
  2898. package/semgrep-rules/scala/play/security/conf-insecure-cookie-settings.yaml +36 -0
  2899. package/semgrep-rules/scala/play/security/tainted-html-response.scala +78 -0
  2900. package/semgrep-rules/scala/play/security/tainted-html-response.yaml +101 -0
  2901. package/semgrep-rules/scala/play/security/tainted-slick-sqli.scala +63 -0
  2902. package/semgrep-rules/scala/play/security/tainted-slick-sqli.yaml +84 -0
  2903. package/semgrep-rules/scala/play/security/tainted-sql-from-http-request.scala +61 -0
  2904. package/semgrep-rules/scala/play/security/tainted-sql-from-http-request.yaml +103 -0
  2905. package/semgrep-rules/scala/play/security/twirl-html-var.scala.html +32 -0
  2906. package/semgrep-rules/scala/play/security/twirl-html-var.yaml +44 -0
  2907. package/semgrep-rules/scala/play/security/webservice-ssrf.scala +73 -0
  2908. package/semgrep-rules/scala/play/security/webservice-ssrf.yaml +53 -0
  2909. package/semgrep-rules/scala/scala-jwt/security/jwt-hardcode.scala +36 -0
  2910. package/semgrep-rules/scala/scala-jwt/security/jwt-hardcode.yaml +83 -0
  2911. package/semgrep-rules/scala/slick/security/scala-slick-overrideSql-literal.scala +26 -0
  2912. package/semgrep-rules/scala/slick/security/scala-slick-overrideSql-literal.yaml +33 -0
  2913. package/semgrep-rules/scala/slick/security/scala-slick-sql-non-literal.scala +15 -0
  2914. package/semgrep-rules/scala/slick/security/scala-slick-sql-non-literal.yaml +34 -0
  2915. package/semgrep-rules/scripts/historical-semgrep-version +17 -0
  2916. package/semgrep-rules/solidity/best-practice/use-abi-encodecall-instead-of-encodewithselector.sol +45 -0
  2917. package/semgrep-rules/solidity/best-practice/use-abi-encodecall-instead-of-encodewithselector.yaml +15 -0
  2918. package/semgrep-rules/solidity/best-practice/use-ownable2step.sol +15 -0
  2919. package/semgrep-rules/solidity/best-practice/use-ownable2step.yaml +25 -0
  2920. package/semgrep-rules/solidity/performance/array-length-outside-loop.sol +61 -0
  2921. package/semgrep-rules/solidity/performance/array-length-outside-loop.yaml +41 -0
  2922. package/semgrep-rules/solidity/performance/inefficient-state-variable-increment.sol +52 -0
  2923. package/semgrep-rules/solidity/performance/inefficient-state-variable-increment.yaml +37 -0
  2924. package/semgrep-rules/solidity/performance/init-variables-with-default-value.sol +52 -0
  2925. package/semgrep-rules/solidity/performance/init-variables-with-default-value.yaml +31 -0
  2926. package/semgrep-rules/solidity/performance/non-optimal-variables-swap.sol +46 -0
  2927. package/semgrep-rules/solidity/performance/non-optimal-variables-swap.yaml +18 -0
  2928. package/semgrep-rules/solidity/performance/non-payable-constructor.sol +17 -0
  2929. package/semgrep-rules/solidity/performance/non-payable-constructor.yaml +29 -0
  2930. package/semgrep-rules/solidity/performance/state-variable-read-in-a-loop.sol +85 -0
  2931. package/semgrep-rules/solidity/performance/state-variable-read-in-a-loop.yaml +54 -0
  2932. package/semgrep-rules/solidity/performance/unnecessary-checked-arithmetic-in-loop.sol +52 -0
  2933. package/semgrep-rules/solidity/performance/unnecessary-checked-arithmetic-in-loop.yaml +44 -0
  2934. package/semgrep-rules/solidity/performance/use-custom-error-not-require.sol +9 -0
  2935. package/semgrep-rules/solidity/performance/use-custom-error-not-require.yaml +22 -0
  2936. package/semgrep-rules/solidity/performance/use-multiple-require.sol +19 -0
  2937. package/semgrep-rules/solidity/performance/use-multiple-require.yaml +18 -0
  2938. package/semgrep-rules/solidity/performance/use-nested-if.sol +18 -0
  2939. package/semgrep-rules/solidity/performance/use-nested-if.yaml +20 -0
  2940. package/semgrep-rules/solidity/performance/use-prefix-decrement-not-postfix.sol +58 -0
  2941. package/semgrep-rules/solidity/performance/use-prefix-decrement-not-postfix.yaml +30 -0
  2942. package/semgrep-rules/solidity/performance/use-prefix-increment-not-postfix.sol +58 -0
  2943. package/semgrep-rules/solidity/performance/use-prefix-increment-not-postfix.yaml +30 -0
  2944. package/semgrep-rules/solidity/performance/use-short-revert-string.sol +26 -0
  2945. package/semgrep-rules/solidity/performance/use-short-revert-string.yaml +25 -0
  2946. package/semgrep-rules/solidity/security/accessible-selfdestruct.sol +137 -0
  2947. package/semgrep-rules/solidity/security/accessible-selfdestruct.yaml +108 -0
  2948. package/semgrep-rules/solidity/security/arbitrary-low-level-call.sol +661 -0
  2949. package/semgrep-rules/solidity/security/arbitrary-low-level-call.yaml +35 -0
  2950. package/semgrep-rules/solidity/security/arbitrary-send-erc20.sol +9 -0
  2951. package/semgrep-rules/solidity/security/arbitrary-send-erc20.yaml +28 -0
  2952. package/semgrep-rules/solidity/security/balancer-readonly-reentrancy-getpooltokens.sol +123 -0
  2953. package/semgrep-rules/solidity/security/balancer-readonly-reentrancy-getpooltokens.yaml +144 -0
  2954. package/semgrep-rules/solidity/security/balancer-readonly-reentrancy-getrate.sol +80 -0
  2955. package/semgrep-rules/solidity/security/balancer-readonly-reentrancy-getrate.yaml +126 -0
  2956. package/semgrep-rules/solidity/security/basic-arithmetic-underflow.sol +401 -0
  2957. package/semgrep-rules/solidity/security/basic-arithmetic-underflow.yaml +31 -0
  2958. package/semgrep-rules/solidity/security/basic-oracle-manipulation.sol +506 -0
  2959. package/semgrep-rules/solidity/security/basic-oracle-manipulation.yaml +49 -0
  2960. package/semgrep-rules/solidity/security/compound-borrowfresh-reentrancy.sol +3386 -0
  2961. package/semgrep-rules/solidity/security/compound-borrowfresh-reentrancy.yaml +32 -0
  2962. package/semgrep-rules/solidity/security/compound-sweeptoken-not-restricted.sol +230 -0
  2963. package/semgrep-rules/solidity/security/compound-sweeptoken-not-restricted.yaml +39 -0
  2964. package/semgrep-rules/solidity/security/curve-readonly-reentrancy.sol +65 -0
  2965. package/semgrep-rules/solidity/security/curve-readonly-reentrancy.yaml +70 -0
  2966. package/semgrep-rules/solidity/security/delegatecall-to-arbitrary-address.sol +121 -0
  2967. package/semgrep-rules/solidity/security/delegatecall-to-arbitrary-address.yaml +49 -0
  2968. package/semgrep-rules/solidity/security/encode-packed-collision.sol +95 -0
  2969. package/semgrep-rules/solidity/security/encode-packed-collision.yaml +76 -0
  2970. package/semgrep-rules/solidity/security/erc20-public-burn.sol +1663 -0
  2971. package/semgrep-rules/solidity/security/erc20-public-burn.yaml +49 -0
  2972. package/semgrep-rules/solidity/security/erc20-public-transfer.sol +631 -0
  2973. package/semgrep-rules/solidity/security/erc20-public-transfer.yaml +31 -0
  2974. package/semgrep-rules/solidity/security/erc677-reentrancy.sol +1010 -0
  2975. package/semgrep-rules/solidity/security/erc677-reentrancy.yaml +29 -0
  2976. package/semgrep-rules/solidity/security/erc721-arbitrary-transferfrom.sol +2035 -0
  2977. package/semgrep-rules/solidity/security/erc721-arbitrary-transferfrom.yaml +42 -0
  2978. package/semgrep-rules/solidity/security/erc721-reentrancy.sol +413 -0
  2979. package/semgrep-rules/solidity/security/erc721-reentrancy.yaml +23 -0
  2980. package/semgrep-rules/solidity/security/erc777-reentrancy.sol +551 -0
  2981. package/semgrep-rules/solidity/security/erc777-reentrancy.yaml +23 -0
  2982. package/semgrep-rules/solidity/security/gearbox-tokens-path-confusion.sol +261 -0
  2983. package/semgrep-rules/solidity/security/gearbox-tokens-path-confusion.yaml +23 -0
  2984. package/semgrep-rules/solidity/security/incorrect-use-of-blockhash.sol +25 -0
  2985. package/semgrep-rules/solidity/security/incorrect-use-of-blockhash.yaml +26 -0
  2986. package/semgrep-rules/solidity/security/keeper-network-oracle-manipulation.sol +41 -0
  2987. package/semgrep-rules/solidity/security/keeper-network-oracle-manipulation.yaml +28 -0
  2988. package/semgrep-rules/solidity/security/missing-self-transfer-check-ercx.sol +90 -0
  2989. package/semgrep-rules/solidity/security/missing-self-transfer-check-ercx.yaml +43 -0
  2990. package/semgrep-rules/solidity/security/msg-value-multicall.sol +722 -0
  2991. package/semgrep-rules/solidity/security/msg-value-multicall.yaml +35 -0
  2992. package/semgrep-rules/solidity/security/no-bidi-characters.sol +67 -0
  2993. package/semgrep-rules/solidity/security/no-bidi-characters.yaml +30 -0
  2994. package/semgrep-rules/solidity/security/no-slippage-check.sol +421 -0
  2995. package/semgrep-rules/solidity/security/no-slippage-check.yaml +89 -0
  2996. package/semgrep-rules/solidity/security/openzeppelin-ecdsa-recover-malleable.sol +20 -0
  2997. package/semgrep-rules/solidity/security/openzeppelin-ecdsa-recover-malleable.yaml +36 -0
  2998. package/semgrep-rules/solidity/security/oracle-price-update-not-restricted.sol +148 -0
  2999. package/semgrep-rules/solidity/security/oracle-price-update-not-restricted.yaml +35 -0
  3000. package/semgrep-rules/solidity/security/proxy-storage-collision.sol +189 -0
  3001. package/semgrep-rules/solidity/security/proxy-storage-collision.yaml +75 -0
  3002. package/semgrep-rules/solidity/security/redacted-cartel-custom-approval-bug.sol +945 -0
  3003. package/semgrep-rules/solidity/security/redacted-cartel-custom-approval-bug.yaml +27 -0
  3004. package/semgrep-rules/solidity/security/rigoblock-missing-access-control.sol +1222 -0
  3005. package/semgrep-rules/solidity/security/rigoblock-missing-access-control.yaml +25 -0
  3006. package/semgrep-rules/solidity/security/sense-missing-oracle-access-control.sol +806 -0
  3007. package/semgrep-rules/solidity/security/sense-missing-oracle-access-control.yaml +52 -0
  3008. package/semgrep-rules/solidity/security/superfluid-ctx-injection.sol +206 -0
  3009. package/semgrep-rules/solidity/security/superfluid-ctx-injection.yaml +27 -0
  3010. package/semgrep-rules/solidity/security/tecra-coin-burnfrom-bug.sol +508 -0
  3011. package/semgrep-rules/solidity/security/tecra-coin-burnfrom-bug.yaml +31 -0
  3012. package/semgrep-rules/solidity/security/uniswap-callback-not-protected.sol +318 -0
  3013. package/semgrep-rules/solidity/security/uniswap-callback-not-protected.yaml +138 -0
  3014. package/semgrep-rules/solidity/security/unrestricted-transferownership.sol +1217 -0
  3015. package/semgrep-rules/solidity/security/unrestricted-transferownership.yaml +94 -0
  3016. package/semgrep-rules/stats/Sources_Sinks_Checklist.md +25 -0
  3017. package/semgrep-rules/stats/cwe_to_metacategory.yml +85 -0
  3018. package/semgrep-rules/stats/gen_table.py +96 -0
  3019. package/semgrep-rules/stats/high_signal_coverage.md +136 -0
  3020. package/semgrep-rules/stats/matrixify.py +251 -0
  3021. package/semgrep-rules/stats/matrixify_graph.py +144 -0
  3022. package/semgrep-rules/stats/metacategory_stats_table.md +217 -0
  3023. package/semgrep-rules/stats/metacategory_to_support_tier.yml +22 -0
  3024. package/semgrep-rules/stats/taint_without_audit_coverage.md +100 -0
  3025. package/semgrep-rules/stats/web_frameworks.yml +15 -0
  3026. package/semgrep-rules/swift/lang/crypto/insecure-random.swift +49 -0
  3027. package/semgrep-rules/swift/lang/crypto/insecure-random.yaml +42 -0
  3028. package/semgrep-rules/swift/lang/storage/sensitive-storage-userdefaults.swift +35 -0
  3029. package/semgrep-rules/swift/lang/storage/sensitive-storage-userdefaults.yaml +144 -0
  3030. package/semgrep-rules/swift/sqllite/sqllite-injection-audit.swift +66 -0
  3031. package/semgrep-rules/swift/sqllite/sqllite-injection-audit.yaml +43 -0
  3032. package/semgrep-rules/swift/webview/webview-js-window.swift +16 -0
  3033. package/semgrep-rules/swift/webview/webview-js-window.yaml +58 -0
  3034. package/semgrep-rules/template.yaml +6 -0
  3035. package/semgrep-rules/terraform/aws/best-practice/aws-elasticache-automatic-backup-not-enabled.tf +41 -0
  3036. package/semgrep-rules/terraform/aws/best-practice/aws-elasticache-automatic-backup-not-enabled.yaml +40 -0
  3037. package/semgrep-rules/terraform/aws/best-practice/aws-qldb-inadequate-ledger-permissions-mode.tf +13 -0
  3038. package/semgrep-rules/terraform/aws/best-practice/aws-qldb-inadequate-ledger-permissions-mode.yaml +18 -0
  3039. package/semgrep-rules/terraform/aws/best-practice/aws-rds-cluster-iam-authentication-not-enabled.tf +22 -0
  3040. package/semgrep-rules/terraform/aws/best-practice/aws-rds-cluster-iam-authentication-not-enabled.yaml +22 -0
  3041. package/semgrep-rules/terraform/aws/best-practice/aws-rds-iam-authentication-not-enabled.tf +70 -0
  3042. package/semgrep-rules/terraform/aws/best-practice/aws-rds-iam-authentication-not-enabled.yaml +22 -0
  3043. package/semgrep-rules/terraform/aws/best-practice/aws-rds-multiaz-not-enabled.tf +30 -0
  3044. package/semgrep-rules/terraform/aws/best-practice/aws-rds-multiaz-not-enabled.yaml +22 -0
  3045. package/semgrep-rules/terraform/aws/best-practice/aws-s3-bucket-versioning-not-enabled.tf +108 -0
  3046. package/semgrep-rules/terraform/aws/best-practice/aws-s3-bucket-versioning-not-enabled.yaml +37 -0
  3047. package/semgrep-rules/terraform/aws/best-practice/aws-s3-object-lock-not-enabled.tf +46 -0
  3048. package/semgrep-rules/terraform/aws/best-practice/aws-s3-object-lock-not-enabled.yaml +29 -0
  3049. package/semgrep-rules/terraform/aws/best-practice/missing-alb-drop-http-headers.tf +69 -0
  3050. package/semgrep-rules/terraform/aws/best-practice/missing-alb-drop-http-headers.yaml +29 -0
  3051. package/semgrep-rules/terraform/aws/best-practice/missing-api-gateway-cache-cluster.tf +24 -0
  3052. package/semgrep-rules/terraform/aws/best-practice/missing-api-gateway-cache-cluster.yaml +24 -0
  3053. package/semgrep-rules/terraform/aws/best-practice/missing-autoscaling-group-tags.tf +61 -0
  3054. package/semgrep-rules/terraform/aws/best-practice/missing-autoscaling-group-tags.yaml +36 -0
  3055. package/semgrep-rules/terraform/aws/best-practice/missing-aws-autoscaling-tags.tf +58 -0
  3056. package/semgrep-rules/terraform/aws/best-practice/missing-aws-autoscaling-tags.yaml +32 -0
  3057. package/semgrep-rules/terraform/aws/best-practice/missing-aws-cross-zone-lb.tf +74 -0
  3058. package/semgrep-rules/terraform/aws/best-practice/missing-aws-cross-zone-lb.yaml +37 -0
  3059. package/semgrep-rules/terraform/aws/best-practice/missing-aws-lb-deletion-protection.tf +53 -0
  3060. package/semgrep-rules/terraform/aws/best-practice/missing-aws-lb-deletion-protection.yaml +30 -0
  3061. package/semgrep-rules/terraform/aws/best-practice/missing-aws-qldb-deletion-protection.tf +22 -0
  3062. package/semgrep-rules/terraform/aws/best-practice/missing-aws-qldb-deletion-protection.yaml +18 -0
  3063. package/semgrep-rules/terraform/aws/best-practice/missing-cloudwatch-log-group-kms-key.tf +10 -0
  3064. package/semgrep-rules/terraform/aws/best-practice/missing-cloudwatch-log-group-kms-key.yaml +20 -0
  3065. package/semgrep-rules/terraform/aws/best-practice/missing-cloudwatch-log-group-retention.tf +7 -0
  3066. package/semgrep-rules/terraform/aws/best-practice/missing-cloudwatch-log-group-retention.yaml +20 -0
  3067. package/semgrep-rules/terraform/aws/correctness/lambda-permission-logs-missing-arn-asterisk.tf +31 -0
  3068. package/semgrep-rules/terraform/aws/correctness/lambda-permission-logs-missing-arn-asterisk.yaml +25 -0
  3069. package/semgrep-rules/terraform/aws/correctness/lambda-redundant-field-with-image.tf +112 -0
  3070. package/semgrep-rules/terraform/aws/correctness/lambda-redundant-field-with-image.yaml +23 -0
  3071. package/semgrep-rules/terraform/aws/correctness/reserved-aws-lambda-environment-variable.tf +37 -0
  3072. package/semgrep-rules/terraform/aws/correctness/reserved-aws-lambda-environment-variable.yaml +45 -0
  3073. package/semgrep-rules/terraform/aws/correctness/subscription-filter-missing-depends.tf +37 -0
  3074. package/semgrep-rules/terraform/aws/correctness/subscription-filter-missing-depends.yaml +26 -0
  3075. package/semgrep-rules/terraform/aws/security/aws-athena-client-can-disable-workgroup-encryption.tf +60 -0
  3076. package/semgrep-rules/terraform/aws/security/aws-athena-client-can-disable-workgroup-encryption.yaml +44 -0
  3077. package/semgrep-rules/terraform/aws/security/aws-athena-database-unencrypted.tf +16 -0
  3078. package/semgrep-rules/terraform/aws/security/aws-athena-database-unencrypted.yaml +39 -0
  3079. package/semgrep-rules/terraform/aws/security/aws-athena-workgroup-unencrypted.tf +30 -0
  3080. package/semgrep-rules/terraform/aws/security/aws-athena-workgroup-unencrypted.yaml +53 -0
  3081. package/semgrep-rules/terraform/aws/security/aws-backup-vault-unencrypted.tf +10 -0
  3082. package/semgrep-rules/terraform/aws/security/aws-backup-vault-unencrypted.yaml +30 -0
  3083. package/semgrep-rules/terraform/aws/security/aws-cloudfront-insecure-tls.tf +424 -0
  3084. package/semgrep-rules/terraform/aws/security/aws-cloudfront-insecure-tls.yaml +65 -0
  3085. package/semgrep-rules/terraform/aws/security/aws-cloudtrail-encrypted-with-cmk.tf +13 -0
  3086. package/semgrep-rules/terraform/aws/security/aws-cloudtrail-encrypted-with-cmk.yaml +34 -0
  3087. package/semgrep-rules/terraform/aws/security/aws-cloudwatch-log-group-no-retention.tf +5 -0
  3088. package/semgrep-rules/terraform/aws/security/aws-cloudwatch-log-group-no-retention.yaml +33 -0
  3089. package/semgrep-rules/terraform/aws/security/aws-cloudwatch-log-group-unencrypted.tf +8 -0
  3090. package/semgrep-rules/terraform/aws/security/aws-cloudwatch-log-group-unencrypted.yaml +36 -0
  3091. package/semgrep-rules/terraform/aws/security/aws-codebuild-artifacts-unencrypted.tf +387 -0
  3092. package/semgrep-rules/terraform/aws/security/aws-codebuild-artifacts-unencrypted.yaml +46 -0
  3093. package/semgrep-rules/terraform/aws/security/aws-codebuild-project-artifacts-unencrypted.tf +32 -0
  3094. package/semgrep-rules/terraform/aws/security/aws-codebuild-project-artifacts-unencrypted.yaml +51 -0
  3095. package/semgrep-rules/terraform/aws/security/aws-codebuild-project-unencrypted.tf +59 -0
  3096. package/semgrep-rules/terraform/aws/security/aws-codebuild-project-unencrypted.yaml +34 -0
  3097. package/semgrep-rules/terraform/aws/security/aws-config-aggregator-not-all-regions.tf +39 -0
  3098. package/semgrep-rules/terraform/aws/security/aws-config-aggregator-not-all-regions.yaml +45 -0
  3099. package/semgrep-rules/terraform/aws/security/aws-db-instance-no-logging.tf +41 -0
  3100. package/semgrep-rules/terraform/aws/security/aws-db-instance-no-logging.yaml +33 -0
  3101. package/semgrep-rules/terraform/aws/security/aws-docdb-encrypted-with-cmk.tf +19 -0
  3102. package/semgrep-rules/terraform/aws/security/aws-docdb-encrypted-with-cmk.yaml +34 -0
  3103. package/semgrep-rules/terraform/aws/security/aws-documentdb-auditing-disabled.tf +34 -0
  3104. package/semgrep-rules/terraform/aws/security/aws-documentdb-auditing-disabled.yaml +37 -0
  3105. package/semgrep-rules/terraform/aws/security/aws-documentdb-storage-unencrypted.tf +34 -0
  3106. package/semgrep-rules/terraform/aws/security/aws-documentdb-storage-unencrypted.yaml +37 -0
  3107. package/semgrep-rules/terraform/aws/security/aws-dynamodb-point-in-time-recovery-disabled.tf +40 -0
  3108. package/semgrep-rules/terraform/aws/security/aws-dynamodb-point-in-time-recovery-disabled.yaml +41 -0
  3109. package/semgrep-rules/terraform/aws/security/aws-dynamodb-table-unencrypted.tf +73 -0
  3110. package/semgrep-rules/terraform/aws/security/aws-dynamodb-table-unencrypted.yaml +39 -0
  3111. package/semgrep-rules/terraform/aws/security/aws-ebs-snapshot-encrypted-with-cmk.tf +20 -0
  3112. package/semgrep-rules/terraform/aws/security/aws-ebs-snapshot-encrypted-with-cmk.yaml +37 -0
  3113. package/semgrep-rules/terraform/aws/security/aws-ebs-unencrypted.tf +14 -0
  3114. package/semgrep-rules/terraform/aws/security/aws-ebs-unencrypted.yaml +28 -0
  3115. package/semgrep-rules/terraform/aws/security/aws-ebs-volume-encrypted-with-cmk.tf +20 -0
  3116. package/semgrep-rules/terraform/aws/security/aws-ebs-volume-encrypted-with-cmk.yaml +37 -0
  3117. package/semgrep-rules/terraform/aws/security/aws-ebs-volume-unencrypted.tf +16 -0
  3118. package/semgrep-rules/terraform/aws/security/aws-ebs-volume-unencrypted.yaml +39 -0
  3119. package/semgrep-rules/terraform/aws/security/aws-ec2-has-public-ip.tf +53 -0
  3120. package/semgrep-rules/terraform/aws/security/aws-ec2-has-public-ip.yaml +43 -0
  3121. package/semgrep-rules/terraform/aws/security/aws-ec2-launch-configuration-ebs-block-device-unencrypted.tf +84 -0
  3122. package/semgrep-rules/terraform/aws/security/aws-ec2-launch-configuration-ebs-block-device-unencrypted.yaml +45 -0
  3123. package/semgrep-rules/terraform/aws/security/aws-ec2-launch-configuration-root-block-device-unencrypted.tf +40 -0
  3124. package/semgrep-rules/terraform/aws/security/aws-ec2-launch-configuration-root-block-device-unencrypted.yml +45 -0
  3125. package/semgrep-rules/terraform/aws/security/aws-ec2-launch-template-metadata-service-v1-enabled.tf +72 -0
  3126. package/semgrep-rules/terraform/aws/security/aws-ec2-launch-template-metadata-service-v1-enabled.yaml +53 -0
  3127. package/semgrep-rules/terraform/aws/security/aws-ec2-security-group-allows-public-ingress.tf +1880 -0
  3128. package/semgrep-rules/terraform/aws/security/aws-ec2-security-group-allows-public-ingress.yaml +87 -0
  3129. package/semgrep-rules/terraform/aws/security/aws-ec2-security-group-rule-missing-description.tf +208 -0
  3130. package/semgrep-rules/terraform/aws/security/aws-ec2-security-group-rule-missing-description.yaml +97 -0
  3131. package/semgrep-rules/terraform/aws/security/aws-ecr-image-scanning-disabled.tf +22 -0
  3132. package/semgrep-rules/terraform/aws/security/aws-ecr-image-scanning-disabled.yaml +42 -0
  3133. package/semgrep-rules/terraform/aws/security/aws-ecr-mutable-image-tags.tf +16 -0
  3134. package/semgrep-rules/terraform/aws/security/aws-ecr-mutable-image-tags.yaml +38 -0
  3135. package/semgrep-rules/terraform/aws/security/aws-ecr-repository-wildcard-principal.tf +370 -0
  3136. package/semgrep-rules/terraform/aws/security/aws-ecr-repository-wildcard-principal.yaml +65 -0
  3137. package/semgrep-rules/terraform/aws/security/aws-efs-filesystem-encrypted-with-cmk.tf +8 -0
  3138. package/semgrep-rules/terraform/aws/security/aws-efs-filesystem-encrypted-with-cmk.yaml +37 -0
  3139. package/semgrep-rules/terraform/aws/security/aws-elasticsearch-insecure-tls-version.tf +17 -0
  3140. package/semgrep-rules/terraform/aws/security/aws-elasticsearch-insecure-tls-version.yaml +35 -0
  3141. package/semgrep-rules/terraform/aws/security/aws-elasticsearch-nodetonode-encryption.tf +73 -0
  3142. package/semgrep-rules/terraform/aws/security/aws-elasticsearch-nodetonode-encryption.yaml +61 -0
  3143. package/semgrep-rules/terraform/aws/security/aws-elb-access-logs-not-enabled.tf +91 -0
  3144. package/semgrep-rules/terraform/aws/security/aws-elb-access-logs-not-enabled.yaml +50 -0
  3145. package/semgrep-rules/terraform/aws/security/aws-emr-encrypted-with-cmk.tf +45 -0
  3146. package/semgrep-rules/terraform/aws/security/aws-emr-encrypted-with-cmk.yaml +35 -0
  3147. package/semgrep-rules/terraform/aws/security/aws-fsx-lustre-file-system.tf +14 -0
  3148. package/semgrep-rules/terraform/aws/security/aws-fsx-lustre-files-ystem.yaml +36 -0
  3149. package/semgrep-rules/terraform/aws/security/aws-fsx-lustre-filesystem-encrypted-with-cmk.tf +14 -0
  3150. package/semgrep-rules/terraform/aws/security/aws-fsx-lustre-filesystem-encrypted-with-cmk.yaml +35 -0
  3151. package/semgrep-rules/terraform/aws/security/aws-fsx-ontapfs-encrypted-with-cmk.tf +16 -0
  3152. package/semgrep-rules/terraform/aws/security/aws-fsx-ontapfs-encrypted-with-cmk.yaml +34 -0
  3153. package/semgrep-rules/terraform/aws/security/aws-fsx-windows-encrypted-with-cmk.tf +16 -0
  3154. package/semgrep-rules/terraform/aws/security/aws-fsx-windows-encrypted-with-cmk.yaml +34 -0
  3155. package/semgrep-rules/terraform/aws/security/aws-glacier-vault-any-principal.tf +154 -0
  3156. package/semgrep-rules/terraform/aws/security/aws-glacier-vault-any-principal.yaml +45 -0
  3157. package/semgrep-rules/terraform/aws/security/aws-iam-admin-policy-ssoadmin.tf +58 -0
  3158. package/semgrep-rules/terraform/aws/security/aws-iam-admin-policy-ssoadmin.yaml +44 -0
  3159. package/semgrep-rules/terraform/aws/security/aws-iam-admin-policy.tf +139 -0
  3160. package/semgrep-rules/terraform/aws/security/aws-iam-admin-policy.yaml +45 -0
  3161. package/semgrep-rules/terraform/aws/security/aws-imagebuilder-component-encrypted-with-cmk.tf +41 -0
  3162. package/semgrep-rules/terraform/aws/security/aws-imagebuilder-component-encrypted-with-cmk.yaml +34 -0
  3163. package/semgrep-rules/terraform/aws/security/aws-insecure-api-gateway-tls-version.tf +25 -0
  3164. package/semgrep-rules/terraform/aws/security/aws-insecure-api-gateway-tls-version.yaml +53 -0
  3165. package/semgrep-rules/terraform/aws/security/aws-insecure-redshift-ssl-configuration.tf +53 -0
  3166. package/semgrep-rules/terraform/aws/security/aws-insecure-redshift-ssl-configuration.yaml +47 -0
  3167. package/semgrep-rules/terraform/aws/security/aws-kinesis-stream-encrypted-with-cmk.tf +12 -0
  3168. package/semgrep-rules/terraform/aws/security/aws-kinesis-stream-encrypted-with-cmk.yaml +34 -0
  3169. package/semgrep-rules/terraform/aws/security/aws-kinesis-stream-unencrypted.tf +28 -0
  3170. package/semgrep-rules/terraform/aws/security/aws-kinesis-stream-unencrypted.yaml +40 -0
  3171. package/semgrep-rules/terraform/aws/security/aws-kinesis-video-stream-encrypted-with-cmk.tf +14 -0
  3172. package/semgrep-rules/terraform/aws/security/aws-kinesis-video-stream-encrypted-with-cmk.yaml +34 -0
  3173. package/semgrep-rules/terraform/aws/security/aws-kms-key-wildcard-principal.tf +184 -0
  3174. package/semgrep-rules/terraform/aws/security/aws-kms-key-wildcard-principal.yaml +46 -0
  3175. package/semgrep-rules/terraform/aws/security/aws-kms-no-rotation.tf +42 -0
  3176. package/semgrep-rules/terraform/aws/security/aws-kms-no-rotation.yaml +54 -0
  3177. package/semgrep-rules/terraform/aws/security/aws-lambda-environment-credentials.tf +37 -0
  3178. package/semgrep-rules/terraform/aws/security/aws-lambda-environment-credentials.yaml +49 -0
  3179. package/semgrep-rules/terraform/aws/security/aws-lambda-environment-unencrypted.tf +75 -0
  3180. package/semgrep-rules/terraform/aws/security/aws-lambda-environment-unencrypted.yaml +49 -0
  3181. package/semgrep-rules/terraform/aws/security/aws-lambda-permission-unrestricted-source-arn.tf +64 -0
  3182. package/semgrep-rules/terraform/aws/security/aws-lambda-permission-unrestricted-source-arn.yaml +45 -0
  3183. package/semgrep-rules/terraform/aws/security/aws-lambda-x-ray-tracing-not-active.tf +26 -0
  3184. package/semgrep-rules/terraform/aws/security/aws-lambda-x-ray-tracing-not-active.yaml +42 -0
  3185. package/semgrep-rules/terraform/aws/security/aws-network-acl-allows-all-ports.tf +529 -0
  3186. package/semgrep-rules/terraform/aws/security/aws-network-acl-allows-all-ports.yaml +63 -0
  3187. package/semgrep-rules/terraform/aws/security/aws-network-acl-allows-public-ingress.tf +1667 -0
  3188. package/semgrep-rules/terraform/aws/security/aws-network-acl-allows-public-ingress.yaml +86 -0
  3189. package/semgrep-rules/terraform/aws/security/aws-opensearchserverless-encrypted-with-cmk.tf +84 -0
  3190. package/semgrep-rules/terraform/aws/security/aws-opensearchserverless-encrypted-with-cmk.yaml +45 -0
  3191. package/semgrep-rules/terraform/aws/security/aws-provider-static-credentials.tf +23 -0
  3192. package/semgrep-rules/terraform/aws/security/aws-provider-static-credentials.yaml +37 -0
  3193. package/semgrep-rules/terraform/aws/security/aws-provisioner-exec.tf +71 -0
  3194. package/semgrep-rules/terraform/aws/security/aws-provisioner-exec.yaml +41 -0
  3195. package/semgrep-rules/terraform/aws/security/aws-rds-backup-no-retention.tf +21 -0
  3196. package/semgrep-rules/terraform/aws/security/aws-rds-backup-no-retention.yaml +36 -0
  3197. package/semgrep-rules/terraform/aws/security/aws-redshift-cluster-encrypted-with-cmk.tf +26 -0
  3198. package/semgrep-rules/terraform/aws/security/aws-redshift-cluster-encrypted-with-cmk.yaml +35 -0
  3199. package/semgrep-rules/terraform/aws/security/aws-s3-bucket-object-encrypted-with-cmk.tf +15 -0
  3200. package/semgrep-rules/terraform/aws/security/aws-s3-bucket-object-encrypted-with-cmk.yaml +34 -0
  3201. package/semgrep-rules/terraform/aws/security/aws-s3-object-copy-encrypted-with-cmk.tf +14 -0
  3202. package/semgrep-rules/terraform/aws/security/aws-s3-object-copy-encrypted-with-cmk.yaml +34 -0
  3203. package/semgrep-rules/terraform/aws/security/aws-sagemaker-domain-encrypted-with-cmk.tf +30 -0
  3204. package/semgrep-rules/terraform/aws/security/aws-sagemaker-domain-encrypted-with-cmk.yaml +34 -0
  3205. package/semgrep-rules/terraform/aws/security/aws-secretsmanager-secret-unencrypted.tf +24 -0
  3206. package/semgrep-rules/terraform/aws/security/aws-secretsmanager-secret-unencrypted.yaml +36 -0
  3207. package/semgrep-rules/terraform/aws/security/aws-sns-topic-unencrypted.tf +6 -0
  3208. package/semgrep-rules/terraform/aws/security/aws-sns-topic-unencrypted.yaml +37 -0
  3209. package/semgrep-rules/terraform/aws/security/aws-sqs-queue-policy-wildcard-action.tf +855 -0
  3210. package/semgrep-rules/terraform/aws/security/aws-sqs-queue-policy-wildcard-action.yaml +71 -0
  3211. package/semgrep-rules/terraform/aws/security/aws-sqs-queue-policy-wildcard-principal.tf +725 -0
  3212. package/semgrep-rules/terraform/aws/security/aws-sqs-queue-policy-wildcard-principal.yaml +72 -0
  3213. package/semgrep-rules/terraform/aws/security/aws-sqs-queue-unencrypted.tf +23 -0
  3214. package/semgrep-rules/terraform/aws/security/aws-sqs-queue-unencrypted.yaml +45 -0
  3215. package/semgrep-rules/terraform/aws/security/aws-ssm-document-logging-issues.tf +287 -0
  3216. package/semgrep-rules/terraform/aws/security/aws-ssm-document-logging-issues.yaml +42 -0
  3217. package/semgrep-rules/terraform/aws/security/aws-subnet-has-public-ip-address.tf +33 -0
  3218. package/semgrep-rules/terraform/aws/security/aws-subnet-has-public-ip-address.yaml +46 -0
  3219. package/semgrep-rules/terraform/aws/security/aws-timestream-database-encrypted-with-cmk.tf +13 -0
  3220. package/semgrep-rules/terraform/aws/security/aws-timestream-database-encrypted-with-cmk.yaml +34 -0
  3221. package/semgrep-rules/terraform/aws/security/aws-transfer-server-is-public.tf +18 -0
  3222. package/semgrep-rules/terraform/aws/security/aws-transfer-server-is-public.yaml +36 -0
  3223. package/semgrep-rules/terraform/aws/security/aws-workspaces-root-volume-unencrypted.tf +38 -0
  3224. package/semgrep-rules/terraform/aws/security/aws-workspaces-root-volume-unencrypted.yaml +34 -0
  3225. package/semgrep-rules/terraform/aws/security/aws-workspaces-user-volume-unencrypted.tf +34 -0
  3226. package/semgrep-rules/terraform/aws/security/aws-workspaces-user-volume-unencrypted.yaml +33 -0
  3227. package/semgrep-rules/terraform/aws/security/insecure-load-balancer-tls-version.tf +222 -0
  3228. package/semgrep-rules/terraform/aws/security/insecure-load-balancer-tls-version.yaml +62 -0
  3229. package/semgrep-rules/terraform/aws/security/missing-athena-workgroup-encryption.tf +31 -0
  3230. package/semgrep-rules/terraform/aws/security/missing-athena-workgroup-encryption.yaml +34 -0
  3231. package/semgrep-rules/terraform/aws/security/unrestricted-github-oidc-policy.tf +32 -0
  3232. package/semgrep-rules/terraform/aws/security/unrestricted-github-oidc-policy.yaml +50 -0
  3233. package/semgrep-rules/terraform/aws/security/wildcard-assume-role.tf +39 -0
  3234. package/semgrep-rules/terraform/aws/security/wildcard-assume-role.yaml +38 -0
  3235. package/semgrep-rules/terraform/azure/best-practice/azure-ad-used-auth-service-fabric.tf +41 -0
  3236. package/semgrep-rules/terraform/azure/best-practice/azure-ad-used-auth-service-fabric.yaml +25 -0
  3237. package/semgrep-rules/terraform/azure/best-practice/azure-aks-uses-azure-policies-addon.tf +105 -0
  3238. package/semgrep-rules/terraform/azure/best-practice/azure-aks-uses-azure-policies-addon.yaml +27 -0
  3239. package/semgrep-rules/terraform/azure/best-practice/azure-appgateway-enables-waf.tf +173 -0
  3240. package/semgrep-rules/terraform/azure/best-practice/azure-appgateway-enables-waf.yaml +25 -0
  3241. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-dotnet-framework-version.tf +39 -0
  3242. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-dotnet-framework-version.yaml +27 -0
  3243. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-ftps-state.tf +45 -0
  3244. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-ftps-state.yaml +33 -0
  3245. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-https-20-enabled.tf +20 -0
  3246. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-https-20-enabled.yaml +25 -0
  3247. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-java-version.tf +26 -0
  3248. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-java-version.yaml +27 -0
  3249. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-php-version.tf +26 -0
  3250. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-php-version.yaml +27 -0
  3251. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-python-version.tf +26 -0
  3252. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-python-version.yaml +27 -0
  3253. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-used-azure-files.tf +45 -0
  3254. package/semgrep-rules/terraform/azure/best-practice/azure-appservice-used-azure-files.yaml +27 -0
  3255. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-appservices.tf +12 -0
  3256. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-appservices.yaml +27 -0
  3257. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-container-registry.tf +12 -0
  3258. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-container-registry.yaml +27 -0
  3259. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-keyvaults.tf +12 -0
  3260. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-keyvaults.yaml +27 -0
  3261. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-kubernetes.tf +12 -0
  3262. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-kubernetes.yaml +27 -0
  3263. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-servers.tf +12 -0
  3264. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-servers.yaml +27 -0
  3265. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-sqlservers-vms.tf +12 -0
  3266. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-sqlservers-vms.yaml +27 -0
  3267. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-sqlservers.tf +12 -0
  3268. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-sqlservers.yaml +27 -0
  3269. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-storage.tf +12 -0
  3270. package/semgrep-rules/terraform/azure/best-practice/azure-defenderon-storage.yaml +27 -0
  3271. package/semgrep-rules/terraform/azure/best-practice/azure-frontdoor-enables-waf.tf +93 -0
  3272. package/semgrep-rules/terraform/azure/best-practice/azure-frontdoor-enables-waf.yaml +23 -0
  3273. package/semgrep-rules/terraform/azure/best-practice/azure-frontdoor-use-wafmode.tf +512 -0
  3274. package/semgrep-rules/terraform/azure/best-practice/azure-frontdoor-use-wafmode.yaml +23 -0
  3275. package/semgrep-rules/terraform/azure/best-practice/azure-functionapp-http-version-latest.tf +40 -0
  3276. package/semgrep-rules/terraform/azure/best-practice/azure-functionapp-http-version-latest.yaml +27 -0
  3277. package/semgrep-rules/terraform/azure/best-practice/azure-functionapps-accessible-over-https.tf +27 -0
  3278. package/semgrep-rules/terraform/azure/best-practice/azure-functionapps-accessible-over-https.yaml +23 -0
  3279. package/semgrep-rules/terraform/azure/best-practice/azure-keyvault-enables-firewall-rules-settings.tf +97 -0
  3280. package/semgrep-rules/terraform/azure/best-practice/azure-keyvault-enables-firewall-rules-settings.yaml +27 -0
  3281. package/semgrep-rules/terraform/azure/best-practice/azure-keyvault-enables-purge-protection.tf +90 -0
  3282. package/semgrep-rules/terraform/azure/best-practice/azure-keyvault-enables-purge-protection.yaml +22 -0
  3283. package/semgrep-rules/terraform/azure/best-practice/azure-keyvault-enables-soft-delete.tf +90 -0
  3284. package/semgrep-rules/terraform/azure/best-practice/azure-keyvault-enables-soft-delete.yaml +19 -0
  3285. package/semgrep-rules/terraform/azure/best-practice/azure-keyvault-recovery-enabled.tf +45 -0
  3286. package/semgrep-rules/terraform/azure/best-practice/azure-keyvault-recovery-enabled.yaml +24 -0
  3287. package/semgrep-rules/terraform/azure/best-practice/azure-mariadb-geo-backup-enabled.tf +51 -0
  3288. package/semgrep-rules/terraform/azure/best-practice/azure-mariadb-geo-backup-enabled.yaml +23 -0
  3289. package/semgrep-rules/terraform/azure/best-practice/azure-mariadb-sslenforcement-enabled.tf +34 -0
  3290. package/semgrep-rules/terraform/azure/best-practice/azure-mariadb-sslenforcement-enabled.yaml +23 -0
  3291. package/semgrep-rules/terraform/azure/best-practice/azure-monitor-log-profile-categories.tf +63 -0
  3292. package/semgrep-rules/terraform/azure/best-practice/azure-monitor-log-profile-categories.yaml +27 -0
  3293. package/semgrep-rules/terraform/azure/best-practice/azure-monitor-log-profile-retention-days.tf +69 -0
  3294. package/semgrep-rules/terraform/azure/best-practice/azure-monitor-log-profile-retention-days.yaml +39 -0
  3295. package/semgrep-rules/terraform/azure/best-practice/azure-mysql-geo-backup-enabled.tf +56 -0
  3296. package/semgrep-rules/terraform/azure/best-practice/azure-mysql-geo-backup-enabled.yaml +23 -0
  3297. package/semgrep-rules/terraform/azure/best-practice/azure-mysql-server-tlsenforcement-enabled.tf +44 -0
  3298. package/semgrep-rules/terraform/azure/best-practice/azure-mysql-server-tlsenforcement-enabled.yaml +23 -0
  3299. package/semgrep-rules/terraform/azure/best-practice/azure-mysql-threat-detection-enabled.tf +74 -0
  3300. package/semgrep-rules/terraform/azure/best-practice/azure-mysql-threat-detection-enabled.yaml +27 -0
  3301. package/semgrep-rules/terraform/azure/best-practice/azure-networkinterface-enable-ip-forwarding.tf +41 -0
  3302. package/semgrep-rules/terraform/azure/best-practice/azure-networkinterface-enable-ip-forwarding.yaml +31 -0
  3303. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-flexi-server-geo-backup-enabled.tf +62 -0
  3304. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-flexi-server-geo-backup-enabled.yaml +23 -0
  3305. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-geo-backup-enabled.tf +64 -0
  3306. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-geo-backup-enabled.yaml +23 -0
  3307. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-server-connection-throttling-enabled.tf +16 -0
  3308. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-server-connection-throttling-enabled.yaml +24 -0
  3309. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-server-log-checkpoint-enabled.tf +16 -0
  3310. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-server-log-checkpoint-enabled.yaml +24 -0
  3311. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-server-log-connections-enabled.tf +16 -0
  3312. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-server-log-connections-enabled.yaml +24 -0
  3313. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-ssl-enforcement-enabled.tf +44 -0
  3314. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-ssl-enforcement-enabled.yaml +23 -0
  3315. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-threat-detection-enabled.tf +74 -0
  3316. package/semgrep-rules/terraform/azure/best-practice/azure-postgresql-threat-detection-enabled.yaml +27 -0
  3317. package/semgrep-rules/terraform/azure/best-practice/azure-secret-content-type.tf +24 -0
  3318. package/semgrep-rules/terraform/azure/best-practice/azure-secret-content-type.yaml +23 -0
  3319. package/semgrep-rules/terraform/azure/best-practice/azure-secret-expiration-date.tf +23 -0
  3320. package/semgrep-rules/terraform/azure/best-practice/azure-secret-expiration-date.yaml +23 -0
  3321. package/semgrep-rules/terraform/azure/best-practice/azure-securitcenter-email-alert.tf +13 -0
  3322. package/semgrep-rules/terraform/azure/best-practice/azure-securitcenter-email-alert.yaml +23 -0
  3323. package/semgrep-rules/terraform/azure/best-practice/azure-securitycenter-contact-emails.tf +17 -0
  3324. package/semgrep-rules/terraform/azure/best-practice/azure-securitycenter-contact-emails.yaml +23 -0
  3325. package/semgrep-rules/terraform/azure/best-practice/azure-securitycenter-contact-phone.tf +11 -0
  3326. package/semgrep-rules/terraform/azure/best-practice/azure-securitycenter-contact-phone.yaml +23 -0
  3327. package/semgrep-rules/terraform/azure/best-practice/azure-securitycenter-email-alert-admins.tf +14 -0
  3328. package/semgrep-rules/terraform/azure/best-practice/azure-securitycenter-email-alert-admins.yaml +23 -0
  3329. package/semgrep-rules/terraform/azure/best-practice/azure-securitycenter-standard-pricing.tf +10 -0
  3330. package/semgrep-rules/terraform/azure/best-practice/azure-securitycenter-standard-pricing.yaml +23 -0
  3331. package/semgrep-rules/terraform/azure/best-practice/azure-sqlserver-email-alerts-enabled.tf +26 -0
  3332. package/semgrep-rules/terraform/azure/best-practice/azure-sqlserver-email-alerts-enabled.yaml +24 -0
  3333. package/semgrep-rules/terraform/azure/best-practice/azure-sqlserver-email-alerts-toadmins-enabled.tf +27 -0
  3334. package/semgrep-rules/terraform/azure/best-practice/azure-sqlserver-email-alerts-toadmins-enabled.yaml +24 -0
  3335. package/semgrep-rules/terraform/azure/best-practice/azure-sqlserver-threat-detection-types.tf +25 -0
  3336. package/semgrep-rules/terraform/azure/best-practice/azure-sqlserver-threat-detection-types.yaml +24 -0
  3337. package/semgrep-rules/terraform/azure/best-practice/azure-storage-account-enables-secure-transfer.tf +40 -0
  3338. package/semgrep-rules/terraform/azure/best-practice/azure-storage-account-enables-secure-transfer.yaml +19 -0
  3339. package/semgrep-rules/terraform/azure/best-practice/azure-synapse-workscape-enables-managed-virtual-network.tf +60 -0
  3340. package/semgrep-rules/terraform/azure/best-practice/azure-synapse-workscape-enables-managed-virtual-network.yaml +23 -0
  3341. package/semgrep-rules/terraform/azure/best-practice/azure-vmscale-sets-auto-os-image-patching-enabled.tf +488 -0
  3342. package/semgrep-rules/terraform/azure/best-practice/azure-vmscale-sets-auto-os-image-patching-enabled.yaml +28 -0
  3343. package/semgrep-rules/terraform/azure/best-practice/azure-waf-specificed-mode-app-gw.tf +512 -0
  3344. package/semgrep-rules/terraform/azure/best-practice/azure-waf-specificed-mode-app-gw.yaml +21 -0
  3345. package/semgrep-rules/terraform/azure/security/aks/azure-aks-apiserver-auth-ip-ranges.tf +59 -0
  3346. package/semgrep-rules/terraform/azure/security/aks/azure-aks-apiserver-auth-ip-ranges.yaml +35 -0
  3347. package/semgrep-rules/terraform/azure/security/aks/azure-aks-private-clusters-enabled.tf +67 -0
  3348. package/semgrep-rules/terraform/azure/security/aks/azure-aks-private-clusters-enabled.yaml +35 -0
  3349. package/semgrep-rules/terraform/azure/security/aks/azure-aks-uses-disk-encryptionset.tf +45 -0
  3350. package/semgrep-rules/terraform/azure/security/aks/azure-aks-uses-disk-encryptionset.yaml +34 -0
  3351. package/semgrep-rules/terraform/azure/security/apiservice/azure-apiservices-use-virtualnetwork.tf +48 -0
  3352. package/semgrep-rules/terraform/azure/security/apiservice/azure-apiservices-use-virtualnetwork.yaml +37 -0
  3353. package/semgrep-rules/terraform/azure/security/appservice/appservice-account-identity-registered.tf +53 -0
  3354. package/semgrep-rules/terraform/azure/security/appservice/appservice-account-identity-registered.yaml +50 -0
  3355. package/semgrep-rules/terraform/azure/security/appservice/appservice-authentication-enabled.tf +31 -0
  3356. package/semgrep-rules/terraform/azure/security/appservice/appservice-authentication-enabled.yaml +53 -0
  3357. package/semgrep-rules/terraform/azure/security/appservice/appservice-enable-http2.tf +28 -0
  3358. package/semgrep-rules/terraform/azure/security/appservice/appservice-enable-http2.yaml +51 -0
  3359. package/semgrep-rules/terraform/azure/security/appservice/appservice-enable-https-only.tf +24 -0
  3360. package/semgrep-rules/terraform/azure/security/appservice/appservice-enable-https-only.yaml +45 -0
  3361. package/semgrep-rules/terraform/azure/security/appservice/appservice-require-client-cert.tf +28 -0
  3362. package/semgrep-rules/terraform/azure/security/appservice/appservice-require-client-cert.yaml +44 -0
  3363. package/semgrep-rules/terraform/azure/security/appservice/appservice-use-secure-tls-policy.tf +54 -0
  3364. package/semgrep-rules/terraform/azure/security/appservice/appservice-use-secure-tls-policy.yaml +32 -0
  3365. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-auth.tf +23 -0
  3366. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-auth.yaml +39 -0
  3367. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-client-certificate.tf +17 -0
  3368. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-client-certificate.yaml +35 -0
  3369. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-detailed-errormessages-enabled.tf +145 -0
  3370. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-detailed-errormessages-enabled.yaml +39 -0
  3371. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-disallowed-cors.tf +75 -0
  3372. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-disallowed-cors.yaml +30 -0
  3373. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-enabled-failed-request.tf +62 -0
  3374. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-enabled-failed-request.yaml +39 -0
  3375. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-http-logging-enabled.tf +195 -0
  3376. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-http-logging-enabled.yaml +51 -0
  3377. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-https-only.tf +17 -0
  3378. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-https-only.yaml +35 -0
  3379. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-identity.tf +21 -0
  3380. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-identity.yaml +38 -0
  3381. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-identityprovider-enabled.tf +39 -0
  3382. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-identityprovider-enabled.yaml +39 -0
  3383. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-min-tls-version.tf +19 -0
  3384. package/semgrep-rules/terraform/azure/security/appservice/azure-appservice-min-tls-version.yaml +34 -0
  3385. package/semgrep-rules/terraform/azure/security/azure-automation-encrypted.tf +27 -0
  3386. package/semgrep-rules/terraform/azure/security/azure-automation-encrypted.yaml +54 -0
  3387. package/semgrep-rules/terraform/azure/security/azure-batchaccount-uses-keyvault-encrpytion.tf +30 -0
  3388. package/semgrep-rules/terraform/azure/security/azure-batchaccount-uses-keyvault-encrpytion.yaml +36 -0
  3389. package/semgrep-rules/terraform/azure/security/azure-cognitiveservices-disables-public-network.tf +30 -0
  3390. package/semgrep-rules/terraform/azure/security/azure-cognitiveservices-disables-public-network.yaml +35 -0
  3391. package/semgrep-rules/terraform/azure/security/azure-containergroup-deployed-into-virtualnetwork.tf +60 -0
  3392. package/semgrep-rules/terraform/azure/security/azure-containergroup-deployed-into-virtualnetwork.yaml +42 -0
  3393. package/semgrep-rules/terraform/azure/security/azure-cosmosdb-accounts-restricted-access.tf +401 -0
  3394. package/semgrep-rules/terraform/azure/security/azure-cosmosdb-accounts-restricted-access.yaml +49 -0
  3395. package/semgrep-rules/terraform/azure/security/azure-cosmosdb-disable-access-key-write.tf +13 -0
  3396. package/semgrep-rules/terraform/azure/security/azure-cosmosdb-disable-access-key-write.yaml +35 -0
  3397. package/semgrep-rules/terraform/azure/security/azure-cosmosdb-disables-public-network.tf +124 -0
  3398. package/semgrep-rules/terraform/azure/security/azure-cosmosdb-disables-public-network.yaml +35 -0
  3399. package/semgrep-rules/terraform/azure/security/azure-cosmosdb-have-cmk.tf +80 -0
  3400. package/semgrep-rules/terraform/azure/security/azure-cosmosdb-have-cmk.yaml +34 -0
  3401. package/semgrep-rules/terraform/azure/security/azure-customrole-definition-subscription-owner.tf +70 -0
  3402. package/semgrep-rules/terraform/azure/security/azure-customrole-definition-subscription-owner.yaml +33 -0
  3403. package/semgrep-rules/terraform/azure/security/azure-dataexplorer-double-encryption-enabled.tf +52 -0
  3404. package/semgrep-rules/terraform/azure/security/azure-dataexplorer-double-encryption-enabled.yaml +34 -0
  3405. package/semgrep-rules/terraform/azure/security/azure-dataexplorer-uses-disk-encryption.tf +50 -0
  3406. package/semgrep-rules/terraform/azure/security/azure-dataexplorer-uses-disk-encryption.yaml +34 -0
  3407. package/semgrep-rules/terraform/azure/security/azure-datafactory-no-public-network-access.tf +24 -0
  3408. package/semgrep-rules/terraform/azure/security/azure-datafactory-no-public-network-access.yaml +35 -0
  3409. package/semgrep-rules/terraform/azure/security/azure-datafactory-uses-git-repository.tf +38 -0
  3410. package/semgrep-rules/terraform/azure/security/azure-datafactory-uses-git-repository.yaml +45 -0
  3411. package/semgrep-rules/terraform/azure/security/azure-datalake-store-encryption.tf +25 -0
  3412. package/semgrep-rules/terraform/azure/security/azure-datalake-store-encryption.yaml +34 -0
  3413. package/semgrep-rules/terraform/azure/security/azure-eventgrid-domain-network-access.tf +26 -0
  3414. package/semgrep-rules/terraform/azure/security/azure-eventgrid-domain-network-access.yaml +35 -0
  3415. package/semgrep-rules/terraform/azure/security/azure-functionapp-disallow-cors.tf +40 -0
  3416. package/semgrep-rules/terraform/azure/security/azure-functionapp-disallow-cors.yaml +29 -0
  3417. package/semgrep-rules/terraform/azure/security/azure-functionapps-enable-auth.tf +37 -0
  3418. package/semgrep-rules/terraform/azure/security/azure-functionapps-enable-auth.yaml +39 -0
  3419. package/semgrep-rules/terraform/azure/security/azure-instance-extensions.tf +125 -0
  3420. package/semgrep-rules/terraform/azure/security/azure-instance-extensions.yaml +46 -0
  3421. package/semgrep-rules/terraform/azure/security/azure-iot-no-public-network-access.tf +164 -0
  3422. package/semgrep-rules/terraform/azure/security/azure-iot-no-public-network-access.yaml +31 -0
  3423. package/semgrep-rules/terraform/azure/security/azure-key-backedby-hsm.tf +53 -0
  3424. package/semgrep-rules/terraform/azure/security/azure-key-backedby-hsm.yaml +40 -0
  3425. package/semgrep-rules/terraform/azure/security/azure-key-no-expiration-date.tf +35 -0
  3426. package/semgrep-rules/terraform/azure/security/azure-key-no-expiration-date.yaml +34 -0
  3427. package/semgrep-rules/terraform/azure/security/azure-managed-disk-encryption-set.tf +27 -0
  3428. package/semgrep-rules/terraform/azure/security/azure-managed-disk-encryption-set.yaml +35 -0
  3429. package/semgrep-rules/terraform/azure/security/azure-managed-disk-encryption.tf +56 -0
  3430. package/semgrep-rules/terraform/azure/security/azure-managed-disk-encryption.yaml +34 -0
  3431. package/semgrep-rules/terraform/azure/security/azure-mariadb-public-access-disabled.tf +34 -0
  3432. package/semgrep-rules/terraform/azure/security/azure-mariadb-public-access-disabled.yaml +35 -0
  3433. package/semgrep-rules/terraform/azure/security/azure-monitor-log-profile-retention-days.tf +73 -0
  3434. package/semgrep-rules/terraform/azure/security/azure-monitor-log-profile-retention-days.yaml +39 -0
  3435. package/semgrep-rules/terraform/azure/security/azure-mssql-service-mintls-version.tf +32 -0
  3436. package/semgrep-rules/terraform/azure/security/azure-mssql-service-mintls-version.yaml +34 -0
  3437. package/semgrep-rules/terraform/azure/security/azure-mysql-encryption-enabled.tf +56 -0
  3438. package/semgrep-rules/terraform/azure/security/azure-mysql-encryption-enabled.yaml +34 -0
  3439. package/semgrep-rules/terraform/azure/security/azure-mysql-mintls-version.tf +44 -0
  3440. package/semgrep-rules/terraform/azure/security/azure-mysql-mintls-version.yaml +34 -0
  3441. package/semgrep-rules/terraform/azure/security/azure-mysql-public-access-disabled.tf +57 -0
  3442. package/semgrep-rules/terraform/azure/security/azure-mysql-public-access-disabled.yaml +35 -0
  3443. package/semgrep-rules/terraform/azure/security/azure-network-watcher-flowlog-period.tf +56 -0
  3444. package/semgrep-rules/terraform/azure/security/azure-network-watcher-flowlog-period.yaml +39 -0
  3445. package/semgrep-rules/terraform/azure/security/azure-postgresql-encryption-enabled.tf +56 -0
  3446. package/semgrep-rules/terraform/azure/security/azure-postgresql-encryption-enabled.yaml +34 -0
  3447. package/semgrep-rules/terraform/azure/security/azure-postgresql-min-tls-version.tf +44 -0
  3448. package/semgrep-rules/terraform/azure/security/azure-postgresql-min-tls-version.yaml +42 -0
  3449. package/semgrep-rules/terraform/azure/security/azure-postgresql-server-public-access-disabled.tf +65 -0
  3450. package/semgrep-rules/terraform/azure/security/azure-postgresql-server-public-access-disabled.yaml +35 -0
  3451. package/semgrep-rules/terraform/azure/security/azure-redis-cache-enable-non-ssl-port.tf +45 -0
  3452. package/semgrep-rules/terraform/azure/security/azure-redis-cache-enable-non-ssl-port.yaml +31 -0
  3453. package/semgrep-rules/terraform/azure/security/azure-redis-cache-public-network-access-enabled.tf +47 -0
  3454. package/semgrep-rules/terraform/azure/security/azure-redis-cache-public-network-access-enabled.yaml +35 -0
  3455. package/semgrep-rules/terraform/azure/security/azure-remote-debugging-not-enabled.tf +71 -0
  3456. package/semgrep-rules/terraform/azure/security/azure-remote-debugging-not-enabled.yaml +31 -0
  3457. package/semgrep-rules/terraform/azure/security/azure-scale-set-password.tf +29 -0
  3458. package/semgrep-rules/terraform/azure/security/azure-scale-set-password.yaml +35 -0
  3459. package/semgrep-rules/terraform/azure/security/azure-search-publicnetwork-access-disabled.tf +27 -0
  3460. package/semgrep-rules/terraform/azure/security/azure-search-publicnetwork-access-disabled.yaml +35 -0
  3461. package/semgrep-rules/terraform/azure/security/azure-service-fabric-cluster-protection-level.tf +45 -0
  3462. package/semgrep-rules/terraform/azure/security/azure-service-fabric-cluster-protection-level.yaml +43 -0
  3463. package/semgrep-rules/terraform/azure/security/azure-sqlserver-no-public-access.tf +27 -0
  3464. package/semgrep-rules/terraform/azure/security/azure-sqlserver-no-public-access.yaml +32 -0
  3465. package/semgrep-rules/terraform/azure/security/azure-sqlserver-public-access-disabled.tf +48 -0
  3466. package/semgrep-rules/terraform/azure/security/azure-sqlserver-public-access-disabled.yaml +35 -0
  3467. package/semgrep-rules/terraform/azure/security/azure-storage-account-disable-public-access.tf +42 -0
  3468. package/semgrep-rules/terraform/azure/security/azure-storage-account-disable-public-access.yaml +31 -0
  3469. package/semgrep-rules/terraform/azure/security/azure-storage-account-minimum-tlsversion.tf +61 -0
  3470. package/semgrep-rules/terraform/azure/security/azure-storage-account-minimum-tlsversion.yaml +41 -0
  3471. package/semgrep-rules/terraform/azure/security/azure-storage-blob-service-container-private-access.tf +14 -0
  3472. package/semgrep-rules/terraform/azure/security/azure-storage-blob-service-container-private-access.yaml +35 -0
  3473. package/semgrep-rules/terraform/azure/security/azure-storage-sync-public-access-disabled.tf +33 -0
  3474. package/semgrep-rules/terraform/azure/security/azure-storage-sync-public-access-disabled.yaml +35 -0
  3475. package/semgrep-rules/terraform/azure/security/azure-vmencryption-at-host-enabled.tf +211 -0
  3476. package/semgrep-rules/terraform/azure/security/azure-vmencryption-at-host-enabled.yaml +45 -0
  3477. package/semgrep-rules/terraform/azure/security/functionapp/functionapp-authentication-enabled.tf +31 -0
  3478. package/semgrep-rules/terraform/azure/security/functionapp/functionapp-authentication-enabled.yaml +53 -0
  3479. package/semgrep-rules/terraform/azure/security/functionapp/functionapp-enable-http2.tf +29 -0
  3480. package/semgrep-rules/terraform/azure/security/functionapp/functionapp-enable-http2.yaml +51 -0
  3481. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-content-type-for-secret.tf +13 -0
  3482. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-content-type-for-secret.yaml +26 -0
  3483. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-ensure-key-expires.tf +33 -0
  3484. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-ensure-key-expires.yaml +33 -0
  3485. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-ensure-secret-expires.tf +33 -0
  3486. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-ensure-secret-expires.yaml +33 -0
  3487. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-purge-enabled.tf +22 -0
  3488. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-purge-enabled.yaml +40 -0
  3489. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-specify-network-acl.tf +35 -0
  3490. package/semgrep-rules/terraform/azure/security/keyvault/keyvault-specify-network-acl.yaml +54 -0
  3491. package/semgrep-rules/terraform/azure/security/storage/storage-allow-microsoft-service-bypass.tf +63 -0
  3492. package/semgrep-rules/terraform/azure/security/storage/storage-allow-microsoft-service-bypass.yaml +63 -0
  3493. package/semgrep-rules/terraform/azure/security/storage/storage-default-action-deny.tf +16 -0
  3494. package/semgrep-rules/terraform/azure/security/storage/storage-default-action-deny.yaml +39 -0
  3495. package/semgrep-rules/terraform/azure/security/storage/storage-enforce-https.tf +20 -0
  3496. package/semgrep-rules/terraform/azure/security/storage/storage-enforce-https.yaml +39 -0
  3497. package/semgrep-rules/terraform/azure/security/storage/storage-queue-services-logging.tf +27 -0
  3498. package/semgrep-rules/terraform/azure/security/storage/storage-queue-services-logging.yaml +53 -0
  3499. package/semgrep-rules/terraform/azure/security/storage/storage-use-secure-tls-policy.tf +32 -0
  3500. package/semgrep-rules/terraform/azure/security/storage/storage-use-secure-tls-policy.yaml +45 -0
  3501. package/semgrep-rules/terraform/gcp/best-practice/gcp-compute-shielded-vm.tf +32 -0
  3502. package/semgrep-rules/terraform/gcp/best-practice/gcp-compute-shielded-vm.yaml +40 -0
  3503. package/semgrep-rules/terraform/gcp/best-practice/gcp-compute-template-shielded-vm.tf +29 -0
  3504. package/semgrep-rules/terraform/gcp/best-practice/gcp-compute-template-shielded-vm.yaml +25 -0
  3505. package/semgrep-rules/terraform/gcp/best-practice/gcp-dnssec-enabled.tf +28 -0
  3506. package/semgrep-rules/terraform/gcp/best-practice/gcp-dnssec-enabled.yaml +25 -0
  3507. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-alias-ip-enabled.tf +15 -0
  3508. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-alias-ip-enabled.yaml +27 -0
  3509. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-binary-authorization.tf +231 -0
  3510. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-binary-authorization.yaml +23 -0
  3511. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-enable-shielded-nodes.tf +228 -0
  3512. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-enable-shielded-nodes.yaml +19 -0
  3513. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-has-labels.tf +32 -0
  3514. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-has-labels.yaml +25 -0
  3515. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-metadata-server-enabled.tf +88 -0
  3516. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-metadata-server-enabled.yaml +55 -0
  3517. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-nodepool-auto-repair-enabled.tf +22 -0
  3518. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-nodepool-auto-repair-enabled.yaml +23 -0
  3519. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-nodepool-auto-upgrade-enabled.tf +22 -0
  3520. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-nodepool-auto-upgrade-enabled.yaml +23 -0
  3521. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-nodepool-metadata-server-enabled.tf +78 -0
  3522. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-nodepool-metadata-server-enabled.yaml +45 -0
  3523. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-nodepool-secure-boot-for-shielded-nodes.tf +88 -0
  3524. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-nodepool-secure-boot-for-shielded-nodes.yaml +27 -0
  3525. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-sql-backup-configuration-enabled.tf +24 -0
  3526. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-sql-backup-configuration-enabled.yaml +31 -0
  3527. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-use-cos-image.tf +118 -0
  3528. package/semgrep-rules/terraform/gcp/best-practice/gcp-gke-use-cos-image.yaml +26 -0
  3529. package/semgrep-rules/terraform/gcp/best-practice/gcp-ipv6-private-google-enabled.tf +64 -0
  3530. package/semgrep-rules/terraform/gcp/best-practice/gcp-ipv6-private-google-enabled.yaml +29 -0
  3531. package/semgrep-rules/terraform/gcp/best-practice/gcp-mysql-local-in-file-off.tf +93 -0
  3532. package/semgrep-rules/terraform/gcp/best-practice/gcp-mysql-local-in-file-off.yaml +24 -0
  3533. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-checkpoints.tf +124 -0
  3534. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-checkpoints.yaml +24 -0
  3535. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-connection.tf +119 -0
  3536. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-connection.yaml +24 -0
  3537. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-disconnection.tf +159 -0
  3538. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-disconnection.yaml +24 -0
  3539. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-lock-waits.tf +113 -0
  3540. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-lock-waits.yaml +24 -0
  3541. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-min-duration.tf +84 -0
  3542. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-min-duration.yaml +32 -0
  3543. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-min-message.tf +85 -0
  3544. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-min-message.yaml +29 -0
  3545. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-temp.tf +128 -0
  3546. package/semgrep-rules/terraform/gcp/best-practice/gcp-postgresql-log-temp.yaml +32 -0
  3547. package/semgrep-rules/terraform/gcp/best-practice/gcp-storage-versioning-enabled.tf +27 -0
  3548. package/semgrep-rules/terraform/gcp/best-practice/gcp-storage-versioning-enabled.yaml +25 -0
  3549. package/semgrep-rules/terraform/gcp/security/gcp-artifact-registry-encrypted-with-cmk.tf +21 -0
  3550. package/semgrep-rules/terraform/gcp/security/gcp-artifact-registry-encrypted-with-cmk.yaml +33 -0
  3551. package/semgrep-rules/terraform/gcp/security/gcp-artifact-registry-private-repo-iam-binding.tf +86 -0
  3552. package/semgrep-rules/terraform/gcp/security/gcp-artifact-registry-private-repo-iam-binding.yaml +38 -0
  3553. package/semgrep-rules/terraform/gcp/security/gcp-artifact-registry-private-repo-iam-member.tf +37 -0
  3554. package/semgrep-rules/terraform/gcp/security/gcp-artifact-registry-private-repo-iam-member.yaml +38 -0
  3555. package/semgrep-rules/terraform/gcp/security/gcp-bigquery-dataset-encrypted-with-cmk.tf +36 -0
  3556. package/semgrep-rules/terraform/gcp/security/gcp-bigquery-dataset-encrypted-with-cmk.yaml +37 -0
  3557. package/semgrep-rules/terraform/gcp/security/gcp-bigquery-private-table-iam-binding.tf +60 -0
  3558. package/semgrep-rules/terraform/gcp/security/gcp-bigquery-private-table-iam-binding.yaml +38 -0
  3559. package/semgrep-rules/terraform/gcp/security/gcp-bigquery-private-table-iam-member.tf +29 -0
  3560. package/semgrep-rules/terraform/gcp/security/gcp-bigquery-private-table-iam-member.yaml +38 -0
  3561. package/semgrep-rules/terraform/gcp/security/gcp-bigquery-table-encrypted-with-cmk.tf +42 -0
  3562. package/semgrep-rules/terraform/gcp/security/gcp-bigquery-table-encrypted-with-cmk.yaml +37 -0
  3563. package/semgrep-rules/terraform/gcp/security/gcp-bigtable-instance-encrypted-with-cmk.tf +32 -0
  3564. package/semgrep-rules/terraform/gcp/security/gcp-bigtable-instance-encrypted-with-cmk.yaml +37 -0
  3565. package/semgrep-rules/terraform/gcp/security/gcp-build-workers-private.tf +33 -0
  3566. package/semgrep-rules/terraform/gcp/security/gcp-build-workers-private.yaml +39 -0
  3567. package/semgrep-rules/terraform/gcp/security/gcp-cloud-storage-logging.tf +17 -0
  3568. package/semgrep-rules/terraform/gcp/security/gcp-cloud-storage-logging.yaml +35 -0
  3569. package/semgrep-rules/terraform/gcp/security/gcp-compute-boot-disk-encryption.tf +28 -0
  3570. package/semgrep-rules/terraform/gcp/security/gcp-compute-boot-disk-encryption.yaml +43 -0
  3571. package/semgrep-rules/terraform/gcp/security/gcp-compute-disk-encryption.tf +33 -0
  3572. package/semgrep-rules/terraform/gcp/security/gcp-compute-disk-encryption.yaml +43 -0
  3573. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-20.tf +69 -0
  3574. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-20.yaml +46 -0
  3575. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-21.tf +69 -0
  3576. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-21.yaml +46 -0
  3577. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-22.tf +69 -0
  3578. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-22.yaml +46 -0
  3579. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-3306.tf +67 -0
  3580. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-3306.yaml +46 -0
  3581. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-3389.tf +67 -0
  3582. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-3389.yaml +46 -0
  3583. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-80.tf +69 -0
  3584. package/semgrep-rules/terraform/gcp/security/gcp-compute-firewall-unrestricted-ingress-80.yaml +46 -0
  3585. package/semgrep-rules/terraform/gcp/security/gcp-compute-ip-forward.tf +23 -0
  3586. package/semgrep-rules/terraform/gcp/security/gcp-compute-ip-forward.yaml +33 -0
  3587. package/semgrep-rules/terraform/gcp/security/gcp-compute-os-login.tf +33 -0
  3588. package/semgrep-rules/terraform/gcp/security/gcp-compute-os-login.yaml +34 -0
  3589. package/semgrep-rules/terraform/gcp/security/gcp-compute-project-os-login.tf +23 -0
  3590. package/semgrep-rules/terraform/gcp/security/gcp-compute-project-os-login.yaml +45 -0
  3591. package/semgrep-rules/terraform/gcp/security/gcp-compute-public-ip.tf +29 -0
  3592. package/semgrep-rules/terraform/gcp/security/gcp-compute-public-ip.yaml +35 -0
  3593. package/semgrep-rules/terraform/gcp/security/gcp-compute-serial-ports.tf +30 -0
  3594. package/semgrep-rules/terraform/gcp/security/gcp-compute-serial-ports.yaml +33 -0
  3595. package/semgrep-rules/terraform/gcp/security/gcp-compute-ssl-policy.tf +30 -0
  3596. package/semgrep-rules/terraform/gcp/security/gcp-compute-ssl-policy.yaml +53 -0
  3597. package/semgrep-rules/terraform/gcp/security/gcp-compute-template-ip-forward.tf +20 -0
  3598. package/semgrep-rules/terraform/gcp/security/gcp-compute-template-ip-forward.yaml +33 -0
  3599. package/semgrep-rules/terraform/gcp/security/gcp-compute-template-public-ip.tf +21 -0
  3600. package/semgrep-rules/terraform/gcp/security/gcp-compute-template-public-ip.yaml +35 -0
  3601. package/semgrep-rules/terraform/gcp/security/gcp-dataflow-job-encrypted-with-cmk.tf +23 -0
  3602. package/semgrep-rules/terraform/gcp/security/gcp-dataflow-job-encrypted-with-cmk.yaml +33 -0
  3603. package/semgrep-rules/terraform/gcp/security/gcp-dataflow-private-job.tf +38 -0
  3604. package/semgrep-rules/terraform/gcp/security/gcp-dataflow-private-job.yaml +35 -0
  3605. package/semgrep-rules/terraform/gcp/security/gcp-datafusion-private-instance.tf +41 -0
  3606. package/semgrep-rules/terraform/gcp/security/gcp-datafusion-private-instance.yaml +35 -0
  3607. package/semgrep-rules/terraform/gcp/security/gcp-datafusion-stack-driver-logging.tf +62 -0
  3608. package/semgrep-rules/terraform/gcp/security/gcp-datafusion-stack-driver-logging.yaml +33 -0
  3609. package/semgrep-rules/terraform/gcp/security/gcp-datafusion-stack-driver-monitoring.tf +62 -0
  3610. package/semgrep-rules/terraform/gcp/security/gcp-datafusion-stack-driver-monitoring.yaml +33 -0
  3611. package/semgrep-rules/terraform/gcp/security/gcp-dataproc-cluster-encrypted-with-cmk.tf +20 -0
  3612. package/semgrep-rules/terraform/gcp/security/gcp-dataproc-cluster-encrypted-with-cmk.yaml +39 -0
  3613. package/semgrep-rules/terraform/gcp/security/gcp-dataproc-cluster-public-ip.tf +65 -0
  3614. package/semgrep-rules/terraform/gcp/security/gcp-dataproc-cluster-public-ip.yaml +41 -0
  3615. package/semgrep-rules/terraform/gcp/security/gcp-dataproc-private-cluster-iam-binding.tf +60 -0
  3616. package/semgrep-rules/terraform/gcp/security/gcp-dataproc-private-cluster-iam-binding.yaml +38 -0
  3617. package/semgrep-rules/terraform/gcp/security/gcp-dataproc-private-cluster-iam-member.tf +29 -0
  3618. package/semgrep-rules/terraform/gcp/security/gcp-dataproc-private-cluster-iam-member.yaml +38 -0
  3619. package/semgrep-rules/terraform/gcp/security/gcp-dns-key-specs-rsasha1.tf +40 -0
  3620. package/semgrep-rules/terraform/gcp/security/gcp-dns-key-specs-rsasha1.yaml +55 -0
  3621. package/semgrep-rules/terraform/gcp/security/gcp-folder-impersonation-roles-iam-binding.tf +21 -0
  3622. package/semgrep-rules/terraform/gcp/security/gcp-folder-impersonation-roles-iam-binding.yaml +32 -0
  3623. package/semgrep-rules/terraform/gcp/security/gcp-folder-impersonation-roles-iam-member.tf +14 -0
  3624. package/semgrep-rules/terraform/gcp/security/gcp-folder-impersonation-roles-iam-member.yaml +32 -0
  3625. package/semgrep-rules/terraform/gcp/security/gcp-folder-member-default-service-account-iam-binding.tf +21 -0
  3626. package/semgrep-rules/terraform/gcp/security/gcp-folder-member-default-service-account-iam-binding.yaml +34 -0
  3627. package/semgrep-rules/terraform/gcp/security/gcp-folder-member-default-service-account-iam-member.tf +14 -0
  3628. package/semgrep-rules/terraform/gcp/security/gcp-folder-member-default-service-account-iam-member.yaml +34 -0
  3629. package/semgrep-rules/terraform/gcp/security/gcp-gke-basic-auth.tf +67 -0
  3630. package/semgrep-rules/terraform/gcp/security/gcp-gke-basic-auth.yaml +50 -0
  3631. package/semgrep-rules/terraform/gcp/security/gcp-gke-client-certificate-disabled.tf +24 -0
  3632. package/semgrep-rules/terraform/gcp/security/gcp-gke-client-certificate-disabled.yaml +43 -0
  3633. package/semgrep-rules/terraform/gcp/security/gcp-gke-cluster-logging.tf +31 -0
  3634. package/semgrep-rules/terraform/gcp/security/gcp-gke-cluster-logging.yaml +28 -0
  3635. package/semgrep-rules/terraform/gcp/security/gcp-gke-enabled-vpc-flow-logs.tf +165 -0
  3636. package/semgrep-rules/terraform/gcp/security/gcp-gke-enabled-vpc-flow-logs.yaml +33 -0
  3637. package/semgrep-rules/terraform/gcp/security/gcp-gke-ensure-integrity-monitoring.tf +233 -0
  3638. package/semgrep-rules/terraform/gcp/security/gcp-gke-ensure-integrity-monitoring.yaml +35 -0
  3639. package/semgrep-rules/terraform/gcp/security/gcp-gke-kubernetes-rbac-google-groups.tf +50 -0
  3640. package/semgrep-rules/terraform/gcp/security/gcp-gke-kubernetes-rbac-google-groups.yaml +39 -0
  3641. package/semgrep-rules/terraform/gcp/security/gcp-gke-legacy-auth-enabled.tf +15 -0
  3642. package/semgrep-rules/terraform/gcp/security/gcp-gke-legacy-auth-enabled.yaml +31 -0
  3643. package/semgrep-rules/terraform/gcp/security/gcp-gke-legacy-instance-metadata-disabled.tf +94 -0
  3644. package/semgrep-rules/terraform/gcp/security/gcp-gke-legacy-instance-metadata-disabled.yaml +41 -0
  3645. package/semgrep-rules/terraform/gcp/security/gcp-gke-master-authz-networks-enabled.tf +20 -0
  3646. package/semgrep-rules/terraform/gcp/security/gcp-gke-master-authz-networks-enabled.yaml +37 -0
  3647. package/semgrep-rules/terraform/gcp/security/gcp-gke-monitoring-enabled.tf +14 -0
  3648. package/semgrep-rules/terraform/gcp/security/gcp-gke-monitoring-enabled.yaml +29 -0
  3649. package/semgrep-rules/terraform/gcp/security/gcp-gke-network-policy-enabled.tf +37 -0
  3650. package/semgrep-rules/terraform/gcp/security/gcp-gke-network-policy-enabled.yaml +46 -0
  3651. package/semgrep-rules/terraform/gcp/security/gcp-gke-nodepool-integrity-monitoring.tf +89 -0
  3652. package/semgrep-rules/terraform/gcp/security/gcp-gke-nodepool-integrity-monitoring.yaml +35 -0
  3653. package/semgrep-rules/terraform/gcp/security/gcp-gke-pod-security-policy-enabled.tf +17 -0
  3654. package/semgrep-rules/terraform/gcp/security/gcp-gke-pod-security-policy-enabled.yaml +39 -0
  3655. package/semgrep-rules/terraform/gcp/security/gcp-gke-private-cluster-config.tf +19 -0
  3656. package/semgrep-rules/terraform/gcp/security/gcp-gke-private-cluster-config.yaml +37 -0
  3657. package/semgrep-rules/terraform/gcp/security/gcp-gke-public-control-plane.tf +19 -0
  3658. package/semgrep-rules/terraform/gcp/security/gcp-gke-public-control-plane.yaml +41 -0
  3659. package/semgrep-rules/terraform/gcp/security/gcp-gke-secure-boot-for-shielded-nodes.tf +237 -0
  3660. package/semgrep-rules/terraform/gcp/security/gcp-gke-secure-boot-for-shielded-nodes.yaml +27 -0
  3661. package/semgrep-rules/terraform/gcp/security/gcp-insecure-load-balancer-tls-version.tf +13 -0
  3662. package/semgrep-rules/terraform/gcp/security/gcp-insecure-load-balancer-tls-version.yaml +38 -0
  3663. package/semgrep-rules/terraform/gcp/security/gcp-kms-prevent-destroy.tf +30 -0
  3664. package/semgrep-rules/terraform/gcp/security/gcp-kms-prevent-destroy.yaml +37 -0
  3665. package/semgrep-rules/terraform/gcp/security/gcp-memory-store-for-redis-auth-enabled.tf +50 -0
  3666. package/semgrep-rules/terraform/gcp/security/gcp-memory-store-for-redis-auth-enabled.yaml +35 -0
  3667. package/semgrep-rules/terraform/gcp/security/gcp-memory-store-for-redis-intransit-encryption.tf +72 -0
  3668. package/semgrep-rules/terraform/gcp/security/gcp-memory-store-for-redis-intransit-encryption.yaml +33 -0
  3669. package/semgrep-rules/terraform/gcp/security/gcp-org-impersonation-roles-iam-binding.tf +21 -0
  3670. package/semgrep-rules/terraform/gcp/security/gcp-org-impersonation-roles-iam-binding.yaml +33 -0
  3671. package/semgrep-rules/terraform/gcp/security/gcp-org-impersonation-roles-iam-member.tf +14 -0
  3672. package/semgrep-rules/terraform/gcp/security/gcp-org-impersonation-roles-iam-member.yaml +33 -0
  3673. package/semgrep-rules/terraform/gcp/security/gcp-org-member-default-service-account-iam-binding.tf +21 -0
  3674. package/semgrep-rules/terraform/gcp/security/gcp-org-member-default-service-account-iam-binding.yaml +34 -0
  3675. package/semgrep-rules/terraform/gcp/security/gcp-org-member-default-service-account-iam-member.tf +14 -0
  3676. package/semgrep-rules/terraform/gcp/security/gcp-org-member-default-service-account-iam-member.yaml +34 -0
  3677. package/semgrep-rules/terraform/gcp/security/gcp-project-default-network.tf +15 -0
  3678. package/semgrep-rules/terraform/gcp/security/gcp-project-default-network.yaml +36 -0
  3679. package/semgrep-rules/terraform/gcp/security/gcp-project-member-default-service-account-iam-binding.tf +21 -0
  3680. package/semgrep-rules/terraform/gcp/security/gcp-project-member-default-service-account-iam-binding.yaml +34 -0
  3681. package/semgrep-rules/terraform/gcp/security/gcp-project-member-default-service-account-iam-member.tf +14 -0
  3682. package/semgrep-rules/terraform/gcp/security/gcp-project-member-default-service-account-iam-member.yaml +34 -0
  3683. package/semgrep-rules/terraform/gcp/security/gcp-project-service-account-user-iam-binding.tf +31 -0
  3684. package/semgrep-rules/terraform/gcp/security/gcp-project-service-account-user-iam-binding.yaml +39 -0
  3685. package/semgrep-rules/terraform/gcp/security/gcp-project-service-account-user-iam-member.tf +22 -0
  3686. package/semgrep-rules/terraform/gcp/security/gcp-project-service-account-user-iam-member.yaml +39 -0
  3687. package/semgrep-rules/terraform/gcp/security/gcp-pubsub-encrypted-with-cmk.tf +11 -0
  3688. package/semgrep-rules/terraform/gcp/security/gcp-pubsub-encrypted-with-cmk.yaml +33 -0
  3689. package/semgrep-rules/terraform/gcp/security/gcp-pubsub-private-topic-iam-binding.tf +60 -0
  3690. package/semgrep-rules/terraform/gcp/security/gcp-pubsub-private-topic-iam-binding.yaml +38 -0
  3691. package/semgrep-rules/terraform/gcp/security/gcp-pubsub-private-topic-iam-member.tf +29 -0
  3692. package/semgrep-rules/terraform/gcp/security/gcp-pubsub-private-topic-iam-member.yaml +38 -0
  3693. package/semgrep-rules/terraform/gcp/security/gcp-run-private-service-iam-binding.tf +79 -0
  3694. package/semgrep-rules/terraform/gcp/security/gcp-run-private-service-iam-binding.yaml +38 -0
  3695. package/semgrep-rules/terraform/gcp/security/gcp-run-private-service-iam-member.tf +33 -0
  3696. package/semgrep-rules/terraform/gcp/security/gcp-run-private-service-iam-member.yaml +38 -0
  3697. package/semgrep-rules/terraform/gcp/security/gcp-spanner-database-encrypted-with-cmk.tf +25 -0
  3698. package/semgrep-rules/terraform/gcp/security/gcp-spanner-database-encrypted-with-cmk.yaml +37 -0
  3699. package/semgrep-rules/terraform/gcp/security/gcp-sql-database-require-ssl.tf +33 -0
  3700. package/semgrep-rules/terraform/gcp/security/gcp-sql-database-require-ssl.yaml +50 -0
  3701. package/semgrep-rules/terraform/gcp/security/gcp-sql-database-ssl-insecure-value-postgres-mysql.fixed.tf +138 -0
  3702. package/semgrep-rules/terraform/gcp/security/gcp-sql-database-ssl-insecure-value-postgres-mysql.tf +138 -0
  3703. package/semgrep-rules/terraform/gcp/security/gcp-sql-database-ssl-insecure-value-postgres-mysql.yaml +58 -0
  3704. package/semgrep-rules/terraform/gcp/security/gcp-sql-database-ssl-insecure-value-sqlserver.fixed.tf +138 -0
  3705. package/semgrep-rules/terraform/gcp/security/gcp-sql-database-ssl-insecure-value-sqlserver.tf +138 -0
  3706. package/semgrep-rules/terraform/gcp/security/gcp-sql-database-ssl-insecure-value-sqlserver.yaml +58 -0
  3707. package/semgrep-rules/terraform/gcp/security/gcp-sql-public-database.tf +130 -0
  3708. package/semgrep-rules/terraform/gcp/security/gcp-sql-public-database.yaml +58 -0
  3709. package/semgrep-rules/terraform/gcp/security/gcp-sqlserver-no-public-ip.tf +236 -0
  3710. package/semgrep-rules/terraform/gcp/security/gcp-sqlserver-no-public-ip.yaml +35 -0
  3711. package/semgrep-rules/terraform/gcp/security/gcp-storage-bucket-not-public-iam-binding.tf +19 -0
  3712. package/semgrep-rules/terraform/gcp/security/gcp-storage-bucket-not-public-iam-binding.yaml +31 -0
  3713. package/semgrep-rules/terraform/gcp/security/gcp-storage-bucket-not-public-iam-member.tf +14 -0
  3714. package/semgrep-rules/terraform/gcp/security/gcp-storage-bucket-not-public-iam-member.yaml +31 -0
  3715. package/semgrep-rules/terraform/gcp/security/gcp-storage-bucket-uniform-access.tf +21 -0
  3716. package/semgrep-rules/terraform/gcp/security/gcp-storage-bucket-uniform-access.yaml +35 -0
  3717. package/semgrep-rules/terraform/gcp/security/gcp-sub-network-logging-enabled.tf +20 -0
  3718. package/semgrep-rules/terraform/gcp/security/gcp-sub-network-logging-enabled.yaml +35 -0
  3719. package/semgrep-rules/terraform/gcp/security/gcp-sub-network-private-google-enabled.tf +30 -0
  3720. package/semgrep-rules/terraform/gcp/security/gcp-sub-network-private-google-enabled.yaml +35 -0
  3721. package/semgrep-rules/terraform/gcp/security/gcp-vertexai-dataset-encrypted-with-cmk.tf +17 -0
  3722. package/semgrep-rules/terraform/gcp/security/gcp-vertexai-dataset-encrypted-with-cmk.yaml +37 -0
  3723. package/semgrep-rules/terraform/gcp/security/gcp-vertexai-metadata-store-encrypted-with-cmk.tf +17 -0
  3724. package/semgrep-rules/terraform/gcp/security/gcp-vertexai-metadata-store-encrypted-with-cmk.yaml +37 -0
  3725. package/semgrep-rules/terraform/gcp/security/gcp-vertexai-private-instance.tf +36 -0
  3726. package/semgrep-rules/terraform/gcp/security/gcp-vertexai-private-instance.yaml +35 -0
  3727. package/semgrep-rules/terraform/lang/security/ec2-imdsv1-optional.tf +47 -0
  3728. package/semgrep-rules/terraform/lang/security/ec2-imdsv1-optional.yaml +68 -0
  3729. package/semgrep-rules/terraform/lang/security/ecr-image-scan-on-push.tf +25 -0
  3730. package/semgrep-rules/terraform/lang/security/ecr-image-scan-on-push.yaml +39 -0
  3731. package/semgrep-rules/terraform/lang/security/eks-insufficient-control-plane-logging.tf +53 -0
  3732. package/semgrep-rules/terraform/lang/security/eks-insufficient-control-plane-logging.yaml +45 -0
  3733. package/semgrep-rules/terraform/lang/security/eks-public-endpoint-enabled.tf +25 -0
  3734. package/semgrep-rules/terraform/lang/security/eks-public-endpoint-enabled.yaml +39 -0
  3735. package/semgrep-rules/terraform/lang/security/elastic-search-encryption-at-rest.tf +55 -0
  3736. package/semgrep-rules/terraform/lang/security/elastic-search-encryption-at-rest.yaml +39 -0
  3737. package/semgrep-rules/terraform/lang/security/iam/no-iam-admin-privileges.tf +104 -0
  3738. package/semgrep-rules/terraform/lang/security/iam/no-iam-admin-privileges.yaml +92 -0
  3739. package/semgrep-rules/terraform/lang/security/iam/no-iam-creds-exposure.tf +114 -0
  3740. package/semgrep-rules/terraform/lang/security/iam/no-iam-creds-exposure.yaml +174 -0
  3741. package/semgrep-rules/terraform/lang/security/iam/no-iam-data-exfiltration.tf +64 -0
  3742. package/semgrep-rules/terraform/lang/security/iam/no-iam-data-exfiltration.yaml +115 -0
  3743. package/semgrep-rules/terraform/lang/security/iam/no-iam-priv-esc-funcs.tf +105 -0
  3744. package/semgrep-rules/terraform/lang/security/iam/no-iam-priv-esc-funcs.yaml +113 -0
  3745. package/semgrep-rules/terraform/lang/security/iam/no-iam-priv-esc-other-users.tf +145 -0
  3746. package/semgrep-rules/terraform/lang/security/iam/no-iam-priv-esc-other-users.yaml +107 -0
  3747. package/semgrep-rules/terraform/lang/security/iam/no-iam-priv-esc-roles.tf +186 -0
  3748. package/semgrep-rules/terraform/lang/security/iam/no-iam-priv-esc-roles.yaml +131 -0
  3749. package/semgrep-rules/terraform/lang/security/iam/no-iam-resource-exposure.tf +72 -0
  3750. package/semgrep-rules/terraform/lang/security/iam/no-iam-resource-exposure.yaml +792 -0
  3751. package/semgrep-rules/terraform/lang/security/iam/no-iam-star-actions.tf +84 -0
  3752. package/semgrep-rules/terraform/lang/security/iam/no-iam-star-actions.yaml +89 -0
  3753. package/semgrep-rules/terraform/lang/security/rds-insecure-password-storage-in-source-code.tf +82 -0
  3754. package/semgrep-rules/terraform/lang/security/rds-insecure-password-storage-in-source-code.yaml +42 -0
  3755. package/semgrep-rules/terraform/lang/security/rds-public-access.tf +30 -0
  3756. package/semgrep-rules/terraform/lang/security/rds-public-access.yaml +30 -0
  3757. package/semgrep-rules/terraform/lang/security/s3-cors-all-origins.tf +27 -0
  3758. package/semgrep-rules/terraform/lang/security/s3-cors-all-origins.yaml +25 -0
  3759. package/semgrep-rules/terraform/lang/security/s3-public-read-bucket.tf +44 -0
  3760. package/semgrep-rules/terraform/lang/security/s3-public-read-bucket.yaml +34 -0
  3761. package/semgrep-rules/terraform/lang/security/s3-public-rw-bucket.tf +10 -0
  3762. package/semgrep-rules/terraform/lang/security/s3-public-rw-bucket.yaml +25 -0
  3763. package/semgrep-rules/terraform/lang/security/s3-unencrypted-bucket.tf +19 -0
  3764. package/semgrep-rules/terraform/lang/security/s3-unencrypted-bucket.yaml +31 -0
  3765. package/semgrep-rules/trusted_python/dlint-redos-detect.py +346 -0
  3766. package/semgrep-rules/typescript/angular/security/audit/angular-domsanitizer.ts +27 -0
  3767. package/semgrep-rules/typescript/angular/security/audit/angular-domsanitizer.yaml +132 -0
  3768. package/semgrep-rules/typescript/aws-cdk/security/audit/awscdk-bucket-encryption.ts +54 -0
  3769. package/semgrep-rules/typescript/aws-cdk/security/audit/awscdk-bucket-encryption.yml +48 -0
  3770. package/semgrep-rules/typescript/aws-cdk/security/audit/awscdk-bucket-enforcessl.ts +42 -0
  3771. package/semgrep-rules/typescript/aws-cdk/security/audit/awscdk-bucket-enforcessl.yml +38 -0
  3772. package/semgrep-rules/typescript/aws-cdk/security/audit/awscdk-sqs-unencryptedqueue.ts +64 -0
  3773. package/semgrep-rules/typescript/aws-cdk/security/audit/awscdk-sqs-unencryptedqueue.yml +43 -0
  3774. package/semgrep-rules/typescript/aws-cdk/security/awscdk-bucket-grantpublicaccessmethod.ts +46 -0
  3775. package/semgrep-rules/typescript/aws-cdk/security/awscdk-bucket-grantpublicaccessmethod.yml +41 -0
  3776. package/semgrep-rules/typescript/aws-cdk/security/awscdk-codebuild-project-public.ts +72 -0
  3777. package/semgrep-rules/typescript/aws-cdk/security/awscdk-codebuild-project-public.yml +38 -0
  3778. package/semgrep-rules/typescript/lang/best-practice/moment-deprecated.tsx +11 -0
  3779. package/semgrep-rules/typescript/lang/best-practice/moment-deprecated.yaml +17 -0
  3780. package/semgrep-rules/typescript/lang/correctness/useless-ternary.tsx +5 -0
  3781. package/semgrep-rules/typescript/lang/correctness/useless-ternary.yaml +15 -0
  3782. package/semgrep-rules/typescript/lang/security/audit/cors-regex-wildcard.tsx +33 -0
  3783. package/semgrep-rules/typescript/lang/security/audit/cors-regex-wildcard.yaml +32 -0
  3784. package/semgrep-rules/typescript/nestjs/security/audit/nestjs-header-cors-any.ts +74 -0
  3785. package/semgrep-rules/typescript/nestjs/security/audit/nestjs-header-cors-any.yaml +44 -0
  3786. package/semgrep-rules/typescript/nestjs/security/audit/nestjs-header-xss-disabled.ts +27 -0
  3787. package/semgrep-rules/typescript/nestjs/security/audit/nestjs-header-xss-disabled.yaml +34 -0
  3788. package/semgrep-rules/typescript/nestjs/security/audit/nestjs-open-redirect.ts +23 -0
  3789. package/semgrep-rules/typescript/nestjs/security/audit/nestjs-open-redirect.yaml +34 -0
  3790. package/semgrep-rules/typescript/react/best-practice/define-styled-components-on-module-level.tsx +36 -0
  3791. package/semgrep-rules/typescript/react/best-practice/define-styled-components-on-module-level.yaml +32 -0
  3792. package/semgrep-rules/typescript/react/best-practice/react-find-dom.jsx +51 -0
  3793. package/semgrep-rules/typescript/react/best-practice/react-find-dom.tsx +51 -0
  3794. package/semgrep-rules/typescript/react/best-practice/react-find-dom.yaml +20 -0
  3795. package/semgrep-rules/typescript/react/best-practice/react-legacy-component.jsx +31 -0
  3796. package/semgrep-rules/typescript/react/best-practice/react-legacy-component.tsx +31 -0
  3797. package/semgrep-rules/typescript/react/best-practice/react-legacy-component.yaml +20 -0
  3798. package/semgrep-rules/typescript/react/best-practice/react-props-in-state.jsx +99 -0
  3799. package/semgrep-rules/typescript/react/best-practice/react-props-in-state.tsx +105 -0
  3800. package/semgrep-rules/typescript/react/best-practice/react-props-in-state.yaml +58 -0
  3801. package/semgrep-rules/typescript/react/best-practice/react-props-spreading.jsx +18 -0
  3802. package/semgrep-rules/typescript/react/best-practice/react-props-spreading.tsx +18 -0
  3803. package/semgrep-rules/typescript/react/best-practice/react-props-spreading.yaml +22 -0
  3804. package/semgrep-rules/typescript/react/portability/i18next/i18next-key-format.tsx +106 -0
  3805. package/semgrep-rules/typescript/react/portability/i18next/i18next-key-format.yaml +57 -0
  3806. package/semgrep-rules/typescript/react/portability/i18next/jsx-label-not-i18n.tsx +91 -0
  3807. package/semgrep-rules/typescript/react/portability/i18next/jsx-label-not-i18n.yaml +26 -0
  3808. package/semgrep-rules/typescript/react/portability/i18next/jsx-not-internationalized.tsx +108 -0
  3809. package/semgrep-rules/typescript/react/portability/i18next/jsx-not-internationalized.yaml +26 -0
  3810. package/semgrep-rules/typescript/react/portability/i18next/mui-snackbar-message.tsx +19 -0
  3811. package/semgrep-rules/typescript/react/portability/i18next/mui-snackbar-message.yaml +20 -0
  3812. package/semgrep-rules/typescript/react/portability/i18next/useselect-label-not-i18n.tsx +71 -0
  3813. package/semgrep-rules/typescript/react/portability/i18next/useselect-label-not-i18n.yaml +25 -0
  3814. package/semgrep-rules/typescript/react/security/audit/react-dangerouslysetinnerhtml.jsx +61 -0
  3815. package/semgrep-rules/typescript/react/security/audit/react-dangerouslysetinnerhtml.tsx +61 -0
  3816. package/semgrep-rules/typescript/react/security/audit/react-dangerouslysetinnerhtml.yaml +146 -0
  3817. package/semgrep-rules/typescript/react/security/audit/react-href-var.jsx +63 -0
  3818. package/semgrep-rules/typescript/react/security/audit/react-href-var.tsx +58 -0
  3819. package/semgrep-rules/typescript/react/security/audit/react-href-var.yaml +89 -0
  3820. package/semgrep-rules/typescript/react/security/audit/react-jwt-decoded-property.jsx +17 -0
  3821. package/semgrep-rules/typescript/react/security/audit/react-jwt-decoded-property.tsx +17 -0
  3822. package/semgrep-rules/typescript/react/security/audit/react-jwt-decoded-property.yaml +31 -0
  3823. package/semgrep-rules/typescript/react/security/audit/react-jwt-in-localstorage.jsx +23 -0
  3824. package/semgrep-rules/typescript/react/security/audit/react-jwt-in-localstorage.tsx +23 -0
  3825. package/semgrep-rules/typescript/react/security/audit/react-jwt-in-localstorage.yaml +37 -0
  3826. package/semgrep-rules/typescript/react/security/audit/react-unsanitized-method.jsx +30 -0
  3827. package/semgrep-rules/typescript/react/security/audit/react-unsanitized-method.tsx +30 -0
  3828. package/semgrep-rules/typescript/react/security/audit/react-unsanitized-method.yaml +147 -0
  3829. package/semgrep-rules/typescript/react/security/audit/react-unsanitized-property.jsx +15 -0
  3830. package/semgrep-rules/typescript/react/security/audit/react-unsanitized-property.tsx +15 -0
  3831. package/semgrep-rules/typescript/react/security/audit/react-unsanitized-property.yaml +161 -0
  3832. package/semgrep-rules/typescript/react/security/react-insecure-request.jsx +39 -0
  3833. package/semgrep-rules/typescript/react/security/react-insecure-request.tsx +39 -0
  3834. package/semgrep-rules/typescript/react/security/react-insecure-request.yaml +61 -0
  3835. package/semgrep-rules/typescript/react/security/react-markdown-insecure-html.jsx +31 -0
  3836. package/semgrep-rules/typescript/react/security/react-markdown-insecure-html.tsx +31 -0
  3837. package/semgrep-rules/typescript/react/security/react-markdown-insecure-html.yaml +50 -0
  3838. package/semgrep-rules/yaml/argo/correctness/event-binding-payload-with-hyphen.test.yaml +24 -0
  3839. package/semgrep-rules/yaml/argo/correctness/event-binding-payload-with-hyphen.yaml +33 -0
  3840. package/semgrep-rules/yaml/argo/security/argo-workflow-parameter-command-injection.test.yaml +75 -0
  3841. package/semgrep-rules/yaml/argo/security/argo-workflow-parameter-command-injection.yaml +92 -0
  3842. package/semgrep-rules/yaml/docker-compose/security/exposing-docker-socket-volume.test.yaml +266 -0
  3843. package/semgrep-rules/yaml/docker-compose/security/exposing-docker-socket-volume.yaml +75 -0
  3844. package/semgrep-rules/yaml/docker-compose/security/no-new-privileges.test.yaml +16 -0
  3845. package/semgrep-rules/yaml/docker-compose/security/no-new-privileges.yaml +46 -0
  3846. package/semgrep-rules/yaml/docker-compose/security/privileged-service.test.yaml +12 -0
  3847. package/semgrep-rules/yaml/docker-compose/security/privileged-service.yaml +42 -0
  3848. package/semgrep-rules/yaml/docker-compose/security/seccomp-confinement-disabled.test.yaml +15 -0
  3849. package/semgrep-rules/yaml/docker-compose/security/seccomp-confinement-disabled.yaml +37 -0
  3850. package/semgrep-rules/yaml/docker-compose/security/selinux-separation-disabled.test.yaml +15 -0
  3851. package/semgrep-rules/yaml/docker-compose/security/selinux-separation-disabled.yaml +38 -0
  3852. package/semgrep-rules/yaml/docker-compose/security/writable-filesystem-service.test.yaml +13 -0
  3853. package/semgrep-rules/yaml/docker-compose/security/writable-filesystem-service.yaml +47 -0
  3854. package/semgrep-rules/yaml/github-actions/security/allowed-unsecure-commands.test.yaml +30 -0
  3855. package/semgrep-rules/yaml/github-actions/security/allowed-unsecure-commands.yaml +35 -0
  3856. package/semgrep-rules/yaml/github-actions/security/audit/unsafe-add-mask-workflow-command.test.yaml +38 -0
  3857. package/semgrep-rules/yaml/github-actions/security/audit/unsafe-add-mask-workflow-command.yaml +36 -0
  3858. package/semgrep-rules/yaml/github-actions/security/curl-eval.test.yaml +25 -0
  3859. package/semgrep-rules/yaml/github-actions/security/curl-eval.yaml +43 -0
  3860. package/semgrep-rules/yaml/github-actions/security/github-script-injection.test.yaml +69 -0
  3861. package/semgrep-rules/yaml/github-actions/security/github-script-injection.yaml +72 -0
  3862. package/semgrep-rules/yaml/github-actions/security/pull-request-target-code-checkout.test.yaml +73 -0
  3863. package/semgrep-rules/yaml/github-actions/security/pull-request-target-code-checkout.yaml +70 -0
  3864. package/semgrep-rules/yaml/github-actions/security/run-shell-injection.test.yaml +139 -0
  3865. package/semgrep-rules/yaml/github-actions/security/run-shell-injection.yaml +62 -0
  3866. package/semgrep-rules/yaml/github-actions/security/third-party-action-not-pinned-to-commit-sha.test.yml +70 -0
  3867. package/semgrep-rules/yaml/github-actions/security/third-party-action-not-pinned-to-commit-sha.yml +46 -0
  3868. package/semgrep-rules/yaml/github-actions/security/workflow-run-target-code-checkout.test.yaml +74 -0
  3869. package/semgrep-rules/yaml/github-actions/security/workflow-run-target-code-checkout.yaml +61 -0
  3870. package/semgrep-rules/yaml/github-actions/semgrep-configuration/semgrep-github-action-push-without-branches.test.yml +35 -0
  3871. package/semgrep-rules/yaml/github-actions/semgrep-configuration/semgrep-github-action-push-without-branches.yml +48 -0
  3872. package/semgrep-rules/yaml/gitlab/correctness/changes-with-when-never.test.yaml +26 -0
  3873. package/semgrep-rules/yaml/gitlab/correctness/changes-with-when-never.yaml +17 -0
  3874. package/semgrep-rules/yaml/kubernetes/best-practice/no-fractional-cpu-limits.fixed.test.yaml +139 -0
  3875. package/semgrep-rules/yaml/kubernetes/best-practice/no-fractional-cpu-limits.test.yaml +139 -0
  3876. package/semgrep-rules/yaml/kubernetes/best-practice/no-fractional-cpu-limits.yaml +23 -0
  3877. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation-no-securitycontext.fixed.test.yaml +26 -0
  3878. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation-no-securitycontext.test.yaml +24 -0
  3879. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation-no-securitycontext.yaml +59 -0
  3880. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation-true.fixed.test.yaml +34 -0
  3881. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation-true.test.yaml +34 -0
  3882. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation-true.yaml +57 -0
  3883. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation.fixed.test.yaml +25 -0
  3884. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation.test.yaml +24 -0
  3885. package/semgrep-rules/yaml/kubernetes/security/allow-privilege-escalation.yaml +65 -0
  3886. package/semgrep-rules/yaml/kubernetes/security/env/flask-debugging-enabled.test.yaml +29 -0
  3887. package/semgrep-rules/yaml/kubernetes/security/env/flask-debugging-enabled.yaml +31 -0
  3888. package/semgrep-rules/yaml/kubernetes/security/exposing-docker-socket-hostpath.test.yaml +17 -0
  3889. package/semgrep-rules/yaml/kubernetes/security/exposing-docker-socket-hostpath.yaml +33 -0
  3890. package/semgrep-rules/yaml/kubernetes/security/hostipc-pod.test.yaml +10 -0
  3891. package/semgrep-rules/yaml/kubernetes/security/hostipc-pod.yaml +28 -0
  3892. package/semgrep-rules/yaml/kubernetes/security/hostnetwork-pod.test.yaml +10 -0
  3893. package/semgrep-rules/yaml/kubernetes/security/hostnetwork-pod.yaml +28 -0
  3894. package/semgrep-rules/yaml/kubernetes/security/hostpid-pod.test.yaml +10 -0
  3895. package/semgrep-rules/yaml/kubernetes/security/hostpid-pod.yaml +29 -0
  3896. package/semgrep-rules/yaml/kubernetes/security/legacy-api-clusterrole-excessive-permissions.test.yaml +53 -0
  3897. package/semgrep-rules/yaml/kubernetes/security/legacy-api-clusterrole-excessive-permissions.yaml +44 -0
  3898. package/semgrep-rules/yaml/kubernetes/security/privileged-container.test.yaml +19 -0
  3899. package/semgrep-rules/yaml/kubernetes/security/privileged-container.yaml +44 -0
  3900. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-container-level-missing-security-context.fixed.test.yaml +78 -0
  3901. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-container-level-missing-security-context.test.yaml +76 -0
  3902. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-container-level-missing-security-context.yaml +89 -0
  3903. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-container-level.fixed.test.yaml +77 -0
  3904. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-container-level.test.yaml +76 -0
  3905. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-container-level.yaml +91 -0
  3906. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-security-context-pod-level.fixed.test.yaml +74 -0
  3907. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-security-context-pod-level.test.yaml +73 -0
  3908. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-security-context-pod-level.yaml +76 -0
  3909. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-unsafe-value.fixed.test.yaml +45 -0
  3910. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-unsafe-value.test.yaml +45 -0
  3911. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root-unsafe-value.yaml +61 -0
  3912. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root.fixed.test.yaml +75 -0
  3913. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root.test.yaml +73 -0
  3914. package/semgrep-rules/yaml/kubernetes/security/run-as-non-root.yaml +77 -0
  3915. package/semgrep-rules/yaml/kubernetes/security/seccomp-confinement-disabled.test.yaml +19 -0
  3916. package/semgrep-rules/yaml/kubernetes/security/seccomp-confinement-disabled.yaml +35 -0
  3917. package/semgrep-rules/yaml/kubernetes/security/secrets-in-config-file.test.yaml +14 -0
  3918. package/semgrep-rules/yaml/kubernetes/security/secrets-in-config-file.yaml +44 -0
  3919. package/semgrep-rules/yaml/kubernetes/security/skip-tls-verify-cluster.test.yaml +24 -0
  3920. package/semgrep-rules/yaml/kubernetes/security/skip-tls-verify-cluster.yaml +28 -0
  3921. package/semgrep-rules/yaml/kubernetes/security/skip-tls-verify-service.test.yaml +14 -0
  3922. package/semgrep-rules/yaml/kubernetes/security/skip-tls-verify-service.yaml +28 -0
  3923. package/semgrep-rules/yaml/kubernetes/security/writable-filesystem-container.test.yaml +24 -0
  3924. package/semgrep-rules/yaml/kubernetes/security/writable-filesystem-container.yaml +47 -0
  3925. package/semgrep-rules/yaml/openapi/security/api-key-in-query-parameter.test.yaml +37 -0
  3926. package/semgrep-rules/yaml/openapi/security/api-key-in-query-parameter.yaml +45 -0
  3927. package/semgrep-rules/yaml/openapi/security/openai-consequential-action-false.test.yaml +41 -0
  3928. package/semgrep-rules/yaml/openapi/security/openai-consequential-action-false.yaml +48 -0
  3929. package/semgrep-rules/yaml/openapi/security/use-of-basic-authentication.test.yaml +36 -0
  3930. package/semgrep-rules/yaml/openapi/security/use-of-basic-authentication.yaml +42 -0
  3931. package/semgrep-rules/yaml/semgrep/consistency/generate_rules.py +57 -0
  3932. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-bash.yaml +18 -0
  3933. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-cpp.yaml +18 -0
  3934. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-csharp.yaml +18 -0
  3935. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-dockerfile.yaml +18 -0
  3936. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-elixir.yaml +18 -0
  3937. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-go.yaml +18 -0
  3938. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-hcl.yaml +18 -0
  3939. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-js.yaml +18 -0
  3940. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-kotlin.yaml +18 -0
  3941. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-python.yaml +18 -0
  3942. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-regex.yaml +18 -0
  3943. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-solidity.yaml +18 -0
  3944. package/semgrep-rules/yaml/semgrep/consistency/lang-consistency-ts.yaml +18 -0
  3945. package/semgrep-rules/yaml/semgrep/duplicate-id.test.yaml +76 -0
  3946. package/semgrep-rules/yaml/semgrep/duplicate-id.yaml +24 -0
  3947. package/semgrep-rules/yaml/semgrep/duplicate-pattern.test.yaml +19 -0
  3948. package/semgrep-rules/yaml/semgrep/duplicate-pattern.yaml +21 -0
  3949. package/semgrep-rules/yaml/semgrep/empty-message.test.yaml +16 -0
  3950. package/semgrep-rules/yaml/semgrep/empty-message.yaml +17 -0
  3951. package/semgrep-rules/yaml/semgrep/interfile-true-under-metadata-and-no-options.fixed.test.yaml +111 -0
  3952. package/semgrep-rules/yaml/semgrep/interfile-true-under-metadata-and-no-options.test.yaml +109 -0
  3953. package/semgrep-rules/yaml/semgrep/interfile-true-under-metadata-and-no-options.yaml +35 -0
  3954. package/semgrep-rules/yaml/semgrep/interfile-true-under-metadata-and-options-already-present.fixed.test.yaml +112 -0
  3955. package/semgrep-rules/yaml/semgrep/interfile-true-under-metadata-and-options-already-present.test.yaml +111 -0
  3956. package/semgrep-rules/yaml/semgrep/interfile-true-under-metadata-and-options-already-present.yaml +46 -0
  3957. package/semgrep-rules/yaml/semgrep/key-indentation.test.yaml +16 -0
  3958. package/semgrep-rules/yaml/semgrep/key-indentation.yaml +25 -0
  3959. package/semgrep-rules/yaml/semgrep/message-whitespace.test.yaml +13 -0
  3960. package/semgrep-rules/yaml/semgrep/message-whitespace.yaml +28 -0
  3961. package/semgrep-rules/yaml/semgrep/metadata-category.test.yaml +35 -0
  3962. package/semgrep-rules/yaml/semgrep/metadata-category.yaml +20 -0
  3963. package/semgrep-rules/yaml/semgrep/metadata-confidence-incorrect-value.test.yaml +36 -0
  3964. package/semgrep-rules/yaml/semgrep/metadata-confidence-incorrect-value.yaml +32 -0
  3965. package/semgrep-rules/yaml/semgrep/metadata-confidence.test.yaml +36 -0
  3966. package/semgrep-rules/yaml/semgrep/metadata-confidence.yaml +28 -0
  3967. package/semgrep-rules/yaml/semgrep/metadata-cwe.test.yaml +42 -0
  3968. package/semgrep-rules/yaml/semgrep/metadata-cwe.yaml +15 -0
  3969. package/semgrep-rules/yaml/semgrep/metadata-deepsemgrep.test.yaml +49 -0
  3970. package/semgrep-rules/yaml/semgrep/metadata-deepsemgrep.yaml +29 -0
  3971. package/semgrep-rules/yaml/semgrep/metadata-impact-incorrect-value.test.yaml +37 -0
  3972. package/semgrep-rules/yaml/semgrep/metadata-impact-incorrect-value.yaml +32 -0
  3973. package/semgrep-rules/yaml/semgrep/metadata-impact.test.yaml +36 -0
  3974. package/semgrep-rules/yaml/semgrep/metadata-impact.yaml +28 -0
  3975. package/semgrep-rules/yaml/semgrep/metadata-incorrect-option.test.yaml +36 -0
  3976. package/semgrep-rules/yaml/semgrep/metadata-incorrect-option.yaml +25 -0
  3977. package/semgrep-rules/yaml/semgrep/metadata-likelihood-incorrect-value.test.yaml +36 -0
  3978. package/semgrep-rules/yaml/semgrep/metadata-likelihood-incorrect-value.yaml +32 -0
  3979. package/semgrep-rules/yaml/semgrep/metadata-likelihood.test.yaml +36 -0
  3980. package/semgrep-rules/yaml/semgrep/metadata-likelihood.yaml +28 -0
  3981. package/semgrep-rules/yaml/semgrep/metadata-owasp.test.yaml +113 -0
  3982. package/semgrep-rules/yaml/semgrep/metadata-owasp.yaml +27 -0
  3983. package/semgrep-rules/yaml/semgrep/metadata-references.test.yaml +18 -0
  3984. package/semgrep-rules/yaml/semgrep/metadata-references.yaml +19 -0
  3985. package/semgrep-rules/yaml/semgrep/metadata-subcategory-incorrect-value.test.yaml +40 -0
  3986. package/semgrep-rules/yaml/semgrep/metadata-subcategory-incorrect-value.yaml +36 -0
  3987. package/semgrep-rules/yaml/semgrep/metadata-subcategory.test.yaml +38 -0
  3988. package/semgrep-rules/yaml/semgrep/metadata-subcategory.yaml +28 -0
  3989. package/semgrep-rules/yaml/semgrep/metadata-technology.test.yaml +77 -0
  3990. package/semgrep-rules/yaml/semgrep/metadata-technology.yaml +48 -0
  3991. package/semgrep-rules/yaml/semgrep/missing-language-field.test.yaml +54 -0
  3992. package/semgrep-rules/yaml/semgrep/missing-language-field.yaml +41 -0
  3993. package/semgrep-rules/yaml/semgrep/missing-message-field.test.yaml +24 -0
  3994. package/semgrep-rules/yaml/semgrep/missing-message-field.yaml +24 -0
  3995. package/semgrep-rules/yaml/semgrep/multi-line-message.test.yaml +20 -0
  3996. package/semgrep-rules/yaml/semgrep/multi-line-message.yaml +18 -0
  3997. package/semgrep-rules/yaml/semgrep/rule-missing-deconstructed-value.test.yaml +35 -0
  3998. package/semgrep-rules/yaml/semgrep/rule-missing-deconstructed-value.yaml +68 -0
  3999. package/semgrep-rules/yaml/semgrep/slow-pattern-general-function.test.yaml +25 -0
  4000. package/semgrep-rules/yaml/semgrep/slow-pattern-general-function.yaml +29 -0
  4001. package/semgrep-rules/yaml/semgrep/slow-pattern-general-property.test.yaml +28 -0
  4002. package/semgrep-rules/yaml/semgrep/slow-pattern-general-property.yaml +22 -0
  4003. package/semgrep-rules/yaml/semgrep/slow-pattern-single-metavariable.test.yaml +45 -0
  4004. package/semgrep-rules/yaml/semgrep/slow-pattern-single-metavariable.yaml +27 -0
  4005. package/semgrep-rules/yaml/semgrep/slow-pattern-top-ellipsis.test.yaml +31 -0
  4006. package/semgrep-rules/yaml/semgrep/slow-pattern-top-ellipsis.yaml +22 -0
  4007. package/semgrep-rules/yaml/semgrep/unnecessary-parent.test.yaml +69 -0
  4008. package/semgrep-rules/yaml/semgrep/unnecessary-parent.yaml +37 -0
  4009. package/semgrep-rules/yaml/semgrep/unsatisfiable.test.yaml +16 -0
  4010. package/semgrep-rules/yaml/semgrep/unsatisfiable.yaml +25 -0
  4011. package/smithery.yaml +24 -0
  4012. package/tsconfig.json +26 -0
@@ -0,0 +1,3386 @@
1
+ pragma solidity ^0.5.16;
2
+
3
+ /**
4
+ * @title Compound's InterestRateModel Interface
5
+ * @author Compound
6
+ */
7
+ contract InterestRateModel {
8
+ /// @notice Indicator that this is an InterestRateModel contract (for inspection)
9
+ bool public constant isInterestRateModel = true;
10
+
11
+ /**
12
+ * @notice Calculates the current borrow interest rate per block
13
+ * @param cash The total amount of cash the market has
14
+ * @param borrows The total amount of borrows the market has outstanding
15
+ * @param reserves The total amount of reserves the market has
16
+ * @return The borrow rate per block (as a percentage, and scaled by 1e18)
17
+ */
18
+ function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);
19
+
20
+ /**
21
+ * @notice Calculates the current supply interest rate per block
22
+ * @param cash The total amount of cash the market has
23
+ * @param borrows The total amount of borrows the market has outstanding
24
+ * @param reserves The total amount of reserves the market has
25
+ * @param reserveFactorMantissa The current reserve factor the market has
26
+ * @return The supply rate per block (as a percentage, and scaled by 1e18)
27
+ */
28
+ function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) external view returns (uint);
29
+
30
+ }
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ contract ComptrollerErrorReporter {
44
+ enum Error {
45
+ NO_ERROR,
46
+ UNAUTHORIZED,
47
+ COMPTROLLER_MISMATCH,
48
+ INSUFFICIENT_SHORTFALL,
49
+ INSUFFICIENT_LIQUIDITY,
50
+ INVALID_CLOSE_FACTOR,
51
+ INVALID_COLLATERAL_FACTOR,
52
+ INVALID_LIQUIDATION_INCENTIVE,
53
+ MARKET_NOT_ENTERED, // no longer possible
54
+ MARKET_NOT_LISTED,
55
+ MARKET_ALREADY_LISTED,
56
+ MATH_ERROR,
57
+ NONZERO_BORROW_BALANCE,
58
+ PRICE_ERROR,
59
+ REJECTION,
60
+ SNAPSHOT_ERROR,
61
+ TOO_MANY_ASSETS,
62
+ TOO_MUCH_REPAY,
63
+
64
+ // OLA_ADDITIONS : All Enums from here
65
+ NOT_IN_MARKET,
66
+ TOO_LITTLE_BORROW,
67
+ IN_FRESH_LIQUIDATION_LIMITED_PERIOD,
68
+ INVALID_LIQUIDATION_FACTOR,
69
+ BORROWED_AGAINST_FAILED,
70
+ TOTAL_BORROWED_AGAINST_TOO_HIGH,
71
+ TOO_MUCH_COLLATERAL_ACTIVATION,
72
+
73
+ // V0.02
74
+ NOT_APPROVED_TO_MINT,
75
+ NOT_APPROVED_TO_BORROW
76
+ }
77
+
78
+ enum FailureInfo {
79
+ ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
80
+ ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,
81
+ EXIT_MARKET_BALANCE_OWED,
82
+ EXIT_MARKET_REJECTION,
83
+ SET_CLOSE_FACTOR_OWNER_CHECK,
84
+ SET_CLOSE_FACTOR_VALIDATION,
85
+ SET_COLLATERAL_FACTOR_OWNER_CHECK,
86
+ SET_COLLATERAL_FACTOR_NO_EXISTS,
87
+ SET_COLLATERAL_FACTOR_VALIDATION,
88
+ SET_COLLATERAL_FACTOR_WITHOUT_PRICE,
89
+ SET_IMPLEMENTATION_OWNER_CHECK,
90
+ SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,
91
+ SET_LIQUIDATION_INCENTIVE_VALIDATION,
92
+ SET_MAX_ASSETS_OWNER_CHECK,
93
+ SET_PENDING_ADMIN_OWNER_CHECK,
94
+ SET_PENDING_IMPLEMENTATION_OWNER_CHECK,
95
+ SET_PRICE_ORACLE_OWNER_CHECK,
96
+ SUPPORT_MARKET_EXISTS,
97
+ SUPPORT_MARKET_OWNER_CHECK,
98
+ SET_PAUSE_GUARDIAN_OWNER_CHECK,
99
+
100
+ // OLA_ADDITIONS : All Enums from here
101
+ SET_LIQUIDATION_INCENTIVE_NO_EXISTS,
102
+ SET_LIQUIDATION_INCENTIVE_WITHOUT_PRICE,
103
+ SET_LIQUIDATION_FACTOR_OWNER_CHECK,
104
+ SET_LIQUIDATION_FACTOR_NO_EXISTS,
105
+ SET_LIQUIDATION_FACTOR_VALIDATION,
106
+ SET_LIQUIDATION_FACTOR_WITHOUT_PRICE,
107
+ SET_LIQUIDATION_FACTOR_LOWER_THAN_COLLATERAL_FACTOR,
108
+ SET_LIQUIDATION_FACTOR_LOWER_THAN_EXISTING_FACTOR,
109
+ SET_COLLATERAL_FACTOR_HIGHER_THAN_LIQUIDATION_FACTOR,
110
+ SET_RAIN_MAKER_OWNER_CHECK,
111
+ ENTER_MARKET_NOT_ALLOWED,
112
+ UPDATE_LN_VERSION_ADMIN_OWNER_CHECK,
113
+ // V0.002
114
+ SET_BOUNCER_OWNER_CHECK,
115
+ SET_LIMIT_MINTING_OWNER_CHECK,
116
+ SET_LIMIT_BORROWING_OWNER_CHECK,
117
+ SET_MIN_BORROW_AMOUNT_USD_OWNER_CHECK,
118
+ SUPPORT_NEW_MARKET_OWNER_CHECK,
119
+ SUPPORT_NEW_MARKET_COMBINATION_CHECK
120
+ }
121
+
122
+ /**
123
+ * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
124
+ * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
125
+ **/
126
+ event Failure(uint error, uint info, uint detail);
127
+
128
+ /**
129
+ * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
130
+ */
131
+ function fail(Error err, FailureInfo info) internal returns (uint) {
132
+ emit Failure(uint(err), uint(info), 0);
133
+
134
+ return uint(err);
135
+ }
136
+
137
+ /**
138
+ * @dev use this when reporting an opaque error from an upgradeable collaborator contract
139
+ */
140
+ function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {
141
+ emit Failure(uint(err), uint(info), opaqueError);
142
+
143
+ return uint(err);
144
+ }
145
+ }
146
+
147
+ contract TokenErrorReporter {
148
+ enum Error {
149
+ NO_ERROR,
150
+ UNAUTHORIZED,
151
+ BAD_INPUT,
152
+ COMPTROLLER_REJECTION,
153
+ COMPTROLLER_CALCULATION_ERROR,
154
+ INTEREST_RATE_MODEL_ERROR,
155
+ INVALID_ACCOUNT_PAIR,
156
+ INVALID_CLOSE_AMOUNT_REQUESTED,
157
+ INVALID_COLLATERAL_FACTOR,
158
+ MATH_ERROR,
159
+ MARKET_NOT_FRESH,
160
+ MARKET_NOT_LISTED,
161
+ TOKEN_INSUFFICIENT_ALLOWANCE,
162
+ TOKEN_INSUFFICIENT_BALANCE,
163
+ TOKEN_INSUFFICIENT_CASH,
164
+ TOKEN_TRANSFER_IN_FAILED,
165
+ TOKEN_TRANSFER_OUT_FAILED,
166
+
167
+ // OLA_ADDITIONS : All Enums from here
168
+ BAD_SYSTEM_PARAMS
169
+ }
170
+
171
+ /*
172
+ * Notice: FailureInfo (but not Error) is kept in alphabetical order
173
+ * This is because FailureInfo grows significantly faster, and
174
+ * the order of Error has some meaning, while the order of FailureInfo
175
+ * is entirely arbitrary.
176
+ */
177
+ enum FailureInfo {
178
+ ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
179
+ ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,
180
+ ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,
181
+ ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,
182
+ ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,
183
+ ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,
184
+ ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,
185
+ BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,
186
+ BORROW_ACCRUE_INTEREST_FAILED,
187
+ BORROW_CASH_NOT_AVAILABLE,
188
+ BORROW_FRESHNESS_CHECK,
189
+ BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,
190
+ BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,
191
+ BORROW_MARKET_NOT_LISTED,
192
+ BORROW_COMPTROLLER_REJECTION,
193
+ LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,
194
+ LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,
195
+ LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,
196
+ LIQUIDATE_COMPTROLLER_REJECTION,
197
+ LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,
198
+ LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,
199
+ LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,
200
+ LIQUIDATE_FRESHNESS_CHECK,
201
+ LIQUIDATE_LIQUIDATOR_IS_BORROWER,
202
+ LIQUIDATE_REPAY_BORROW_FRESH_FAILED,
203
+ LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,
204
+ LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,
205
+ LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,
206
+ LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,
207
+ LIQUIDATE_SEIZE_TOO_MUCH,
208
+ MINT_ACCRUE_INTEREST_FAILED,
209
+ MINT_COMPTROLLER_REJECTION,
210
+ MINT_EXCHANGE_CALCULATION_FAILED,
211
+ MINT_EXCHANGE_RATE_READ_FAILED,
212
+ MINT_FRESHNESS_CHECK,
213
+ MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,
214
+ MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,
215
+ MINT_TRANSFER_IN_FAILED,
216
+ MINT_TRANSFER_IN_NOT_POSSIBLE,
217
+ REDEEM_ACCRUE_INTEREST_FAILED,
218
+ REDEEM_COMPTROLLER_REJECTION,
219
+ REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,
220
+ REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,
221
+ REDEEM_EXCHANGE_RATE_READ_FAILED,
222
+ REDEEM_FRESHNESS_CHECK,
223
+ REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,
224
+ REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,
225
+ REDEEM_TRANSFER_OUT_NOT_POSSIBLE,
226
+ REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,
227
+ REDUCE_RESERVES_ADMIN_CHECK,
228
+ REDUCE_RESERVES_CASH_NOT_AVAILABLE,
229
+ REDUCE_RESERVES_FRESH_CHECK,
230
+ REDUCE_RESERVES_VALIDATION,
231
+ REPAY_BEHALF_ACCRUE_INTEREST_FAILED,
232
+ REPAY_BORROW_ACCRUE_INTEREST_FAILED,
233
+ REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,
234
+ REPAY_BORROW_COMPTROLLER_REJECTION,
235
+ REPAY_BORROW_FRESHNESS_CHECK,
236
+ REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,
237
+ REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,
238
+ REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,
239
+ SET_COLLATERAL_FACTOR_OWNER_CHECK,
240
+ SET_COLLATERAL_FACTOR_VALIDATION,
241
+ SET_COMPTROLLER_OWNER_CHECK,
242
+ SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,
243
+ SET_INTEREST_RATE_MODEL_FRESH_CHECK,
244
+ SET_INTEREST_RATE_MODEL_OWNER_CHECK,
245
+ SET_MAX_ASSETS_OWNER_CHECK,
246
+ SET_ORACLE_MARKET_NOT_LISTED,
247
+ SET_PENDING_ADMIN_OWNER_CHECK,
248
+ SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,
249
+ SET_RESERVE_FACTOR_ADMIN_CHECK,
250
+ SET_RESERVE_FACTOR_FRESH_CHECK,
251
+ SET_RESERVE_FACTOR_BOUNDS_CHECK,
252
+ TRANSFER_COMPTROLLER_REJECTION,
253
+ TRANSFER_NOT_ALLOWED,
254
+ TRANSFER_NOT_ENOUGH,
255
+ TRANSFER_TOO_MUCH,
256
+ ADD_RESERVES_ACCRUE_INTEREST_FAILED,
257
+ ADD_RESERVES_FRESH_CHECK,
258
+ ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,
259
+
260
+ // OLA_ADDITIONS : All Enums from here
261
+ REDUCE_RESERVES_OLA_PART_CALCULATION_FAILED
262
+ }
263
+
264
+ /**
265
+ * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
266
+ * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
267
+ **/
268
+ event Failure(uint error, uint info, uint detail);
269
+
270
+ /**
271
+ * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
272
+ */
273
+ function fail(Error err, FailureInfo info) internal returns (uint) {
274
+ emit Failure(uint(err), uint(info), 0);
275
+
276
+ return uint(err);
277
+ }
278
+
279
+ /**
280
+ * @dev use this when reporting an opaque error from an upgradeable collaborator contract
281
+ */
282
+ function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {
283
+ emit Failure(uint(err), uint(info), opaqueError);
284
+
285
+ return uint(err);
286
+ }
287
+ }
288
+
289
+
290
+
291
+
292
+ /**
293
+ * @title Careful Math
294
+ * @author Compound
295
+ * @notice Derived from OpenZeppelin's SafeMath library
296
+ * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol
297
+ */
298
+ contract CarefulMath {
299
+
300
+ /**
301
+ * @dev Possible error codes that we can return
302
+ */
303
+ enum MathError {
304
+ NO_ERROR,
305
+ DIVISION_BY_ZERO,
306
+ INTEGER_OVERFLOW,
307
+ INTEGER_UNDERFLOW
308
+ }
309
+
310
+ /**
311
+ * @dev Multiplies two numbers, returns an error on overflow.
312
+ */
313
+ function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {
314
+ if (a == 0) {
315
+ return (MathError.NO_ERROR, 0);
316
+ }
317
+
318
+ uint c = a * b;
319
+
320
+ if (c / a != b) {
321
+ return (MathError.INTEGER_OVERFLOW, 0);
322
+ } else {
323
+ return (MathError.NO_ERROR, c);
324
+ }
325
+ }
326
+
327
+ /**
328
+ * @dev Integer division of two numbers, truncating the quotient.
329
+ */
330
+ function divUInt(uint a, uint b) internal pure returns (MathError, uint) {
331
+ if (b == 0) {
332
+ return (MathError.DIVISION_BY_ZERO, 0);
333
+ }
334
+
335
+ return (MathError.NO_ERROR, a / b);
336
+ }
337
+
338
+ /**
339
+ * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).
340
+ */
341
+ function subUInt(uint a, uint b) internal pure returns (MathError, uint) {
342
+ if (b <= a) {
343
+ return (MathError.NO_ERROR, a - b);
344
+ } else {
345
+ return (MathError.INTEGER_UNDERFLOW, 0);
346
+ }
347
+ }
348
+
349
+ /**
350
+ * @dev Adds two numbers, returns an error on overflow.
351
+ */
352
+ function addUInt(uint a, uint b) internal pure returns (MathError, uint) {
353
+ uint c = a + b;
354
+
355
+ if (c >= a) {
356
+ return (MathError.NO_ERROR, c);
357
+ } else {
358
+ return (MathError.INTEGER_OVERFLOW, 0);
359
+ }
360
+ }
361
+
362
+ /**
363
+ * @dev add a and b and then subtract c
364
+ */
365
+ function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {
366
+ (MathError err0, uint sum) = addUInt(a, b);
367
+
368
+ if (err0 != MathError.NO_ERROR) {
369
+ return (err0, 0);
370
+ }
371
+
372
+ return subUInt(sum, c);
373
+ }
374
+ }
375
+
376
+
377
+ /**
378
+ * @title Exponential module for storing fixed-precision decimals
379
+ * @author Compound
380
+ * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.
381
+ * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:
382
+ * `Exp({mantissa: 5100000000000000000})`.
383
+ */
384
+ contract ExponentialNoError {
385
+ uint constant expScale = 1e18;
386
+ uint constant doubleScale = 1e36;
387
+ uint constant halfExpScale = expScale/2;
388
+ uint constant mantissaOne = expScale;
389
+
390
+ struct Exp {
391
+ uint mantissa;
392
+ }
393
+
394
+ struct Double {
395
+ uint mantissa;
396
+ }
397
+
398
+ /**
399
+ * @dev Truncates the given exp to a whole number value.
400
+ * For example, truncate(Exp{mantissa: 15 * expScale}) = 15
401
+ */
402
+ function truncate(Exp memory exp) pure internal returns (uint) {
403
+ // Note: We are not using careful Math here as we're performing a division that cannot fail
404
+ return exp.mantissa / expScale;
405
+ }
406
+
407
+ /**
408
+ * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.
409
+ */
410
+ function mul_ScalarTruncate(Exp memory a, uint scalar) pure internal returns (uint) {
411
+ Exp memory product = mul_(a, scalar);
412
+ return truncate(product);
413
+ }
414
+
415
+ /**
416
+ * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.
417
+ */
418
+ function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) pure internal returns (uint) {
419
+ Exp memory product = mul_(a, scalar);
420
+ return add_(truncate(product), addend);
421
+ }
422
+
423
+ /**
424
+ * @dev Checks if first Exp is less than second Exp.
425
+ */
426
+ function lessThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
427
+ return left.mantissa < right.mantissa;
428
+ }
429
+
430
+ /**
431
+ * @dev Checks if left Exp <= right Exp.
432
+ */
433
+ function lessThanOrEqualExp(Exp memory left, Exp memory right) pure internal returns (bool) {
434
+ return left.mantissa <= right.mantissa;
435
+ }
436
+
437
+ /**
438
+ * @dev Checks if left Exp > right Exp.
439
+ */
440
+ function greaterThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
441
+ return left.mantissa > right.mantissa;
442
+ }
443
+
444
+ /**
445
+ * @dev returns true if Exp is exactly zero
446
+ */
447
+ function isZeroExp(Exp memory value) pure internal returns (bool) {
448
+ return value.mantissa == 0;
449
+ }
450
+
451
+ function safe224(uint n, string memory errorMessage) pure internal returns (uint224) {
452
+ require(n < 2**224, errorMessage);
453
+ return uint224(n);
454
+ }
455
+
456
+ function safe32(uint n, string memory errorMessage) pure internal returns (uint32) {
457
+ require(n < 2**32, errorMessage);
458
+ return uint32(n);
459
+ }
460
+
461
+ function add_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
462
+ return Exp({mantissa: add_(a.mantissa, b.mantissa)});
463
+ }
464
+
465
+ function add_(Double memory a, Double memory b) pure internal returns (Double memory) {
466
+ return Double({mantissa: add_(a.mantissa, b.mantissa)});
467
+ }
468
+
469
+ function add_(uint a, uint b) pure internal returns (uint) {
470
+ return add_(a, b, "addition overflow");
471
+ }
472
+
473
+ function add_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
474
+ uint c = a + b;
475
+ require(c >= a, errorMessage);
476
+ return c;
477
+ }
478
+
479
+ function sub_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
480
+ return Exp({mantissa: sub_(a.mantissa, b.mantissa)});
481
+ }
482
+
483
+ function sub_(Double memory a, Double memory b) pure internal returns (Double memory) {
484
+ return Double({mantissa: sub_(a.mantissa, b.mantissa)});
485
+ }
486
+
487
+ function sub_(uint a, uint b) pure internal returns (uint) {
488
+ return sub_(a, b, "subtraction underflow");
489
+ }
490
+
491
+ function sub_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
492
+ require(b <= a, errorMessage);
493
+ return a - b;
494
+ }
495
+
496
+ function mul_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
497
+ return Exp({mantissa: mul_(a.mantissa, b.mantissa) / expScale});
498
+ }
499
+
500
+ function mul_(Exp memory a, uint b) pure internal returns (Exp memory) {
501
+ return Exp({mantissa: mul_(a.mantissa, b)});
502
+ }
503
+
504
+ function mul_(uint a, Exp memory b) pure internal returns (uint) {
505
+ return mul_(a, b.mantissa) / expScale;
506
+ }
507
+
508
+ function mul_(Double memory a, Double memory b) pure internal returns (Double memory) {
509
+ return Double({mantissa: mul_(a.mantissa, b.mantissa) / doubleScale});
510
+ }
511
+
512
+ function mul_(Double memory a, uint b) pure internal returns (Double memory) {
513
+ return Double({mantissa: mul_(a.mantissa, b)});
514
+ }
515
+
516
+ function mul_(uint a, Double memory b) pure internal returns (uint) {
517
+ return mul_(a, b.mantissa) / doubleScale;
518
+ }
519
+
520
+ function mul_(uint a, uint b) pure internal returns (uint) {
521
+ return mul_(a, b, "multiplication overflow");
522
+ }
523
+
524
+ function mul_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
525
+ if (a == 0 || b == 0) {
526
+ return 0;
527
+ }
528
+ uint c = a * b;
529
+ require(c / a == b, errorMessage);
530
+ return c;
531
+ }
532
+
533
+ function div_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
534
+ return Exp({mantissa: div_(mul_(a.mantissa, expScale), b.mantissa)});
535
+ }
536
+
537
+ function div_(Exp memory a, uint b) pure internal returns (Exp memory) {
538
+ return Exp({mantissa: div_(a.mantissa, b)});
539
+ }
540
+
541
+ function div_(uint a, Exp memory b) pure internal returns (uint) {
542
+ return div_(mul_(a, expScale), b.mantissa);
543
+ }
544
+
545
+ function div_(Double memory a, Double memory b) pure internal returns (Double memory) {
546
+ return Double({mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa)});
547
+ }
548
+
549
+ function div_(Double memory a, uint b) pure internal returns (Double memory) {
550
+ return Double({mantissa: div_(a.mantissa, b)});
551
+ }
552
+
553
+ function div_(uint a, Double memory b) pure internal returns (uint) {
554
+ return div_(mul_(a, doubleScale), b.mantissa);
555
+ }
556
+
557
+ function div_(uint a, uint b) pure internal returns (uint) {
558
+ return div_(a, b, "divide by zero");
559
+ }
560
+
561
+ function div_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
562
+ require(b > 0, errorMessage);
563
+ return a / b;
564
+ }
565
+
566
+ function fraction(uint a, uint b) pure internal returns (Double memory) {
567
+ return Double({mantissa: div_(mul_(a, doubleScale), b)});
568
+ }
569
+ }
570
+
571
+
572
+ /**
573
+ * @title Exponential module for storing fixed-precision decimals
574
+ * @author Compound
575
+ * @dev Legacy contract for compatibility reasons with existing contracts that still use MathError
576
+ * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.
577
+ * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:
578
+ * `Exp({mantissa: 5100000000000000000})`.
579
+ */
580
+ contract Exponential is CarefulMath, ExponentialNoError {
581
+ /**
582
+ * @dev Creates an exponential from numerator and denominator values.
583
+ * Note: Returns an error if (`num` * 10e18) > MAX_INT,
584
+ * or if `denom` is zero.
585
+ */
586
+ function getExp(uint num, uint denom) pure internal returns (MathError, Exp memory) {
587
+ (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);
588
+ if (err0 != MathError.NO_ERROR) {
589
+ return (err0, Exp({mantissa: 0}));
590
+ }
591
+
592
+ (MathError err1, uint rational) = divUInt(scaledNumerator, denom);
593
+ if (err1 != MathError.NO_ERROR) {
594
+ return (err1, Exp({mantissa: 0}));
595
+ }
596
+
597
+ return (MathError.NO_ERROR, Exp({mantissa: rational}));
598
+ }
599
+
600
+ /**
601
+ * @dev Adds two exponentials, returning a new exponential.
602
+ */
603
+ function addExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) {
604
+ (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);
605
+
606
+ return (error, Exp({mantissa: result}));
607
+ }
608
+
609
+ /**
610
+ * @dev Subtracts two exponentials, returning a new exponential.
611
+ */
612
+ function subExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) {
613
+ (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);
614
+
615
+ return (error, Exp({mantissa: result}));
616
+ }
617
+
618
+ /**
619
+ * @dev Multiply an Exp by a scalar, returning a new Exp.
620
+ */
621
+ function mulScalar(Exp memory a, uint scalar) pure internal returns (MathError, Exp memory) {
622
+ (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);
623
+ if (err0 != MathError.NO_ERROR) {
624
+ return (err0, Exp({mantissa: 0}));
625
+ }
626
+
627
+ return (MathError.NO_ERROR, Exp({mantissa: scaledMantissa}));
628
+ }
629
+
630
+ /**
631
+ * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.
632
+ */
633
+ function mulScalarTruncate(Exp memory a, uint scalar) pure internal returns (MathError, uint) {
634
+ (MathError err, Exp memory product) = mulScalar(a, scalar);
635
+ if (err != MathError.NO_ERROR) {
636
+ return (err, 0);
637
+ }
638
+
639
+ return (MathError.NO_ERROR, truncate(product));
640
+ }
641
+
642
+ /**
643
+ * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.
644
+ */
645
+ function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) pure internal returns (MathError, uint) {
646
+ (MathError err, Exp memory product) = mulScalar(a, scalar);
647
+ if (err != MathError.NO_ERROR) {
648
+ return (err, 0);
649
+ }
650
+
651
+ return addUInt(truncate(product), addend);
652
+ }
653
+
654
+ /**
655
+ * @dev Divide an Exp by a scalar, returning a new Exp.
656
+ */
657
+ function divScalar(Exp memory a, uint scalar) pure internal returns (MathError, Exp memory) {
658
+ (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);
659
+ if (err0 != MathError.NO_ERROR) {
660
+ return (err0, Exp({mantissa: 0}));
661
+ }
662
+
663
+ return (MathError.NO_ERROR, Exp({mantissa: descaledMantissa}));
664
+ }
665
+
666
+ /**
667
+ * @dev Divide a scalar by an Exp, returning a new Exp.
668
+ */
669
+ function divScalarByExp(uint scalar, Exp memory divisor) pure internal returns (MathError, Exp memory) {
670
+ /*
671
+ We are doing this as:
672
+ getExp(mulUInt(expScale, scalar), divisor.mantissa)
673
+
674
+ How it works:
675
+ Exp = a / b;
676
+ Scalar = s;
677
+ `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`
678
+ */
679
+ (MathError err0, uint numerator) = mulUInt(expScale, scalar);
680
+ if (err0 != MathError.NO_ERROR) {
681
+ return (err0, Exp({mantissa: 0}));
682
+ }
683
+ return getExp(numerator, divisor.mantissa);
684
+ }
685
+
686
+ /**
687
+ * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.
688
+ */
689
+ function divScalarByExpTruncate(uint scalar, Exp memory divisor) pure internal returns (MathError, uint) {
690
+ (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);
691
+ if (err != MathError.NO_ERROR) {
692
+ return (err, 0);
693
+ }
694
+
695
+ return (MathError.NO_ERROR, truncate(fraction));
696
+ }
697
+
698
+ /**
699
+ * @dev Multiplies two exponentials, returning a new exponential.
700
+ */
701
+ function mulExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) {
702
+
703
+ (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);
704
+ if (err0 != MathError.NO_ERROR) {
705
+ return (err0, Exp({mantissa: 0}));
706
+ }
707
+
708
+ // We add half the scale before dividing so that we get rounding instead of truncation.
709
+ // See "Listing 6" and text above it at https://accu.org/index.php/journals/1717
710
+ // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.
711
+ (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);
712
+ if (err1 != MathError.NO_ERROR) {
713
+ return (err1, Exp({mantissa: 0}));
714
+ }
715
+
716
+ (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);
717
+ // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.
718
+ assert(err2 == MathError.NO_ERROR);
719
+
720
+ return (MathError.NO_ERROR, Exp({mantissa: product}));
721
+ }
722
+
723
+ /**
724
+ * @dev Multiplies two exponentials given their mantissas, returning a new exponential.
725
+ */
726
+ function mulExp(uint a, uint b) pure internal returns (MathError, Exp memory) {
727
+ return mulExp(Exp({mantissa: a}), Exp({mantissa: b}));
728
+ }
729
+
730
+ /**
731
+ * @dev Multiplies three exponentials, returning a new exponential.
732
+ */
733
+ function mulExp3(Exp memory a, Exp memory b, Exp memory c) pure internal returns (MathError, Exp memory) {
734
+ (MathError err, Exp memory ab) = mulExp(a, b);
735
+ if (err != MathError.NO_ERROR) {
736
+ return (err, ab);
737
+ }
738
+ return mulExp(ab, c);
739
+ }
740
+
741
+ /**
742
+ * @dev Divides two exponentials, returning a new exponential.
743
+ * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,
744
+ * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)
745
+ */
746
+ function divExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) {
747
+ return getExp(a.mantissa, b.mantissa);
748
+ }
749
+ }
750
+
751
+
752
+
753
+ /**
754
+ * @title ERC 20 Token Standard Interface
755
+ * https://eips.ethereum.org/EIPS/eip-20
756
+ */
757
+ interface EIP20Interface {
758
+ function name() external view returns (string memory);
759
+ function symbol() external view returns (string memory);
760
+ function decimals() external view returns (uint8);
761
+
762
+ /**
763
+ * @notice Get the total number of tokens in circulation
764
+ * @return The supply of tokens
765
+ */
766
+ function totalSupply() external view returns (uint256);
767
+
768
+ /**
769
+ * @notice Gets the balance of the specified address
770
+ * @param owner The address from which the balance will be retrieved
771
+ * @return The balance
772
+ */
773
+ function balanceOf(address owner) external view returns (uint256 balance);
774
+
775
+ /**
776
+ * @notice Transfer `amount` tokens from `msg.sender` to `dst`
777
+ * @param dst The address of the destination account
778
+ * @param amount The number of tokens to transfer
779
+ * @return Whether or not the transfer succeeded
780
+ */
781
+ function transfer(address dst, uint256 amount) external returns (bool success);
782
+
783
+ /**
784
+ * @notice Transfer `amount` tokens from `src` to `dst`
785
+ * @param src The address of the source account
786
+ * @param dst The address of the destination account
787
+ * @param amount The number of tokens to transfer
788
+ * @return Whether or not the transfer succeeded
789
+ */
790
+ function transferFrom(address src, address dst, uint256 amount) external returns (bool success);
791
+
792
+ /**
793
+ * @notice Approve `spender` to transfer up to `amount` from `src`
794
+ * @dev This will overwrite the approval amount for `spender`
795
+ * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
796
+ * @param spender The address of the account which may transfer tokens
797
+ * @param amount The number of tokens that are approved (-1 means infinite)
798
+ * @return Whether or not the approval succeeded
799
+ */
800
+ function approve(address spender, uint256 amount) external returns (bool success);
801
+
802
+ /**
803
+ * @notice Get the current allowance from `owner` for `spender`
804
+ * @param owner The address of the account which owns the tokens to be spent
805
+ * @param spender The address of the account which may transfer tokens
806
+ * @return The number of tokens allowed to be spent (-1 means infinite)
807
+ */
808
+ function allowance(address owner, address spender) external view returns (uint256 remaining);
809
+
810
+ event Transfer(address indexed from, address indexed to, uint256 amount);
811
+ event Approval(address indexed owner, address indexed spender, uint256 amount);
812
+ }
813
+
814
+
815
+
816
+ interface RegistryForOToken {
817
+ function isSupportedInterestRateModel(address interestRateModel) external returns (bool);
818
+ function olaBankAddress() external view returns (address payable);
819
+ function blocksBased() external view returns (bool);
820
+ }
821
+
822
+ interface ComptrollerForOToken {
823
+ function adminBankAddress() external view returns (address payable);
824
+ }
825
+
826
+ /**
827
+ * View functions that are not used by the core contracts.
828
+ */
829
+ contract CTokenViewInterface {
830
+ /*** View Interface ***/
831
+ function borrowRatePerBlock() external view returns (uint);
832
+ function supplyRatePerBlock() external view returns (uint);
833
+ function totalBorrowsCurrent() external returns (uint);
834
+
835
+ /**
836
+ * @notice Used by the Maximilion
837
+ */
838
+ function borrowBalanceCurrent(address account) external returns (uint);
839
+ function exchangeRateCurrent() public returns (uint);
840
+ function getCash() external view returns (uint);
841
+ }
842
+
843
+
844
+ contract CTokenInterface {
845
+ // OLA_ADDITIONS : "Underlying field"
846
+ address constant public nativeCoinUnderlying = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
847
+
848
+ /**
849
+ * OLA_ADDITIONS : This field
850
+ * @notice This value is hard coded to 0.5 (50% for the Ola ecosystem and the LeN owner each)
851
+ */
852
+ uint constant public olaReserveFactorMantissa = 0.5e18;
853
+
854
+ /**
855
+ * @notice Indicator that this is a CToken contract (for inspection)
856
+ */
857
+ bool public constant isCToken = true;
858
+
859
+ /**
860
+ * @notice Maximum borrow rate that can ever be applied (.0005% / block)
861
+ */
862
+ uint internal constant borrowRateMaxMantissa = 0.0005e16;
863
+
864
+ /**
865
+ * @notice Maximum fraction of interest that can be set aside for reserves
866
+ */
867
+ uint internal constant reserveFactorMaxMantissa = 0.3e18;
868
+
869
+ /**
870
+ * OLA_ADDITIONS : This value
871
+ * @notice Minimum fraction of interest that can be set aside for reserves
872
+ */
873
+ uint internal constant reserveFactorMinMantissa = 0.05e18;
874
+
875
+ /*** Market Events ***/
876
+
877
+ /**
878
+ * @notice Event emitted when interest is accrued
879
+ */
880
+ event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);
881
+
882
+ /**
883
+ * @notice Event emitted when tokens are minted
884
+ */
885
+ event Mint(address minter, uint mintAmount, uint mintTokens);
886
+
887
+ /**
888
+ * @notice Event emitted when tokens are redeemed
889
+ */
890
+ event Redeem(address redeemer, uint redeemAmount, uint redeemTokens);
891
+
892
+ /**
893
+ * @notice Event emitted when underlying is borrowed
894
+ */
895
+ event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);
896
+
897
+ /**
898
+ * @notice Event emitted when a borrow is repaid
899
+ */
900
+ event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);
901
+
902
+ /**
903
+ * @notice Event emitted when a borrow is liquidated
904
+ */
905
+ event LiquidateBorrow(address liquidator, address borrower, uint repayAmount, address cTokenCollateral, uint seizeTokens);
906
+
907
+
908
+ /*** Admin Events ***/
909
+
910
+ /**
911
+ * @notice Event emitted when pendingAdmin is changed
912
+ */
913
+ event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);
914
+
915
+ /**
916
+ * @notice Event emitted when pendingAdmin is accepted, which means admin is updated
917
+ */
918
+ event NewAdmin(address oldAdmin, address newAdmin);
919
+
920
+ /**
921
+ * @notice Event emitted when Comptroller is changed
922
+ */
923
+ event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);
924
+
925
+ /**
926
+ * @notice Event emitted when interestRateModel is changed
927
+ */
928
+ event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);
929
+
930
+ /**
931
+ * @notice Event emitted when the reserve factor is changed
932
+ */
933
+ event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);
934
+
935
+ /**
936
+ * @notice Event emitted when the reserves are reduced
937
+ */
938
+ event ReservesReduced(address admin, uint adminPart, address olaBank, uint olaPart, uint newTotalReserves);
939
+
940
+ /**
941
+ * @notice EIP20 Transfer event
942
+ */
943
+ event Transfer(address indexed from, address indexed to, uint amount);
944
+
945
+ /**
946
+ * @notice EIP20 Approval event
947
+ */
948
+ event Approval(address indexed owner, address indexed spender, uint amount);
949
+
950
+ /**
951
+ * @notice Failure event
952
+ */
953
+ event Failure(uint error, uint info, uint detail);
954
+
955
+ /*** User Interface ***/
956
+
957
+ function transfer(address dst, uint amount) external returns (bool);
958
+ function transferFrom(address src, address dst, uint amount) external returns (bool);
959
+ function approve(address spender, uint amount) external returns (bool);
960
+ function allowance(address owner, address spender) external view returns (uint);
961
+ function balanceOf(address owner) external view returns (uint);
962
+ function balanceOfUnderlying(address owner) external returns (uint);
963
+ function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);
964
+ function borrowBalanceStored(address account) public view returns (uint);
965
+ function exchangeRateStored() public view returns (uint);
966
+ function getAccrualBlockNumber() external view returns (uint);
967
+ function accrueInterest() public returns (uint);
968
+ function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);
969
+
970
+ /*** Admin Functions ***/
971
+
972
+ function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);
973
+ function _acceptAdmin() external returns (uint);
974
+ function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);
975
+ function _reduceReserves(uint reduceAmount) external returns (uint);
976
+ function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);
977
+ }
978
+
979
+
980
+ /**
981
+ * OLA_ADDITIONS : This base admin storage.
982
+ */
983
+ contract CTokenAdminStorage {
984
+ /**
985
+ * @notice Administrator for this contract
986
+ */
987
+ address payable public admin;
988
+
989
+ /**
990
+ * @notice Pending administrator for this contract
991
+ */
992
+ address payable public pendingAdmin;
993
+
994
+ /**
995
+ * @notice Contract which oversees inter-cToken operations
996
+ */
997
+ ComptrollerInterface public comptroller;
998
+
999
+ /**
1000
+ * @notice Implementation address for this contract
1001
+ */
1002
+ address public implementation;
1003
+
1004
+ // OLA_ADDITIONS : Contract hash name
1005
+ bytes32 public contractNameHash;
1006
+ }
1007
+
1008
+ /**
1009
+ * @notice DO NOT ADD ANY MORE STORAGE VARIABLES HERE (add them to their respective type storage)
1010
+ */
1011
+ contract CTokenStorage is CTokenAdminStorage {
1012
+ /**
1013
+ * @dev Guard variable for re-entrancy checks
1014
+ */
1015
+ bool internal _notEntered;
1016
+
1017
+ /**
1018
+ * @notice EIP-20 token name for this token
1019
+ */
1020
+ string public name;
1021
+
1022
+ /**
1023
+ * @notice EIP-20 token symbol for this token
1024
+ */
1025
+ string public symbol;
1026
+
1027
+ /**
1028
+ * @notice EIP-20 token decimals for this token
1029
+ */
1030
+ uint8 public decimals;
1031
+
1032
+ /**
1033
+ * @notice Underlying asset for this CToken
1034
+ */
1035
+ address public underlying;
1036
+
1037
+ // @notice Indicates if the calculations should be blocks or time based
1038
+ bool public blocksBased;
1039
+
1040
+ /**
1041
+ * @notice Model which tells what the current interest rate should be
1042
+ */
1043
+ InterestRateModel public interestRateModel;
1044
+
1045
+ /**
1046
+ * @notice Initial exchange rate used when minting the first CTokens (used when totalSupply = 0)
1047
+ */
1048
+ uint internal initialExchangeRateMantissa;
1049
+
1050
+ /**
1051
+ * @notice Fraction of interest currently set aside for reserves
1052
+ */
1053
+ uint public reserveFactorMantissa;
1054
+
1055
+ /**
1056
+ * @notice Block number that interest was last accrued at
1057
+ */
1058
+ uint public accrualBlockNumber;
1059
+
1060
+ /**
1061
+ * @notice Block number that interest was last accrued at
1062
+ */
1063
+ uint public accrualBlockTimestamp;
1064
+
1065
+ /**
1066
+ * @notice Accumulator of the total earned interest rate since the opening of the market
1067
+ */
1068
+ uint public borrowIndex;
1069
+
1070
+ /**
1071
+ * @notice Total amount of outstanding borrows of the underlying in this market
1072
+ */
1073
+ uint public totalBorrows;
1074
+
1075
+ /**
1076
+ * OLA_ADDITIONS : Removed option to 'add reserves' as it makes no sense when reducing reserves
1077
+ * sends a part to Ola Bank.
1078
+ * @notice Total amount of reserves of the underlying held in this market
1079
+ */
1080
+ uint public totalReserves;
1081
+
1082
+ /**
1083
+ * @notice Total number of tokens in circulation
1084
+ */
1085
+ uint public totalSupply;
1086
+
1087
+ /**
1088
+ * @notice Official record of token balances for each account
1089
+ */
1090
+ mapping (address => uint) internal accountTokens;
1091
+
1092
+ /**
1093
+ * @notice Approved token transfer amounts on behalf of others
1094
+ */
1095
+ mapping (address => mapping (address => uint)) internal transferAllowances;
1096
+
1097
+ /**
1098
+ * @notice Container for borrow balance information
1099
+ * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action
1100
+ * @member interestIndex Global borrowIndex as of the most recent balance-changing action
1101
+ */
1102
+ struct BorrowSnapshot {
1103
+ uint principal;
1104
+ uint interestIndex;
1105
+ }
1106
+
1107
+ /**
1108
+ * @notice Mapping of account addresses to outstanding borrow balances
1109
+ */
1110
+ mapping(address => BorrowSnapshot) internal accountBorrows;
1111
+
1112
+ // IMPORTANT : DO NOT ADD ANY MORE STORAGE VARIABLES HERE (add them to their respective type storage)
1113
+ }
1114
+
1115
+ /**
1116
+ * @title Compound's CToken Contract
1117
+ * @notice Abstract base for CTokens
1118
+ * @author Compound
1119
+ */
1120
+ contract CToken is CTokenStorage, CTokenInterface, CTokenViewInterface, Exponential, TokenErrorReporter {
1121
+ /**
1122
+ * @notice Initialize the money market
1123
+ * @param comptroller_ The address of the Comptroller
1124
+ * @param interestRateModel_ The address of the interest rate model
1125
+ * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18
1126
+ * @param name_ EIP-20 name of this token
1127
+ * @param symbol_ EIP-20 symbol of this token
1128
+ * @param decimals_ EIP-20 decimal precision of this token
1129
+ */
1130
+ function initialize(ComptrollerInterface comptroller_,
1131
+ InterestRateModel interestRateModel_,
1132
+ uint initialExchangeRateMantissa_,
1133
+ string memory name_,
1134
+ string memory symbol_,
1135
+ uint8 decimals_) public {
1136
+ require(msg.sender == admin, "only admin may initialize the market");
1137
+ require(accrualBlockNumber == 0 && borrowIndex == 0, "market may only be initialized once");
1138
+
1139
+ // Set initial exchange rate
1140
+ initialExchangeRateMantissa = initialExchangeRateMantissa_;
1141
+ require(initialExchangeRateMantissa > 0, "initial exchange rate must be greater than zero.");
1142
+
1143
+ // Set the Comptroller
1144
+ uint err = _setComptroller(comptroller_);
1145
+ require(err == uint(Error.NO_ERROR), "setting comptroller failed");
1146
+
1147
+ // Initialize block number and borrow index (block number mocks depend on Comptroller being set)
1148
+ accrualBlockNumber = getBlockNumber();
1149
+ accrualBlockTimestamp = getBlockTimestamp();
1150
+ borrowIndex = mantissaOne;
1151
+
1152
+ // Set the calculation based flag from the ministry
1153
+ RegistryForOToken ministry = RegistryForOToken(comptroller.getRegistry());
1154
+ blocksBased = ministry.blocksBased();
1155
+
1156
+ // Set the interest rate model (depends on block number / borrow index)
1157
+ err = _setInterestRateModelFresh(interestRateModel_);
1158
+ require(err == uint(Error.NO_ERROR), "setting interest rate model failed");
1159
+
1160
+ name = name_;
1161
+ symbol = symbol_;
1162
+ decimals = decimals_;
1163
+
1164
+ // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)
1165
+ _notEntered = true;
1166
+ }
1167
+
1168
+ /**
1169
+ * @notice Transfer `tokens` tokens from `src` to `dst` by `spender`
1170
+ * @dev Called by both `transfer` and `transferFrom` internally
1171
+ * @param spender The address of the account performing the transfer
1172
+ * @param src The address of the source account
1173
+ * @param dst The address of the destination account
1174
+ * @param tokens The number of tokens to transfer
1175
+ * @return Whether or not the transfer succeeded
1176
+ */
1177
+ function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {
1178
+ /* Fail if transfer not allowed */
1179
+ uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);
1180
+ if (allowed != 0) {
1181
+ return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);
1182
+ }
1183
+
1184
+ /* Do not allow self-transfers */
1185
+ if (src == dst) {
1186
+ return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);
1187
+ }
1188
+
1189
+ /* Get the allowance, infinite for the account owner */
1190
+ uint startingAllowance = 0;
1191
+ if (spender == src) {
1192
+ startingAllowance = uint(-1);
1193
+ } else {
1194
+ startingAllowance = transferAllowances[src][spender];
1195
+ }
1196
+
1197
+ /* Do the calculations, checking for {under,over}flow */
1198
+ MathError mathErr;
1199
+ uint allowanceNew;
1200
+ uint srcTokensNew;
1201
+ uint dstTokensNew;
1202
+
1203
+ (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);
1204
+ if (mathErr != MathError.NO_ERROR) {
1205
+ return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);
1206
+ }
1207
+
1208
+ (mathErr, srcTokensNew) = subUInt(accountTokens[src], tokens);
1209
+ if (mathErr != MathError.NO_ERROR) {
1210
+ return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);
1211
+ }
1212
+
1213
+ (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);
1214
+ if (mathErr != MathError.NO_ERROR) {
1215
+ return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);
1216
+ }
1217
+
1218
+ /////////////////////////
1219
+ // EFFECTS & INTERACTIONS
1220
+ // (No safe failures beyond this point)
1221
+
1222
+ accountTokens[src] = srcTokensNew;
1223
+ accountTokens[dst] = dstTokensNew;
1224
+
1225
+ /* Eat some of the allowance (if necessary) */
1226
+ if (startingAllowance != uint(-1)) {
1227
+ transferAllowances[src][spender] = allowanceNew;
1228
+ }
1229
+
1230
+ /* We emit a Transfer event */
1231
+ emit Transfer(src, dst, tokens);
1232
+
1233
+ // unused function
1234
+ comptroller.transferVerify(address(this), src, dst, tokens);
1235
+
1236
+ return uint(Error.NO_ERROR);
1237
+ }
1238
+
1239
+ /**
1240
+ * @notice Transfer `amount` tokens from `msg.sender` to `dst`
1241
+ * @param dst The address of the destination account
1242
+ * @param amount The number of tokens to transfer
1243
+ * @return Whether or not the transfer succeeded
1244
+ */
1245
+ function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {
1246
+ return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);
1247
+ }
1248
+
1249
+ /**
1250
+ * @notice Transfer `amount` tokens from `src` to `dst`
1251
+ * @param src The address of the source account
1252
+ * @param dst The address of the destination account
1253
+ * @param amount The number of tokens to transfer
1254
+ * @return Whether or not the transfer succeeded
1255
+ */
1256
+ function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {
1257
+ return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);
1258
+ }
1259
+
1260
+ /**
1261
+ * @notice Approve `spender` to transfer up to `amount` from `src`
1262
+ * @dev This will overwrite the approval amount for `spender`
1263
+ * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
1264
+ * @param spender The address of the account which may transfer tokens
1265
+ * @param amount The number of tokens that are approved (-1 means infinite)
1266
+ * @return Whether or not the approval succeeded
1267
+ */
1268
+ function approve(address spender, uint256 amount) external returns (bool) {
1269
+ address src = msg.sender;
1270
+ transferAllowances[src][spender] = amount;
1271
+ emit Approval(src, spender, amount);
1272
+ return true;
1273
+ }
1274
+
1275
+ /**
1276
+ * @notice Get the current allowance from `owner` for `spender`
1277
+ * @param owner The address of the account which owns the tokens to be spent
1278
+ * @param spender The address of the account which may transfer tokens
1279
+ * @return The number of tokens allowed to be spent (-1 means infinite)
1280
+ */
1281
+ function allowance(address owner, address spender) external view returns (uint256) {
1282
+ return transferAllowances[owner][spender];
1283
+ }
1284
+
1285
+ /**
1286
+ * @notice Get the token balance of the `owner`
1287
+ * @param owner The address of the account to query
1288
+ * @return The number of tokens owned by `owner`
1289
+ */
1290
+ function balanceOf(address owner) external view returns (uint256) {
1291
+ return accountTokens[owner];
1292
+ }
1293
+
1294
+ /**
1295
+ * @notice Get the underlying balance of the `owner`
1296
+ * @dev This also accrues interest in a transaction
1297
+ * @param owner The address of the account to query
1298
+ * @return The amount of underlying owned by `owner`
1299
+ */
1300
+ function balanceOfUnderlying(address owner) external returns (uint) {
1301
+ Exp memory exchangeRate = Exp({mantissa: exchangeRateCurrent()});
1302
+ (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);
1303
+ require(mErr == MathError.NO_ERROR, "balance could not be calculated");
1304
+ return balance;
1305
+ }
1306
+
1307
+ /**
1308
+ * @notice Get a snapshot of the account's balances, and the cached exchange rate
1309
+ * @dev This is used by Comptroller to more efficiently perform liquidity checks.
1310
+ * @param account Address of the account to snapshot
1311
+ * @return (possible error, token balance, borrow balance, exchange rate mantissa)
1312
+ */
1313
+ function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {
1314
+ uint cTokenBalance = accountTokens[account];
1315
+ uint borrowBalance;
1316
+ uint exchangeRateMantissa;
1317
+
1318
+ MathError mErr;
1319
+
1320
+ (mErr, borrowBalance) = borrowBalanceStoredInternal(account);
1321
+ if (mErr != MathError.NO_ERROR) {
1322
+ return (uint(Error.MATH_ERROR), 0, 0, 0);
1323
+ }
1324
+
1325
+ (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();
1326
+ if (mErr != MathError.NO_ERROR) {
1327
+ return (uint(Error.MATH_ERROR), 0, 0, 0);
1328
+ }
1329
+
1330
+ return (uint(Error.NO_ERROR), cTokenBalance, borrowBalance, exchangeRateMantissa);
1331
+ }
1332
+
1333
+ /**
1334
+ * @dev Function to simply retrieve block number
1335
+ * This exists mainly for inheriting test contracts to stub this result.
1336
+ */
1337
+ function getBlockNumber() internal view returns (uint) {
1338
+ return block.number;
1339
+ }
1340
+
1341
+ /**
1342
+ * @dev Function to simply retrieve block timestamp
1343
+ * This exists mainly for inheriting test contracts to stub this result.
1344
+ */
1345
+ function getBlockTimestamp() internal view returns (uint) {
1346
+ return block.timestamp;
1347
+ }
1348
+
1349
+ /**
1350
+ * @notice Returns the current per-block borrow interest rate for this cToken
1351
+ * @return The borrow interest rate per block, scaled by 1e18
1352
+ */
1353
+ function borrowRatePerBlock() external view returns (uint) {
1354
+ return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);
1355
+ }
1356
+
1357
+ /**
1358
+ * @notice Returns the current per-block supply interest rate for this cToken
1359
+ * @return The supply interest rate per block, scaled by 1e18
1360
+ */
1361
+ function supplyRatePerBlock() external view returns (uint) {
1362
+ return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);
1363
+ }
1364
+
1365
+ /**
1366
+ * @notice Returns the current total borrows plus accrued interest
1367
+ * @return The total borrows with interest
1368
+ */
1369
+ function totalBorrowsCurrent() external nonReentrant returns (uint) {
1370
+ require(accrueInterest() == uint(Error.NO_ERROR), "accrue interest failed");
1371
+ return totalBorrows;
1372
+ }
1373
+
1374
+ /**
1375
+ * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex
1376
+ * @param account The address whose balance should be calculated after updating borrowIndex
1377
+ * @return The calculated balance
1378
+ */
1379
+ function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {
1380
+ require(accrueInterest() == uint(Error.NO_ERROR), "accrue interest failed");
1381
+ return borrowBalanceStored(account);
1382
+ }
1383
+
1384
+ /**
1385
+ * @notice Return the borrow balance of account based on stored data
1386
+ * @param account The address whose balance should be calculated
1387
+ * @return The calculated balance
1388
+ */
1389
+ function borrowBalanceStored(address account) public view returns (uint) {
1390
+ (MathError err, uint result) = borrowBalanceStoredInternal(account);
1391
+ require(err == MathError.NO_ERROR, "borrowBalanceStored: borrowBalanceStoredInternal failed");
1392
+ return result;
1393
+ }
1394
+
1395
+ /**
1396
+ * @notice Return the borrow balance of account based on stored data
1397
+ * @param account The address whose balance should be calculated
1398
+ * @return (error code, the calculated balance or 0 if error code is non-zero)
1399
+ */
1400
+ function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {
1401
+ /* Note: we do not assert that the market is up to date */
1402
+ MathError mathErr;
1403
+ uint principalTimesIndex;
1404
+ uint result;
1405
+
1406
+ /* Get borrowBalance and borrowIndex */
1407
+ BorrowSnapshot storage borrowSnapshot = accountBorrows[account];
1408
+
1409
+ /* If borrowBalance = 0 then borrowIndex is likely also 0.
1410
+ * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.
1411
+ */
1412
+ if (borrowSnapshot.principal == 0) {
1413
+ return (MathError.NO_ERROR, 0);
1414
+ }
1415
+
1416
+ /* Calculate new borrow balance using the interest index:
1417
+ * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex
1418
+ */
1419
+ (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);
1420
+ if (mathErr != MathError.NO_ERROR) {
1421
+ return (mathErr, 0);
1422
+ }
1423
+
1424
+ (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);
1425
+ if (mathErr != MathError.NO_ERROR) {
1426
+ return (mathErr, 0);
1427
+ }
1428
+
1429
+ return (MathError.NO_ERROR, result);
1430
+ }
1431
+
1432
+ /**
1433
+ * @notice Accrue interest then return the up-to-date exchange rate
1434
+ * @return Calculated exchange rate scaled by 1e18
1435
+ */
1436
+ function exchangeRateCurrent() public nonReentrant returns (uint) {
1437
+ require(accrueInterest() == uint(Error.NO_ERROR), "accrue interest failed");
1438
+ return exchangeRateStored();
1439
+ }
1440
+
1441
+ /**
1442
+ * @notice Calculates the exchange rate from the underlying to the CToken
1443
+ * @dev This function does not accrue interest before calculating the exchange rate
1444
+ * @return Calculated exchange rate scaled by 1e18
1445
+ */
1446
+ function exchangeRateStored() public view returns (uint) {
1447
+ (MathError err, uint result) = exchangeRateStoredInternal();
1448
+ require(err == MathError.NO_ERROR, "exchangeRateStored: exchangeRateStoredInternal failed");
1449
+ return result;
1450
+ }
1451
+
1452
+ /**
1453
+ * @notice Calculates the exchange rate from the underlying to the CToken
1454
+ * @dev This function does not accrue interest before calculating the exchange rate
1455
+ * @return (error code, calculated exchange rate scaled by 1e18)
1456
+ */
1457
+ function exchangeRateStoredInternal() internal view returns (MathError, uint) {
1458
+ uint _totalSupply = totalSupply;
1459
+ if (_totalSupply == 0) {
1460
+ /*
1461
+ * If there are no tokens minted:
1462
+ * exchangeRate = initialExchangeRate
1463
+ */
1464
+ return (MathError.NO_ERROR, initialExchangeRateMantissa);
1465
+ } else {
1466
+ /*
1467
+ * Otherwise:
1468
+ * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply
1469
+ */
1470
+ uint totalCash = getCashPrior();
1471
+ uint cashPlusBorrowsMinusReserves;
1472
+ Exp memory exchangeRate;
1473
+ MathError mathErr;
1474
+
1475
+ (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);
1476
+ if (mathErr != MathError.NO_ERROR) {
1477
+ return (mathErr, 0);
1478
+ }
1479
+
1480
+ (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);
1481
+ if (mathErr != MathError.NO_ERROR) {
1482
+ return (mathErr, 0);
1483
+ }
1484
+
1485
+ return (MathError.NO_ERROR, exchangeRate.mantissa);
1486
+ }
1487
+ }
1488
+
1489
+ /**
1490
+ * @notice Get cash balance of this cToken in the underlying asset
1491
+ * @return The quantity of underlying asset owned by this contract
1492
+ */
1493
+ function getCash() external view returns (uint) {
1494
+ return getCashPrior();
1495
+ }
1496
+
1497
+ /**
1498
+ * @notice Get the accrual block number of this cToken
1499
+ * @return The accrual block number
1500
+ */
1501
+ function getAccrualBlockNumber() external view returns (uint) {
1502
+ return accrualBlockNumber;
1503
+ }
1504
+
1505
+ /**
1506
+ * @notice Applies accrued interest to total borrows and reserves
1507
+ * @dev This calculates interest accrued from the last checkpointed block
1508
+ * up to the current block and writes new checkpoint to storage.
1509
+ */
1510
+ function accrueInterest() public returns (uint) {
1511
+ /* Remember the initial block number */
1512
+ uint currentBlockNumber = getBlockNumber();
1513
+ uint accrualBlockNumberPrior = accrualBlockNumber;
1514
+ uint currentBlockTimestamp = getBlockTimestamp();
1515
+
1516
+ /* Short-circuit accumulating 0 interest */
1517
+ if (accrualBlockNumberPrior == currentBlockNumber) {
1518
+ return uint(Error.NO_ERROR);
1519
+ }
1520
+
1521
+ // OLA_ADDITIONS : Distinction between time and block based calculations
1522
+ /* Calculate the number of blocks elapsed since the last accrual */
1523
+ MathError mathErr;
1524
+ uint delta;
1525
+
1526
+ if (blocksBased) {
1527
+ (mathErr, delta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);
1528
+ } else {
1529
+ // This variable is defined here due to solidity limits
1530
+ uint accrualBlockTimestampPrior = accrualBlockTimestamp;
1531
+
1532
+ /* Short-circuit accumulating 0 interest on time based chains + extra safety for weird timestamps */
1533
+ if (currentBlockTimestamp <= accrualBlockTimestampPrior) {
1534
+ return uint(Error.NO_ERROR);
1535
+ }
1536
+
1537
+ (mathErr, delta) = subUInt(currentBlockTimestamp, accrualBlockTimestampPrior);
1538
+ }
1539
+ require(mathErr == MathError.NO_ERROR, "could not calculate delta");
1540
+
1541
+ /* Read the previous values out of storage */
1542
+ uint cashPrior = getCashPrior();
1543
+ uint borrowsPrior = totalBorrows;
1544
+ uint reservesPrior = totalReserves;
1545
+ uint borrowIndexPrior = borrowIndex;
1546
+
1547
+ /* Calculate the current borrow interest rate */
1548
+ uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);
1549
+ require(borrowRateMantissa <= borrowRateMaxMantissa, "borrow rate is absurdly high");
1550
+
1551
+ /*
1552
+ * Calculate the interest accumulated into borrows and reserves and the new index:
1553
+ * simpleInterestFactor = borrowRate * delta
1554
+ * interestAccumulated = simpleInterestFactor * totalBorrows
1555
+ * totalBorrowsNew = interestAccumulated + totalBorrows
1556
+ * totalReservesNew = interestAccumulated * reserveFactor + totalReserves
1557
+ * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex
1558
+ */
1559
+
1560
+ Exp memory simpleInterestFactor;
1561
+ uint interestAccumulated;
1562
+ uint totalBorrowsNew;
1563
+ uint totalReservesNew;
1564
+ uint borrowIndexNew;
1565
+
1566
+ (mathErr, simpleInterestFactor) = mulScalar(Exp({mantissa: borrowRateMantissa}), delta);
1567
+ if (mathErr != MathError.NO_ERROR) {
1568
+ return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED, uint(mathErr));
1569
+ }
1570
+
1571
+ (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);
1572
+ if (mathErr != MathError.NO_ERROR) {
1573
+ return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED, uint(mathErr));
1574
+ }
1575
+
1576
+ (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);
1577
+ if (mathErr != MathError.NO_ERROR) {
1578
+ return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED, uint(mathErr));
1579
+ }
1580
+
1581
+ (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(Exp({mantissa: reserveFactorMantissa}), interestAccumulated, reservesPrior);
1582
+ if (mathErr != MathError.NO_ERROR) {
1583
+ return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED, uint(mathErr));
1584
+ }
1585
+
1586
+ (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);
1587
+ if (mathErr != MathError.NO_ERROR) {
1588
+ return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED, uint(mathErr));
1589
+ }
1590
+
1591
+ /////////////////////////
1592
+ // EFFECTS & INTERACTIONS
1593
+ // (No safe failures beyond this point)
1594
+
1595
+ /* We write the previously calculated values into storage */
1596
+ accrualBlockNumber = currentBlockNumber;
1597
+ accrualBlockTimestamp = currentBlockTimestamp;
1598
+ borrowIndex = borrowIndexNew;
1599
+ totalBorrows = totalBorrowsNew;
1600
+ totalReserves = totalReservesNew;
1601
+
1602
+ /* We emit an AccrueInterest event */
1603
+ emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);
1604
+
1605
+ return uint(Error.NO_ERROR);
1606
+ }
1607
+
1608
+ /**
1609
+ * @notice Sender supplies assets into the market and receives cTokens in exchange
1610
+ * @dev Accrues interest whether or not the operation succeeds, unless reverted
1611
+ * @param mintAmount The amount of the underlying asset to supply
1612
+ * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.
1613
+ */
1614
+ function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {
1615
+ uint error = accrueInterest();
1616
+ if (error != uint(Error.NO_ERROR)) {
1617
+ // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed
1618
+ return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);
1619
+ }
1620
+ // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to
1621
+ return mintFresh(msg.sender, mintAmount);
1622
+ }
1623
+
1624
+ struct MintLocalVars {
1625
+ Error err;
1626
+ MathError mathErr;
1627
+ uint exchangeRateMantissa;
1628
+ uint mintTokens;
1629
+ uint totalSupplyNew;
1630
+ uint accountTokensNew;
1631
+ uint actualMintAmount;
1632
+ }
1633
+
1634
+ /**
1635
+ * @notice User supplies assets into the market and receives cTokens in exchange
1636
+ * @dev Assumes interest has already been accrued up to the current block
1637
+ * @param minter The address of the account which is supplying the assets
1638
+ * @param mintAmount The amount of the underlying asset to supply
1639
+ * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.
1640
+ */
1641
+ function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {
1642
+ /* Fail if mint not allowed */
1643
+ uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);
1644
+ if (allowed != 0) {
1645
+ return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);
1646
+ }
1647
+
1648
+ /* Verify market's block number equals current block number */
1649
+ if (accrualBlockNumber != getBlockNumber()) {
1650
+ return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);
1651
+ }
1652
+
1653
+ MintLocalVars memory vars;
1654
+
1655
+ (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();
1656
+ if (vars.mathErr != MathError.NO_ERROR) {
1657
+ return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);
1658
+ }
1659
+
1660
+ /////////////////////////
1661
+ // EFFECTS & INTERACTIONS
1662
+ // (No safe failures beyond this point)
1663
+
1664
+ /*
1665
+ * We call `doTransferIn` for the minter and the mintAmount.
1666
+ * Note: The cToken must handle variations between ERC-20 and ETH underlying.
1667
+ * `doTransferIn` reverts if anything goes wrong, since we can't be sure if
1668
+ * side-effects occurred. The function returns the amount actually transferred,
1669
+ * in case of a fee. On success, the cToken holds an additional `actualMintAmount`
1670
+ * of cash.
1671
+ */
1672
+ vars.actualMintAmount = doTransferIn(minter, mintAmount);
1673
+
1674
+ /*
1675
+ * We get the current exchange rate and calculate the number of cTokens to be minted:
1676
+ * mintTokens = actualMintAmount / exchangeRate
1677
+ */
1678
+
1679
+ (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(vars.actualMintAmount, Exp({mantissa: vars.exchangeRateMantissa}));
1680
+ require(vars.mathErr == MathError.NO_ERROR, "MINT_EXCHANGE_CALCULATION_FAILED");
1681
+
1682
+ /*
1683
+ * We calculate the new total supply of cTokens and minter token balance, checking for overflow:
1684
+ * totalSupplyNew = totalSupply + mintTokens
1685
+ * accountTokensNew = accountTokens[minter] + mintTokens
1686
+ */
1687
+ (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);
1688
+ require(vars.mathErr == MathError.NO_ERROR, "MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED");
1689
+
1690
+ (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);
1691
+ require(vars.mathErr == MathError.NO_ERROR, "MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED");
1692
+
1693
+ /* We write previously calculated values into storage */
1694
+ totalSupply = vars.totalSupplyNew;
1695
+ accountTokens[minter] = vars.accountTokensNew;
1696
+
1697
+ /* We emit a Mint event, and a Transfer event */
1698
+ emit Mint(minter, vars.actualMintAmount, vars.mintTokens);
1699
+ emit Transfer(address(this), minter, vars.mintTokens);
1700
+
1701
+ /* We call the defense hook */
1702
+ // unused function
1703
+ comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);
1704
+
1705
+ return (uint(Error.NO_ERROR), vars.actualMintAmount);
1706
+ }
1707
+
1708
+ /**
1709
+ * @notice Sender redeems cTokens in exchange for the underlying asset
1710
+ * @dev Accrues interest whether or not the operation succeeds, unless reverted
1711
+ * @param redeemTokens The number of cTokens to redeem into underlying
1712
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
1713
+ */
1714
+ function redeemInternal(uint redeemTokens) internal nonReentrant returns (uint) {
1715
+ uint error = accrueInterest();
1716
+ if (error != uint(Error.NO_ERROR)) {
1717
+ // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed
1718
+ return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);
1719
+ }
1720
+ // redeemFresh emits redeem-specific logs on errors, so we don't need to
1721
+ return redeemFresh(msg.sender, redeemTokens, 0);
1722
+ }
1723
+
1724
+ /**
1725
+ * @notice Sender redeems cTokens in exchange for a specified amount of underlying asset
1726
+ * @dev Accrues interest whether or not the operation succeeds, unless reverted
1727
+ * @param redeemAmount The amount of underlying to receive from redeeming cTokens
1728
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
1729
+ */
1730
+ function redeemUnderlyingInternal(uint redeemAmount) internal nonReentrant returns (uint) {
1731
+ uint error = accrueInterest();
1732
+ if (error != uint(Error.NO_ERROR)) {
1733
+ // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed
1734
+ return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);
1735
+ }
1736
+ // redeemFresh emits redeem-specific logs on errors, so we don't need to
1737
+ return redeemFresh(msg.sender, 0, redeemAmount);
1738
+ }
1739
+
1740
+ struct RedeemLocalVars {
1741
+ Error err;
1742
+ MathError mathErr;
1743
+ uint exchangeRateMantissa;
1744
+ uint redeemTokens;
1745
+ uint redeemAmount;
1746
+ uint totalSupplyNew;
1747
+ uint accountTokensNew;
1748
+ }
1749
+
1750
+ /**
1751
+ * @notice User redeems cTokens in exchange for the underlying asset
1752
+ * @dev Assumes interest has already been accrued up to the current block
1753
+ * @param redeemer The address of the account which is redeeming the tokens
1754
+ * @param redeemTokensIn The number of cTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)
1755
+ * @param redeemAmountIn The number of underlying tokens to receive from redeeming cTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)
1756
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
1757
+ */
1758
+ function redeemFresh(address payable redeemer, uint redeemTokensIn, uint redeemAmountIn) internal returns (uint) {
1759
+ require(redeemTokensIn == 0 || redeemAmountIn == 0, "one of redeemTokensIn or redeemAmountIn must be zero");
1760
+
1761
+ RedeemLocalVars memory vars;
1762
+
1763
+ /* exchangeRate = invoke Exchange Rate Stored() */
1764
+ (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();
1765
+ if (vars.mathErr != MathError.NO_ERROR) {
1766
+ return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr));
1767
+ }
1768
+
1769
+ /* If redeemTokensIn > 0: */
1770
+ if (redeemTokensIn > 0) {
1771
+ /*
1772
+ * We calculate the exchange rate and the amount of underlying to be redeemed:
1773
+ * redeemTokens = redeemTokensIn
1774
+ * redeemAmount = redeemTokensIn x exchangeRateCurrent
1775
+ */
1776
+ vars.redeemTokens = redeemTokensIn;
1777
+
1778
+ (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(Exp({mantissa: vars.exchangeRateMantissa}), redeemTokensIn);
1779
+ if (vars.mathErr != MathError.NO_ERROR) {
1780
+ return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED, uint(vars.mathErr));
1781
+ }
1782
+ } else {
1783
+ /*
1784
+ * We get the current exchange rate and calculate the amount to be redeemed:
1785
+ * redeemTokens = redeemAmountIn / exchangeRate
1786
+ * redeemAmount = redeemAmountIn
1787
+ */
1788
+
1789
+ (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(redeemAmountIn, Exp({mantissa: vars.exchangeRateMantissa}));
1790
+ if (vars.mathErr != MathError.NO_ERROR) {
1791
+ return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED, uint(vars.mathErr));
1792
+ }
1793
+
1794
+ vars.redeemAmount = redeemAmountIn;
1795
+ }
1796
+
1797
+ /* Fail if redeem not allowed */
1798
+ uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);
1799
+ if (allowed != 0) {
1800
+ return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REDEEM_COMPTROLLER_REJECTION, allowed);
1801
+ }
1802
+
1803
+ /* Verify market's block number equals current block number */
1804
+ if (accrualBlockNumber != getBlockNumber()) {
1805
+ return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDEEM_FRESHNESS_CHECK);
1806
+ }
1807
+
1808
+ /*
1809
+ * We calculate the new total supply and redeemer balance, checking for underflow:
1810
+ * totalSupplyNew = totalSupply - redeemTokens
1811
+ * accountTokensNew = accountTokens[redeemer] - redeemTokens
1812
+ */
1813
+ (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);
1814
+ if (vars.mathErr != MathError.NO_ERROR) {
1815
+ return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED, uint(vars.mathErr));
1816
+ }
1817
+
1818
+ (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);
1819
+ if (vars.mathErr != MathError.NO_ERROR) {
1820
+ return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED, uint(vars.mathErr));
1821
+ }
1822
+
1823
+ /* Fail gracefully if protocol has insufficient cash */
1824
+ if (getCashPrior() < vars.redeemAmount) {
1825
+ return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDEEM_TRANSFER_OUT_NOT_POSSIBLE);
1826
+ }
1827
+
1828
+ /////////////////////////
1829
+ // EFFECTS & INTERACTIONS
1830
+ // (No safe failures beyond this point)
1831
+
1832
+ /*
1833
+ * We invoke doTransferOut for the redeemer and the redeemAmount.
1834
+ * Note: The cToken must handle variations between ERC-20 and ETH underlying.
1835
+ * On success, the cToken has redeemAmount less of cash.
1836
+ * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.
1837
+ */
1838
+ doTransferOut(redeemer, vars.redeemAmount);
1839
+
1840
+ /* We write previously calculated values into storage */
1841
+ totalSupply = vars.totalSupplyNew;
1842
+ accountTokens[redeemer] = vars.accountTokensNew;
1843
+
1844
+ /* We emit a Transfer event, and a Redeem event */
1845
+ emit Transfer(redeemer, address(this), vars.redeemTokens);
1846
+ emit Redeem(redeemer, vars.redeemAmount, vars.redeemTokens);
1847
+
1848
+ /* We call the defense hook */
1849
+ comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);
1850
+
1851
+ return uint(Error.NO_ERROR);
1852
+ }
1853
+
1854
+ /**
1855
+ * @notice Sender borrows assets from the protocol to their own address
1856
+ * @param borrowAmount The amount of the underlying asset to borrow
1857
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
1858
+ */
1859
+ function borrowInternal(uint borrowAmount) internal nonReentrant returns (uint) {
1860
+ uint error = accrueInterest();
1861
+
1862
+ if (error != uint(Error.NO_ERROR)) {
1863
+ // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed
1864
+ return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);
1865
+ }
1866
+ // borrowFresh emits borrow-specific logs on errors, so we don't need to
1867
+ return borrowFresh(msg.sender, borrowAmount);
1868
+ }
1869
+
1870
+ struct BorrowLocalVars {
1871
+ MathError mathErr;
1872
+ uint accountBorrows;
1873
+ uint accountBorrowsNew;
1874
+ uint totalBorrowsNew;
1875
+ }
1876
+
1877
+ /**
1878
+ * @notice Users borrow assets from the protocol to their own address
1879
+ * @param borrowAmount The amount of the underlying asset to borrow
1880
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
1881
+ */
1882
+ function borrowFresh(address payable borrower, uint borrowAmount) internal returns (uint) {
1883
+ /* Fail if borrow not allowed */
1884
+ uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);
1885
+
1886
+ if (allowed != 0) {
1887
+ return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.BORROW_COMPTROLLER_REJECTION, allowed);
1888
+ }
1889
+
1890
+
1891
+ /* Verify market's block number equals current block number */
1892
+ if (accrualBlockNumber != getBlockNumber()) {
1893
+ return fail(Error.MARKET_NOT_FRESH, FailureInfo.BORROW_FRESHNESS_CHECK);
1894
+ }
1895
+
1896
+ /* Fail gracefully if protocol has insufficient underlying cash */
1897
+ if (getCashPrior() < borrowAmount) {
1898
+ return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.BORROW_CASH_NOT_AVAILABLE);
1899
+ }
1900
+
1901
+ BorrowLocalVars memory vars;
1902
+
1903
+ /*
1904
+ * We calculate the new borrower and total borrow balances, failing on overflow:
1905
+ * accountBorrowsNew = accountBorrows + borrowAmount
1906
+ * totalBorrowsNew = totalBorrows + borrowAmount
1907
+ */
1908
+ (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);
1909
+ if (vars.mathErr != MathError.NO_ERROR) {
1910
+ return failOpaque(Error.MATH_ERROR, FailureInfo.BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, uint(vars.mathErr));
1911
+ }
1912
+
1913
+ (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);
1914
+ if (vars.mathErr != MathError.NO_ERROR) {
1915
+ return failOpaque(Error.MATH_ERROR, FailureInfo.BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED, uint(vars.mathErr));
1916
+ }
1917
+
1918
+ (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);
1919
+ if (vars.mathErr != MathError.NO_ERROR) {
1920
+ return failOpaque(Error.MATH_ERROR, FailureInfo.BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED, uint(vars.mathErr));
1921
+ }
1922
+
1923
+ /////////////////////////
1924
+ // EFFECTS & INTERACTIONS
1925
+ // (No safe failures beyond this point)
1926
+
1927
+ /*
1928
+ * We invoke doTransferOut for the borrower and the borrowAmount.
1929
+ * Note: The cToken must handle variations between ERC-20 and ETH underlying.
1930
+ * On success, the cToken borrowAmount less of cash.
1931
+ * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.
1932
+ */
1933
+ // ruleid: compound-borrowfresh-reentrancy
1934
+ doTransferOut(borrower, borrowAmount);
1935
+
1936
+ /* We write the previously calculated values into storage */
1937
+ accountBorrows[borrower].principal = vars.accountBorrowsNew;
1938
+ accountBorrows[borrower].interestIndex = borrowIndex;
1939
+ totalBorrows = vars.totalBorrowsNew;
1940
+
1941
+ /* We emit a Borrow event */
1942
+ emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);
1943
+
1944
+ /* We call the defense hook */
1945
+ // unused function
1946
+ // Comptroller.borrowVerify(address(this), borrower, borrowAmount);
1947
+
1948
+ return uint(Error.NO_ERROR);
1949
+ }
1950
+
1951
+ /**
1952
+ * @notice Sender repays their own borrow
1953
+ * @param repayAmount The amount to repay
1954
+ * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.
1955
+ */
1956
+ function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {
1957
+ uint error = accrueInterest();
1958
+ if (error != uint(Error.NO_ERROR)) {
1959
+ // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed
1960
+ return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);
1961
+ }
1962
+ // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to
1963
+ return repayBorrowFresh(msg.sender, msg.sender, repayAmount);
1964
+ }
1965
+
1966
+ /**
1967
+ * @notice Sender repays a borrow belonging to borrower
1968
+ * @param borrower the account with the debt being payed off
1969
+ * @param repayAmount The amount to repay
1970
+ * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.
1971
+ */
1972
+ function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {
1973
+ uint error = accrueInterest();
1974
+ if (error != uint(Error.NO_ERROR)) {
1975
+ // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed
1976
+ return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);
1977
+ }
1978
+ // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to
1979
+ return repayBorrowFresh(msg.sender, borrower, repayAmount);
1980
+ }
1981
+
1982
+ struct RepayBorrowLocalVars {
1983
+ Error err;
1984
+ MathError mathErr;
1985
+ uint repayAmount;
1986
+ uint borrowerIndex;
1987
+ uint accountBorrows;
1988
+ uint accountBorrowsNew;
1989
+ uint totalBorrowsNew;
1990
+ uint actualRepayAmount;
1991
+ }
1992
+
1993
+ /**
1994
+ * @notice Borrows are repaid by another user (possibly the borrower).
1995
+ * @param payer the account paying off the borrow
1996
+ * @param borrower the account with the debt being payed off
1997
+ * @param repayAmount the amount of undelrying tokens being returned
1998
+ * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.
1999
+ */
2000
+ function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {
2001
+ /* Fail if repayBorrow not allowed */
2002
+ uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);
2003
+ if (allowed != 0) {
2004
+ return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed), 0);
2005
+ }
2006
+
2007
+ /* Verify market's block number equals current block number */
2008
+ if (accrualBlockNumber != getBlockNumber()) {
2009
+ return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);
2010
+ }
2011
+
2012
+ RepayBorrowLocalVars memory vars;
2013
+
2014
+ /* We remember the original borrowerIndex for verification purposes */
2015
+ vars.borrowerIndex = accountBorrows[borrower].interestIndex;
2016
+
2017
+ /* We fetch the amount the borrower owes, with accumulated interest */
2018
+ (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);
2019
+ if (vars.mathErr != MathError.NO_ERROR) {
2020
+ return (failOpaque(Error.MATH_ERROR, FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, uint(vars.mathErr)), 0);
2021
+ }
2022
+
2023
+ /* If repayAmount == -1, repayAmount = accountBorrows */
2024
+ if (repayAmount == uint(-1)) {
2025
+ vars.repayAmount = vars.accountBorrows;
2026
+ } else {
2027
+ vars.repayAmount = repayAmount;
2028
+ }
2029
+
2030
+ /////////////////////////
2031
+ // EFFECTS & INTERACTIONS
2032
+ // (No safe failures beyond this point)
2033
+
2034
+ /*
2035
+ * We call doTransferIn for the payer and the repayAmount
2036
+ * Note: The cToken must handle variations between ERC-20 and ETH underlying.
2037
+ * On success, the cToken holds an additional repayAmount of cash.
2038
+ * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.
2039
+ * it returns the amount actually transferred, in case of a fee.
2040
+ */
2041
+ vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);
2042
+
2043
+ /*
2044
+ * We calculate the new borrower and total borrow balances, failing on underflow:
2045
+ * accountBorrowsNew = accountBorrows - actualRepayAmount
2046
+ * totalBorrowsNew = totalBorrows - actualRepayAmount
2047
+ */
2048
+ (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);
2049
+ require(vars.mathErr == MathError.NO_ERROR, "REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED");
2050
+
2051
+ (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);
2052
+ require(vars.mathErr == MathError.NO_ERROR, "REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED");
2053
+
2054
+ /* We write the previously calculated values into storage */
2055
+ accountBorrows[borrower].principal = vars.accountBorrowsNew;
2056
+ accountBorrows[borrower].interestIndex = borrowIndex;
2057
+ totalBorrows = vars.totalBorrowsNew;
2058
+
2059
+ /* We emit a RepayBorrow event */
2060
+ emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);
2061
+
2062
+ /* We call the defense hook */
2063
+ // unused function
2064
+ // Comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);
2065
+
2066
+ return (uint(Error.NO_ERROR), vars.actualRepayAmount);
2067
+ }
2068
+
2069
+ /**
2070
+ * @notice The sender liquidates the borrowers collateral.
2071
+ * The collateral seized is transferred to the liquidator.
2072
+ * @param borrower The borrower of this cToken to be liquidated
2073
+ * @param cTokenCollateral The market in which to seize collateral from the borrower
2074
+ * @param repayAmount The amount of the underlying borrowed asset to repay
2075
+ * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.
2076
+ */
2077
+ function liquidateBorrowInternal(address borrower, uint repayAmount, CTokenInterface cTokenCollateral) internal nonReentrant returns (uint, uint) {
2078
+ uint error = accrueInterest();
2079
+ if (error != uint(Error.NO_ERROR)) {
2080
+ // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed
2081
+ return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);
2082
+ }
2083
+
2084
+ error = cTokenCollateral.accrueInterest();
2085
+ if (error != uint(Error.NO_ERROR)) {
2086
+ // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed
2087
+ return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);
2088
+ }
2089
+
2090
+ // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to
2091
+ return liquidateBorrowFresh(msg.sender, borrower, repayAmount, cTokenCollateral);
2092
+ }
2093
+
2094
+ /**
2095
+ * @notice The liquidator liquidates the borrowers collateral.
2096
+ * The collateral seized is transferred to the liquidator.
2097
+ * @param borrower The borrower of this cToken to be liquidated
2098
+ * @param liquidator The address repaying the borrow and seizing collateral
2099
+ * @param cTokenCollateral The market in which to seize collateral from the borrower
2100
+ * @param repayAmount The amount of the underlying borrowed asset to repay
2101
+ * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.
2102
+ */
2103
+ function liquidateBorrowFresh(address liquidator, address borrower, uint repayAmount, CTokenInterface cTokenCollateral) internal returns (uint, uint) {
2104
+ /* Fail if liquidate not allowed */
2105
+ uint allowed = comptroller.liquidateBorrowAllowed(address(this), address(cTokenCollateral), liquidator, borrower, repayAmount);
2106
+ if (allowed != 0) {
2107
+ return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);
2108
+ }
2109
+
2110
+ /* Verify market's block number equals current block number */
2111
+ if (accrualBlockNumber != getBlockNumber()) {
2112
+ return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);
2113
+ }
2114
+
2115
+ /* Verify cTokenCollateral market's block number equals current block number */
2116
+ if (cTokenCollateral.getAccrualBlockNumber() != getBlockNumber()) {
2117
+ return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);
2118
+ }
2119
+
2120
+ /* Fail if borrower = liquidator */
2121
+ if (borrower == liquidator) {
2122
+ return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);
2123
+ }
2124
+
2125
+ /* Fail if repayAmount = 0 */
2126
+ if (repayAmount == 0) {
2127
+ return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);
2128
+ }
2129
+
2130
+ /* Fail if repayAmount = -1 */
2131
+ if (repayAmount == uint(-1)) {
2132
+ return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);
2133
+ }
2134
+
2135
+
2136
+ /* Fail if repayBorrow fails */
2137
+ (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);
2138
+ if (repayBorrowError != uint(Error.NO_ERROR)) {
2139
+ return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);
2140
+ }
2141
+
2142
+ /////////////////////////
2143
+ // EFFECTS & INTERACTIONS
2144
+ // (No safe failures beyond this point)
2145
+
2146
+ /* We calculate the number of collateral tokens that will be seized */
2147
+ (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(address(this), address(cTokenCollateral), actualRepayAmount);
2148
+ require(amountSeizeError == uint(Error.NO_ERROR), "LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED");
2149
+
2150
+ /* Revert if borrower collateral token balance < seizeTokens */
2151
+ require(cTokenCollateral.balanceOf(borrower) >= seizeTokens, "LIQUIDATE_SEIZE_TOO_MUCH");
2152
+
2153
+ // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call
2154
+ uint seizeError;
2155
+ if (address(cTokenCollateral) == address(this)) {
2156
+ seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);
2157
+ } else {
2158
+ seizeError = cTokenCollateral.seize(liquidator, borrower, seizeTokens);
2159
+ }
2160
+
2161
+ /* Revert if seize tokens fails (since we cannot be sure of side effects) */
2162
+ require(seizeError == uint(Error.NO_ERROR), "token seizure failed");
2163
+
2164
+ /* We emit a LiquidateBorrow event */
2165
+ emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(cTokenCollateral), seizeTokens);
2166
+
2167
+ /* We call the defense hook */
2168
+ // unused function
2169
+ // Comptroller.liquidateBorrowVerify(address(this), address(cTokenCollateral), liquidator, borrower, actualRepayAmount, seizeTokens);
2170
+
2171
+ return (uint(Error.NO_ERROR), actualRepayAmount);
2172
+ }
2173
+
2174
+ /**
2175
+ * @notice Transfers collateral tokens (this market) to the liquidator.
2176
+ * @dev Will fail unless called by another cToken during the process of liquidation.
2177
+ * Its absolutely critical to use msg.sender as the borrowed cToken and not a parameter.
2178
+ * @param liquidator The account receiving seized collateral
2179
+ * @param borrower The account having collateral seized
2180
+ * @param seizeTokens The number of cTokens to seize
2181
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2182
+ */
2183
+ function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {
2184
+ return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);
2185
+ }
2186
+
2187
+ /**
2188
+ * @notice Transfers collateral tokens (this market) to the liquidator.
2189
+ * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another CToken.
2190
+ * Its absolutely critical to use msg.sender as the seizer cToken and not a parameter.
2191
+ * @param seizerToken The contract seizing the collateral (i.e. borrowed cToken)
2192
+ * @param liquidator The account receiving seized collateral
2193
+ * @param borrower The account having collateral seized
2194
+ * @param seizeTokens The number of cTokens to seize
2195
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2196
+ */
2197
+ function seizeInternal(address seizerToken, address liquidator, address borrower, uint seizeTokens) internal returns (uint) {
2198
+ /* Fail if seize not allowed */
2199
+ uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);
2200
+ if (allowed != 0) {
2201
+ return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);
2202
+ }
2203
+
2204
+ /* Fail if borrower = liquidator */
2205
+ if (borrower == liquidator) {
2206
+ return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);
2207
+ }
2208
+
2209
+ MathError mathErr;
2210
+ uint borrowerTokensNew;
2211
+ uint liquidatorTokensNew;
2212
+
2213
+ /*
2214
+ * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:
2215
+ * borrowerTokensNew = accountTokens[borrower] - seizeTokens
2216
+ * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens
2217
+ */
2218
+ (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);
2219
+ if (mathErr != MathError.NO_ERROR) {
2220
+ return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));
2221
+ }
2222
+
2223
+ (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);
2224
+ if (mathErr != MathError.NO_ERROR) {
2225
+ return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));
2226
+ }
2227
+
2228
+ /////////////////////////
2229
+ // EFFECTS & INTERACTIONS
2230
+ // (No safe failures beyond this point)
2231
+
2232
+ /* We write the previously calculated values into storage */
2233
+ accountTokens[borrower] = borrowerTokensNew;
2234
+ accountTokens[liquidator] = liquidatorTokensNew;
2235
+
2236
+ /* Emit a Transfer event */
2237
+ emit Transfer(borrower, liquidator, seizeTokens);
2238
+
2239
+ /* We call the defense hook */
2240
+ // Transfer verify is required here due to tokens being transferred, and have to keep the
2241
+ // ACC accounting in check
2242
+ // This works, because the 'borrower' has to be in this market. and so, the active collateral usage can either remain unchanged
2243
+ // (if the liquidator is also in the market) or reduce (if the liquidator is not in the market)
2244
+ comptroller.transferVerify(address(this), borrower, liquidator, seizeTokens);
2245
+
2246
+ /* We call the defense hook */
2247
+ // unused function
2248
+ // Comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);
2249
+
2250
+ return uint(Error.NO_ERROR);
2251
+ }
2252
+
2253
+
2254
+ /*** Admin Functions ***/
2255
+
2256
+ /**
2257
+ * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
2258
+ * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
2259
+ * @param newPendingAdmin New pending admin.
2260
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2261
+ */
2262
+ function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {
2263
+ // Check caller = admin
2264
+ if (msg.sender != admin) {
2265
+ return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);
2266
+ }
2267
+
2268
+ // Save current value, if any, for inclusion in log
2269
+ address oldPendingAdmin = pendingAdmin;
2270
+
2271
+ // Store pendingAdmin with value newPendingAdmin
2272
+ pendingAdmin = newPendingAdmin;
2273
+
2274
+ // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)
2275
+ emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);
2276
+
2277
+ return uint(Error.NO_ERROR);
2278
+ }
2279
+
2280
+ /**
2281
+ * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin
2282
+ * @dev Admin function for pending admin to accept role and update admin
2283
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2284
+ */
2285
+ function _acceptAdmin() external returns (uint) {
2286
+ // Check caller is pendingAdmin and pendingAdmin ≠ address(0)
2287
+ if (msg.sender != pendingAdmin || msg.sender == address(0)) {
2288
+ return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);
2289
+ }
2290
+
2291
+ // Save current values for inclusion in log
2292
+ address oldAdmin = admin;
2293
+ address oldPendingAdmin = pendingAdmin;
2294
+
2295
+ // Store admin with value pendingAdmin
2296
+ admin = pendingAdmin;
2297
+
2298
+ // Clear the pending value
2299
+ pendingAdmin = address(0);
2300
+
2301
+ emit NewAdmin(oldAdmin, admin);
2302
+ emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);
2303
+
2304
+ return uint(Error.NO_ERROR);
2305
+ }
2306
+
2307
+ /**
2308
+ * OLA_ADDITIONS : Made internal and removes Admin check.
2309
+ * @notice Sets a new Comptroller for the market
2310
+ * @dev Admin function to set a new Comptroller
2311
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2312
+ */
2313
+ function _setComptroller(ComptrollerInterface newComptroller) internal returns (uint) {
2314
+ ComptrollerInterface oldComptroller = comptroller;
2315
+ // Ensure invoke Comptroller.isComptroller() returns true
2316
+ require(newComptroller.isComptroller(), "marker method returned false");
2317
+
2318
+ // Set market's Comptroller to newComptroller
2319
+ comptroller = newComptroller;
2320
+
2321
+ // Emit NewComptroller(oldComptroller, newComptroller)
2322
+ emit NewComptroller(oldComptroller, newComptroller);
2323
+
2324
+ return uint(Error.NO_ERROR);
2325
+ }
2326
+
2327
+ /**
2328
+ * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh
2329
+ * @dev Admin function to accrue interest and set a new reserve factor
2330
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2331
+ */
2332
+ function _setReserveFactor(uint newReserveFactorMantissa) external nonReentrant returns (uint) {
2333
+ uint error = accrueInterest();
2334
+ if (error != uint(Error.NO_ERROR)) {
2335
+ // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.
2336
+ return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);
2337
+ }
2338
+ // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.
2339
+ return _setReserveFactorFresh(newReserveFactorMantissa);
2340
+ }
2341
+
2342
+ /**
2343
+ * @notice Sets a new reserve factor for the protocol (*requires fresh interest accrual)
2344
+ * @dev Admin function to set a new reserve factor
2345
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2346
+ */
2347
+ function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {
2348
+ // Check caller is admin
2349
+ if (msg.sender != admin) {
2350
+ return fail(Error.UNAUTHORIZED, FailureInfo.SET_RESERVE_FACTOR_ADMIN_CHECK);
2351
+ }
2352
+
2353
+ // Verify market's block number equals current block number
2354
+ if (accrualBlockNumber != getBlockNumber()) {
2355
+ return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);
2356
+ }
2357
+
2358
+ // Check newReserveFactor ≤ maxReserveFactor
2359
+ if (newReserveFactorMantissa > reserveFactorMaxMantissa) {
2360
+ return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);
2361
+ }
2362
+
2363
+ // OLA_ADDITIONS :This constraint
2364
+ // Check newReserveFactor >= minReserveFactor
2365
+ if (newReserveFactorMantissa < reserveFactorMinMantissa) {
2366
+ return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);
2367
+ }
2368
+
2369
+ uint oldReserveFactorMantissa = reserveFactorMantissa;
2370
+ reserveFactorMantissa = newReserveFactorMantissa;
2371
+
2372
+ emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);
2373
+
2374
+ return uint(Error.NO_ERROR);
2375
+ }
2376
+
2377
+ /**
2378
+ * @notice Accrues interest and reduces reserves by transferring to admin
2379
+ * @param reduceAmount Amount of reduction to reserves
2380
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2381
+ */
2382
+ function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {
2383
+ uint error = accrueInterest();
2384
+ if (error != uint(Error.NO_ERROR)) {
2385
+ // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.
2386
+ return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);
2387
+ }
2388
+
2389
+
2390
+
2391
+ // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.
2392
+ return _reduceReservesFresh(reduceAmount);
2393
+ }
2394
+
2395
+ /**
2396
+ * @notice Reduces reserves by transferring to the LeN admin and to Ola bank their respective shares
2397
+ * @dev Requires fresh interest accrual
2398
+ * @param reduceAmount Amount of reduction to reserves
2399
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2400
+ */
2401
+ function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {
2402
+ // totalReserves - reduceAmount
2403
+ uint totalReservesNew;
2404
+
2405
+ // OLA_ADDITIONS : Allowing anyone to reduce reserves
2406
+ // Check caller is admin
2407
+ // if (msg.sender != admin) {
2408
+ // return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);
2409
+ // }
2410
+
2411
+ // We fail gracefully unless market's block number equals current block number
2412
+ if (accrualBlockNumber != getBlockNumber()) {
2413
+ return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);
2414
+ }
2415
+
2416
+ // Fail gracefully if protocol has insufficient underlying cash
2417
+ if (getCashPrior() < reduceAmount) {
2418
+ return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);
2419
+ }
2420
+
2421
+ // Check reduceAmount ≤ reserves[n] (totalReserves)
2422
+ if (reduceAmount > totalReserves) {
2423
+ return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);
2424
+ }
2425
+
2426
+ // OLA_ADDITIONS : Dividing the reduced amount between the Admin and Ola (+validations)
2427
+ // Important to notice that we have added Math calculations to this function.
2428
+ // Where as before, it only used pre-calculated numbers.
2429
+ MathError mathErr;
2430
+ uint adminPart;
2431
+ uint olaPart;
2432
+ uint olaReserveFactorMantissa = fetchOlaReserveFactorMantissa();
2433
+ address payable olaBankAddress = fetchOlaBankAddress();
2434
+ address payable adminBankAddress = fetchAdminBankAddress();
2435
+
2436
+ // Calculate olaPart
2437
+ (mathErr, olaPart) = mulScalarTruncate(Exp({mantissa: olaReserveFactorMantissa}), reduceAmount);
2438
+ if (mathErr != MathError.NO_ERROR) {
2439
+ return failOpaque(Error.MATH_ERROR, FailureInfo.REDUCE_RESERVES_OLA_PART_CALCULATION_FAILED, uint(mathErr));
2440
+ }
2441
+
2442
+ // Sanity check, should never be a problem in a well parameterized system
2443
+ if (olaPart >= reduceAmount) {
2444
+ return fail(Error.BAD_SYSTEM_PARAMS, FailureInfo.REDUCE_RESERVES_OLA_PART_CALCULATION_FAILED);
2445
+ }
2446
+
2447
+ /////////////////////////
2448
+ // EFFECTS & INTERACTIONS
2449
+ // (No safe failures beyond this point)
2450
+
2451
+ // Calculate admin part
2452
+ adminPart = reduceAmount - olaPart;
2453
+ // We checked olaPart < reduceAmount above, so this should never revert.
2454
+ require(adminPart < reduceAmount, "reduce reserves unexpected adminPart underflow");
2455
+
2456
+ totalReservesNew = totalReserves - reduceAmount;
2457
+ // We checked reduceAmount <= totalReserves above, so this should never revert.
2458
+ require(totalReservesNew <= totalReserves, "reduce reserves unexpected underflow");
2459
+
2460
+ // Store reserves[n+1] = reserves[n] - reduceAmount
2461
+ totalReserves = totalReservesNew;
2462
+
2463
+ // OLA_ADDITIONS : Transfer reserves to both admin and Ola bank addresses
2464
+ // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.
2465
+ doTransferOut(adminBankAddress, adminPart);
2466
+ doTransferOut(olaBankAddress, olaPart);
2467
+
2468
+ emit ReservesReduced(adminBankAddress, adminPart, olaBankAddress, olaPart, totalReservesNew);
2469
+
2470
+ return uint(Error.NO_ERROR);
2471
+ }
2472
+
2473
+ /**
2474
+ * @notice accrues interest and updates the interest rate model using _setInterestRateModelFresh
2475
+ * @dev Admin function to accrue interest and update the interest rate model
2476
+ * @param newInterestRateModel the new interest rate model to use
2477
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2478
+ */
2479
+ function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {
2480
+ uint error = accrueInterest();
2481
+ if (error != uint(Error.NO_ERROR)) {
2482
+ // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed
2483
+ return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);
2484
+ }
2485
+ // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.
2486
+ return _setInterestRateModelFresh(newInterestRateModel);
2487
+ }
2488
+
2489
+ /**
2490
+ * @notice updates the interest rate model (*requires fresh interest accrual)
2491
+ * @dev Admin function to update the interest rate model
2492
+ * @param newInterestRateModel the new interest rate model to use
2493
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2494
+ */
2495
+ function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {
2496
+
2497
+ // Used to store old model for use in the event that is emitted on success
2498
+ InterestRateModel oldInterestRateModel;
2499
+
2500
+ // Check caller is admin
2501
+ if (msg.sender != admin) {
2502
+ return fail(Error.UNAUTHORIZED, FailureInfo.SET_INTEREST_RATE_MODEL_OWNER_CHECK);
2503
+ }
2504
+
2505
+ // We fail gracefully unless market's block number equals current block number
2506
+ if (accrualBlockNumber != getBlockNumber()) {
2507
+ return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);
2508
+ }
2509
+
2510
+ // Ensure interest rate model is an approved contracts
2511
+ RegistryForOToken registry = RegistryForOToken(comptroller.getRegistry());
2512
+
2513
+ require(registry.isSupportedInterestRateModel(address(newInterestRateModel)), "Unapproved interest rate model");
2514
+
2515
+ // Track the market's current interest rate model
2516
+ oldInterestRateModel = interestRateModel;
2517
+
2518
+ // Ensure invoke newInterestRateModel.isInterestRateModel() returns true
2519
+ require(newInterestRateModel.isInterestRateModel(), "marker method returned false");
2520
+
2521
+ // Set the interest rate model to newInterestRateModel
2522
+ interestRateModel = newInterestRateModel;
2523
+
2524
+ // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)
2525
+ emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);
2526
+
2527
+ return uint(Error.NO_ERROR);
2528
+ }
2529
+
2530
+ /*** Safe Token ***/
2531
+
2532
+ /**
2533
+ * @notice Gets balance of this contract in terms of the underlying
2534
+ * @dev This excludes the value of the current message, if any
2535
+ * @return The quantity of underlying owned by this contract
2536
+ */
2537
+ function getCashPrior() internal view returns (uint);
2538
+
2539
+ /**
2540
+ * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.
2541
+ * This may revert due to insufficient balance or insufficient allowance.
2542
+ */
2543
+ function doTransferIn(address from, uint amount) internal returns (uint);
2544
+
2545
+ /**
2546
+ * @dev Performs a transfer out, ideally returning an explanatory error code upon failure tather than reverting.
2547
+ * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.
2548
+ * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.
2549
+ */
2550
+ function doTransferOut(address payable to, uint amount) internal;
2551
+
2552
+ /**
2553
+ * OLA_ADDITIONS: This function
2554
+ * @dev Returns the ola reserves factor.
2555
+ */
2556
+ function fetchOlaReserveFactorMantissa() internal pure returns (uint) {
2557
+ return olaReserveFactorMantissa;
2558
+ }
2559
+
2560
+ /**
2561
+ * OLA_ADDITIONS: This function
2562
+ * @dev Fetches the ola bank address.
2563
+ */
2564
+ function fetchOlaBankAddress() internal returns (address payable) {
2565
+ return RegistryForOToken(comptroller.getRegistry()).olaBankAddress();
2566
+ }
2567
+
2568
+ /**
2569
+ * OLA_ADDITIONS: This function
2570
+ * @dev Fetches the admin bank address.
2571
+ */
2572
+ function fetchAdminBankAddress() internal view returns (address payable) {
2573
+ return ComptrollerForOToken(address(comptroller)).adminBankAddress();
2574
+ }
2575
+
2576
+ /*** Reentrancy Guard ***/
2577
+
2578
+ /**
2579
+ * @dev Prevents a contract from calling itself, directly or indirectly.
2580
+ */
2581
+ modifier nonReentrant() {
2582
+ require(_notEntered, "re-entered");
2583
+ _notEntered = false;
2584
+ _;
2585
+ _notEntered = true; // get a gas-refund post-Istanbul
2586
+ }
2587
+ }
2588
+
2589
+
2590
+ contract ComptrollerInterface {
2591
+ /// @notice Indicator that this is a Comptroller contract (for inspection)
2592
+ bool public constant isComptroller = true;
2593
+
2594
+ /*** OLA_ADDITIONS : registry getter ***/
2595
+ /*** Registry ***/
2596
+ function getRegistry() external view returns (address);
2597
+
2598
+ /*** Assets supported by the Comptroller ***/
2599
+ function getAllMarkets() public view returns (CToken[] memory);
2600
+
2601
+ /*** OLA_ADDITIONS : peripheral checkers ***/
2602
+ /*** Peripherals ***/
2603
+ function hasRainMaker() view public returns (bool);
2604
+ function hasBouncer() view public returns (bool);
2605
+
2606
+ /*** Assets You Are In ***/
2607
+
2608
+ function enterMarkets(address[] calldata cTokens) external returns (uint[] memory);
2609
+ function exitMarket(address cToken) external returns (uint);
2610
+
2611
+ /*** Policy Hooks ***/
2612
+
2613
+ function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint);
2614
+ function mintVerify(address cToken, address minter, uint mintAmount, uint mintTokens) external;
2615
+
2616
+ function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint);
2617
+ function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external;
2618
+
2619
+ function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint);
2620
+ function borrowVerify(address cToken, address borrower, uint borrowAmount) external;
2621
+
2622
+ function repayBorrowAllowed(
2623
+ address cToken,
2624
+ address payer,
2625
+ address borrower,
2626
+ uint repayAmount) external returns (uint);
2627
+ function repayBorrowVerify(
2628
+ address cToken,
2629
+ address payer,
2630
+ address borrower,
2631
+ uint repayAmount,
2632
+ uint borrowerIndex) external;
2633
+
2634
+ function liquidateBorrowAllowed(
2635
+ address cTokenBorrowed,
2636
+ address cTokenCollateral,
2637
+ address liquidator,
2638
+ address borrower,
2639
+ uint repayAmount) external returns (uint);
2640
+ function liquidateBorrowVerify(
2641
+ address cTokenBorrowed,
2642
+ address cTokenCollateral,
2643
+ address liquidator,
2644
+ address borrower,
2645
+ uint repayAmount,
2646
+ uint seizeTokens) external;
2647
+
2648
+ function seizeAllowed(
2649
+ address cTokenCollateral,
2650
+ address cTokenBorrowed,
2651
+ address liquidator,
2652
+ address borrower,
2653
+ uint seizeTokens) external returns (uint);
2654
+ function seizeVerify(
2655
+ address cTokenCollateral,
2656
+ address cTokenBorrowed,
2657
+ address liquidator,
2658
+ address borrower,
2659
+ uint seizeTokens) external;
2660
+
2661
+ function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint);
2662
+ function transferVerify(address cToken, address src, address dst, uint transferTokens) external;
2663
+
2664
+ /*** Liquidity/Liquidation Calculations ***/
2665
+
2666
+ function liquidateCalculateSeizeTokens(
2667
+ address cTokenBorrowed,
2668
+ address cTokenCollateral,
2669
+ uint repayAmount) external view returns (uint, uint);
2670
+ }
2671
+
2672
+
2673
+
2674
+
2675
+ /**
2676
+ * @title EIP20NonStandardInterface
2677
+ * @dev Version of ERC20 with no return values for `transfer` and `transferFrom`
2678
+ * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca
2679
+ */
2680
+ interface EIP20NonStandardInterface {
2681
+
2682
+ /**
2683
+ * @notice Get the total number of tokens in circulation
2684
+ * @return The supply of tokens
2685
+ */
2686
+ function totalSupply() external view returns (uint256);
2687
+
2688
+ /**
2689
+ * @notice Gets the balance of the specified address
2690
+ * @param owner The address from which the balance will be retrieved
2691
+ * @return The balance
2692
+ */
2693
+ function balanceOf(address owner) external view returns (uint256 balance);
2694
+
2695
+ ///
2696
+ /// !!!!!!!!!!!!!!
2697
+ /// !!! NOTICE !!! `transfer` does not return a value, in violation of the ERC-20 specification
2698
+ /// !!!!!!!!!!!!!!
2699
+ ///
2700
+
2701
+ /**
2702
+ * @notice Transfer `amount` tokens from `msg.sender` to `dst`
2703
+ * @param dst The address of the destination account
2704
+ * @param amount The number of tokens to transfer
2705
+ */
2706
+ function transfer(address dst, uint256 amount) external;
2707
+
2708
+ ///
2709
+ /// !!!!!!!!!!!!!!
2710
+ /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the ERC-20 specification
2711
+ /// !!!!!!!!!!!!!!
2712
+ ///
2713
+
2714
+ /**
2715
+ * @notice Transfer `amount` tokens from `src` to `dst`
2716
+ * @param src The address of the source account
2717
+ * @param dst The address of the destination account
2718
+ * @param amount The number of tokens to transfer
2719
+ */
2720
+ function transferFrom(address src, address dst, uint256 amount) external;
2721
+
2722
+ /**
2723
+ * @notice Approve `spender` to transfer up to `amount` from `src`
2724
+ * @dev This will overwrite the approval amount for `spender`
2725
+ * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
2726
+ * @param spender The address of the account which may transfer tokens
2727
+ * @param amount The number of tokens that are approved
2728
+ * @return Whether or not the approval succeeded
2729
+ */
2730
+ function approve(address spender, uint256 amount) external returns (bool success);
2731
+
2732
+ /**
2733
+ * @notice Get the current allowance from `owner` for `spender`
2734
+ * @param owner The address of the account which owns the tokens to be spent
2735
+ * @param spender The address of the account which may transfer tokens
2736
+ * @return The number of tokens allowed to be spent
2737
+ */
2738
+ function allowance(address owner, address spender) external view returns (uint256 remaining);
2739
+
2740
+ event Transfer(address indexed from, address indexed to, uint256 amount);
2741
+ event Approval(address indexed owner, address indexed spender, uint256 amount);
2742
+ }
2743
+
2744
+
2745
+ contract CTokenDelegatorInterface {
2746
+
2747
+ /*** Implementation Events ***/
2748
+
2749
+ /**
2750
+ * @notice Emitted when implementation is changed
2751
+ */
2752
+ event NewImplementation(address indexed oldImplementation, address indexed newImplementation);
2753
+
2754
+ /**
2755
+ * @notice Emitted when implementation is not changed under a system version update
2756
+ */
2757
+ event ImplementationDidNotChange(address indexed implementation);
2758
+
2759
+
2760
+ /*** Implementation functions ***/
2761
+
2762
+ // OLA_ADDITIONS : Update implementation from the Registry
2763
+ function updateImplementationFromRegistry(bool allowResign, bytes calldata becomeImplementationData) external returns (bool);
2764
+ }
2765
+
2766
+
2767
+
2768
+
2769
+
2770
+ contract CErc20Interface {
2771
+ /*** User Interface ***/
2772
+
2773
+ function mint(uint mintAmount) external returns (uint);
2774
+ function redeem(uint redeemTokens) external returns (uint);
2775
+ function redeemUnderlying(uint redeemAmount) external returns (uint);
2776
+ function borrow(uint borrowAmount) external returns (uint);
2777
+ function repayBorrow(uint repayAmount) external returns (uint);
2778
+ function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);
2779
+ function liquidateBorrow(address borrower, uint repayAmount, CTokenInterface cTokenCollateral) external returns (uint);
2780
+ function sweepToken(EIP20NonStandardInterface token) external;
2781
+ }
2782
+
2783
+ contract CErc20StorageV0_01 {}
2784
+
2785
+ contract CErc20StorageV0_02 is CErc20StorageV0_01 {}
2786
+
2787
+ contract ONativeInterface {
2788
+ /*** User Interface ***/
2789
+
2790
+ function mint() external payable;
2791
+ function redeem(uint redeemTokens) external returns (uint);
2792
+ function redeemUnderlying(uint redeemAmount) external returns (uint);
2793
+ function borrow(uint borrowAmount) external returns (uint);
2794
+ function repayBorrow() external payable;
2795
+ function repayBorrowBehalf(address borrower) external payable;
2796
+ function liquidateBorrow(address borrower, CTokenInterface cTokenCollateral) external payable;
2797
+ function sweepToken(EIP20NonStandardInterface token) external;
2798
+ }
2799
+
2800
+ contract CEtherStorageV0_01 {}
2801
+
2802
+ contract CEtherStorageV0_02 is CEtherStorageV0_01 {}
2803
+
2804
+ contract CDelegateInterface {
2805
+ /**
2806
+ * @notice Called by the delegator on a delegate to initialize it for duty
2807
+ * @dev Should revert if any issues arise which make it unfit for delegation
2808
+ * @param data The encoded bytes data for any initialization
2809
+ */
2810
+ function _becomeImplementation(bytes memory data) public;
2811
+
2812
+ /**
2813
+ * @notice Called by the delegator on a delegate to forfeit its responsibility
2814
+ */
2815
+ function _resignImplementation() public;
2816
+ }
2817
+
2818
+
2819
+
2820
+
2821
+
2822
+
2823
+ interface RegistryForODelegator {
2824
+ function getImplementationForLn(address lnUnitroller, bytes32 contractNameHash) external returns (address);
2825
+ }
2826
+
2827
+ /**
2828
+ * @title Ola's ODelegator Contract
2829
+ * @notice OTokens which delegate to an implementation
2830
+ * @author Ola
2831
+ */
2832
+ contract ODelegator is CTokenAdminStorage, CTokenDelegatorInterface {
2833
+
2834
+ /**
2835
+ * @notice Called by the Comptroller (most of the time) or by the admin (only via the constructor) to update the
2836
+ * implementation of the delegator
2837
+ * @param implementation_ The address of the new implementation for delegation
2838
+ * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation
2839
+ * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation
2840
+ */
2841
+ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) internal {
2842
+ if (allowResign) {
2843
+ delegateToImplementation(abi.encodeWithSignature("_resignImplementation()"));
2844
+ }
2845
+
2846
+ // Basic sanity
2847
+ require(CToken(implementation_).isCToken(), "Not CTokens");
2848
+
2849
+ address oldImplementation = implementation;
2850
+ implementation = implementation_;
2851
+
2852
+
2853
+ delegateToImplementation(abi.encodeWithSignature("_becomeImplementation(bytes)", becomeImplementationData));
2854
+
2855
+ emit NewImplementation(oldImplementation, implementation);
2856
+ }
2857
+
2858
+ /**
2859
+ * @notice Internal method to delegate execution to another contract
2860
+ * @dev It returns to the external caller whatever the implementation returns or forwards reverts
2861
+ * @param callee The contract to delegatecall
2862
+ * @param data The raw data to delegatecall
2863
+ * @return The returned bytes from the delegatecall
2864
+ */
2865
+ function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {
2866
+ (bool success, bytes memory returnData) = callee.delegatecall(data);
2867
+ assembly {
2868
+ if eq(success, 0) {
2869
+ revert(add(returnData, 0x20), returndatasize)
2870
+ }
2871
+ }
2872
+ return returnData;
2873
+ }
2874
+
2875
+ /**
2876
+ * @notice Delegates execution to the implementation contract
2877
+ * @dev It returns to the external caller whatever the implementation returns or forwards reverts
2878
+ * @param data The raw data to delegatecall
2879
+ * @return The returned bytes from the delegatecall
2880
+ */
2881
+ function delegateToImplementation(bytes memory data) public returns (bytes memory) {
2882
+ return delegateTo(implementation, data);
2883
+ }
2884
+
2885
+ /**
2886
+ * @notice Delegates execution to an implementation contract
2887
+ * @dev It returns to the external caller whatever the implementation returns or forwards reverts
2888
+ * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.
2889
+ * @param data The raw data to delegatecall
2890
+ * @return The returned bytes from the delegatecall
2891
+ */
2892
+ function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {
2893
+ (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data));
2894
+ assembly {
2895
+ if eq(success, 0) {
2896
+ revert(add(returnData, 0x20), returndatasize)
2897
+ }
2898
+ }
2899
+ return abi.decode(returnData, (bytes));
2900
+ }
2901
+
2902
+ function updateImplementationFromRegistry(bool allowResign, bytes calldata becomeImplementationData) external returns (bool) {
2903
+ require(msg.sender == address(comptroller), "Not comptroller");
2904
+ address implementationToSet = RegistryForODelegator(comptroller.getRegistry()).getImplementationForLn(address(comptroller), contractNameHash);
2905
+ require(implementationToSet != address(0), "No implementation");
2906
+
2907
+ if (implementationToSet != implementation) {
2908
+ // New implementations always get set via the setter (post-initialize)
2909
+ _setImplementation(implementationToSet, allowResign, becomeImplementationData);
2910
+ } else {
2911
+ emit ImplementationDidNotChange(implementation);
2912
+ }
2913
+
2914
+ return true;
2915
+ }
2916
+
2917
+ /**
2918
+ * @notice Delegates execution to an implementation contract
2919
+ * @dev It returns to the external caller whatever the implementation returns or forwards reverts
2920
+ */
2921
+ function () external payable {
2922
+ require(msg.value == 0,"ODelegator:fallback: cannot send value to fallback");
2923
+
2924
+ // delegate all other functions to current implementation
2925
+ (bool success, ) = implementation.delegatecall(msg.data);
2926
+
2927
+ assembly {
2928
+ let free_mem_ptr := mload(0x40)
2929
+ returndatacopy(free_mem_ptr, 0, returndatasize)
2930
+
2931
+ switch success
2932
+ case 0 { revert(free_mem_ptr, returndatasize) }
2933
+ default { return(free_mem_ptr, returndatasize) }
2934
+ }
2935
+ }
2936
+ }
2937
+
2938
+ /**
2939
+ * @title Compound's CErc20Delegator Contract
2940
+ * @notice CTokens which wrap an EIP-20 underlying and delegate to an implementation
2941
+ * @author Compound
2942
+ */
2943
+ contract CErc20Delegator is ODelegator, CTokenInterface, CErc20Interface {
2944
+ // OLA_ADDITIONS : This contract name hash
2945
+ bytes32 constant public CErc20DelegatorContractHash = keccak256("CErc20Delegator");
2946
+
2947
+ /**
2948
+ * @notice Construct a new money market
2949
+ * @param underlying_ The address of the underlying asset
2950
+ * @param comptroller_ The address of the Comptroller
2951
+ * @param interestRateModel_ The address of the interest rate model
2952
+ * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18
2953
+ * @param name_ ERC-20 name of this token
2954
+ * @param symbol_ ERC-20 symbol of this token
2955
+ * @param decimals_ ERC-20 decimal precision of this token
2956
+ * @param admin_ Address of the administrator of this token
2957
+ * @param becomeImplementationData The encoded args for becomeImplementation
2958
+ */
2959
+ constructor(address underlying_,
2960
+ ComptrollerInterface comptroller_,
2961
+ InterestRateModel interestRateModel_,
2962
+ uint initialExchangeRateMantissa_,
2963
+ string memory name_,
2964
+ string memory symbol_,
2965
+ uint8 decimals_,
2966
+ address payable admin_,
2967
+ bytes memory becomeImplementationData) public {
2968
+ // Creator of the contract is admin during initialization
2969
+ admin = msg.sender;
2970
+
2971
+ // Initialize name hash
2972
+ contractNameHash = CErc20DelegatorContractHash;
2973
+
2974
+ address cErc20Implementation = RegistryForODelegator(comptroller_.getRegistry()).getImplementationForLn(address(comptroller_), CErc20DelegatorContractHash);
2975
+
2976
+ // First delegate gets to initialize the delegator (i.e. storage contract)
2977
+ delegateTo(cErc20Implementation, abi.encodeWithSignature("initialize(address,address,address,uint256,string,string,uint8)",
2978
+ underlying_,
2979
+ comptroller_,
2980
+ interestRateModel_,
2981
+ initialExchangeRateMantissa_,
2982
+ name_,
2983
+ symbol_,
2984
+ decimals_));
2985
+
2986
+ // New implementations always get set via the setter (post-initialize)
2987
+ _setImplementation(cErc20Implementation, false, becomeImplementationData);
2988
+
2989
+ // Set the proper admin now that initialization is done
2990
+ admin = admin_;
2991
+ }
2992
+
2993
+ /**
2994
+ * @notice Sender supplies assets into the market and receives cTokens in exchange
2995
+ * @dev Accrues interest whether or not the operation succeeds, unless reverted
2996
+ * @param mintAmount The amount of the underlying asset to supply
2997
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
2998
+ */
2999
+ function mint(uint mintAmount) external returns (uint) {
3000
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("mint(uint256)", mintAmount));
3001
+ return abi.decode(data, (uint));
3002
+ }
3003
+
3004
+ /**
3005
+ * @notice Sender redeems cTokens in exchange for the underlying asset
3006
+ * @dev Accrues interest whether or not the operation succeeds, unless reverted
3007
+ * @param redeemTokens The number of cTokens to redeem into underlying
3008
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3009
+ */
3010
+ function redeem(uint redeemTokens) external returns (uint) {
3011
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeem(uint256)", redeemTokens));
3012
+ return abi.decode(data, (uint));
3013
+ }
3014
+
3015
+ /**
3016
+ * @notice Sender redeems cTokens in exchange for a specified amount of underlying asset
3017
+ * @dev Accrues interest whether or not the operation succeeds, unless reverted
3018
+ * @param redeemAmount The amount of underlying to redeem
3019
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3020
+ */
3021
+ function redeemUnderlying(uint redeemAmount) external returns (uint) {
3022
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeemUnderlying(uint256)", redeemAmount));
3023
+ return abi.decode(data, (uint));
3024
+ }
3025
+
3026
+ /**
3027
+ * @notice Sender borrows assets from the protocol to their own address
3028
+ * @param borrowAmount The amount of the underlying asset to borrow
3029
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3030
+ */
3031
+ function borrow(uint borrowAmount) external returns (uint) {
3032
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrow(uint256)", borrowAmount));
3033
+ return abi.decode(data, (uint));
3034
+ }
3035
+
3036
+ /**
3037
+ * @notice Sender repays their own borrow
3038
+ * @param repayAmount The amount to repay
3039
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3040
+ */
3041
+ function repayBorrow(uint repayAmount) external returns (uint) {
3042
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("repayBorrow(uint256)", repayAmount));
3043
+ return abi.decode(data, (uint));
3044
+ }
3045
+
3046
+ /**
3047
+ * @notice Sender repays a borrow belonging to borrower
3048
+ * @param borrower the account with the debt being payed off
3049
+ * @param repayAmount The amount to repay
3050
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3051
+ */
3052
+ function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {
3053
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("repayBorrowBehalf(address,uint256)", borrower, repayAmount));
3054
+ return abi.decode(data, (uint));
3055
+ }
3056
+
3057
+ /**
3058
+ * @notice The sender liquidates the borrowers collateral.
3059
+ * The collateral seized is transferred to the liquidator.
3060
+ * @param borrower The borrower of this cToken to be liquidated
3061
+ * @param cTokenCollateral The market in which to seize collateral from the borrower
3062
+ * @param repayAmount The amount of the underlying borrowed asset to repay
3063
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3064
+ */
3065
+ function liquidateBorrow(address borrower, uint repayAmount, CTokenInterface cTokenCollateral) external returns (uint) {
3066
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("liquidateBorrow(address,uint256,address)", borrower, repayAmount, cTokenCollateral));
3067
+ return abi.decode(data, (uint));
3068
+ }
3069
+
3070
+ /**
3071
+ * @notice Transfer `amount` tokens from `msg.sender` to `dst`
3072
+ * @param dst The address of the destination account
3073
+ * @param amount The number of tokens to transfer
3074
+ * @return Whether or not the transfer succeeded
3075
+ */
3076
+ function transfer(address dst, uint amount) external returns (bool) {
3077
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("transfer(address,uint256)", dst, amount));
3078
+ return abi.decode(data, (bool));
3079
+ }
3080
+
3081
+ /**
3082
+ * @notice Transfer `amount` tokens from `src` to `dst`
3083
+ * @param src The address of the source account
3084
+ * @param dst The address of the destination account
3085
+ * @param amount The number of tokens to transfer
3086
+ * @return Whether or not the transfer succeeded
3087
+ */
3088
+ function transferFrom(address src, address dst, uint256 amount) external returns (bool) {
3089
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("transferFrom(address,address,uint256)", src, dst, amount));
3090
+ return abi.decode(data, (bool));
3091
+ }
3092
+
3093
+ /**
3094
+ * @notice Approve `spender` to transfer up to `amount` from `src`
3095
+ * @dev This will overwrite the approval amount for `spender`
3096
+ * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
3097
+ * @param spender The address of the account which may transfer tokens
3098
+ * @param amount The number of tokens that are approved (-1 means infinite)
3099
+ * @return Whether or not the approval succeeded
3100
+ */
3101
+ function approve(address spender, uint256 amount) external returns (bool) {
3102
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("approve(address,uint256)", spender, amount));
3103
+ return abi.decode(data, (bool));
3104
+ }
3105
+
3106
+ /**
3107
+ * @notice Get the current allowance from `owner` for `spender`
3108
+ * @param owner The address of the account which owns the tokens to be spent
3109
+ * @param spender The address of the account which may transfer tokens
3110
+ * @return The number of tokens allowed to be spent (-1 means infinite)
3111
+ */
3112
+ function allowance(address owner, address spender) external view returns (uint) {
3113
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("allowance(address,address)", owner, spender));
3114
+ return abi.decode(data, (uint));
3115
+ }
3116
+
3117
+ /**
3118
+ * @notice Get the token balance of the `owner`
3119
+ * @param owner The address of the account to query
3120
+ * @return The number of tokens owned by `owner`
3121
+ */
3122
+ function balanceOf(address owner) external view returns (uint) {
3123
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("balanceOf(address)", owner));
3124
+ return abi.decode(data, (uint));
3125
+ }
3126
+
3127
+ /**
3128
+ * @notice Get the underlying balance of the `owner`
3129
+ * @dev This also accrues interest in a transaction
3130
+ * @param owner The address of the account to query
3131
+ * @return The amount of underlying owned by `owner`
3132
+ */
3133
+ function balanceOfUnderlying(address owner) external returns (uint) {
3134
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("balanceOfUnderlying(address)", owner));
3135
+ return abi.decode(data, (uint));
3136
+ }
3137
+
3138
+ /**
3139
+ * @notice Get a snapshot of the account's balances, and the cached exchange rate
3140
+ * @dev This is used by Comptroller to more efficiently perform liquidity checks.
3141
+ * @param account Address of the account to snapshot
3142
+ * @return (possible error, token balance, borrow balance, exchange rate mantissa)
3143
+ */
3144
+ function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {
3145
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getAccountSnapshot(address)", account));
3146
+ return abi.decode(data, (uint, uint, uint, uint));
3147
+ }
3148
+
3149
+ /**
3150
+ * @notice Returns the current per-block borrow interest rate for this cToken
3151
+ * @return The borrow interest rate per block, scaled by 1e18
3152
+ */
3153
+ function borrowRatePerBlock() external view returns (uint) {
3154
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowRatePerBlock()"));
3155
+ return abi.decode(data, (uint));
3156
+ }
3157
+
3158
+ /**
3159
+ * @notice Returns the current per-block supply interest rate for this cToken
3160
+ * @return The supply interest rate per block, scaled by 1e18
3161
+ */
3162
+ function supplyRatePerBlock() external view returns (uint) {
3163
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("supplyRatePerBlock()"));
3164
+ return abi.decode(data, (uint));
3165
+ }
3166
+
3167
+ /**
3168
+ * @notice Returns the current total borrows plus accrued interest
3169
+ * @return The total borrows with interest
3170
+ */
3171
+ function totalBorrowsCurrent() external returns (uint) {
3172
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("totalBorrowsCurrent()"));
3173
+ return abi.decode(data, (uint));
3174
+ }
3175
+
3176
+ /**
3177
+ * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex
3178
+ * @param account The address whose balance should be calculated after updating borrowIndex
3179
+ * @return The calculated balance
3180
+ */
3181
+ function borrowBalanceCurrent(address account) external returns (uint) {
3182
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrowBalanceCurrent(address)", account));
3183
+ return abi.decode(data, (uint));
3184
+ }
3185
+
3186
+ /**
3187
+ * @notice Return the borrow balance of account based on stored data
3188
+ * @param account The address whose balance should be calculated
3189
+ * @return The calculated balance
3190
+ */
3191
+ function borrowBalanceStored(address account) public view returns (uint) {
3192
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowBalanceStored(address)", account));
3193
+ return abi.decode(data, (uint));
3194
+ }
3195
+
3196
+ /**
3197
+ * @notice Accrue interest then return the up-to-date exchange rate
3198
+ * @return Calculated exchange rate scaled by 1e18
3199
+ */
3200
+ function exchangeRateCurrent() public returns (uint) {
3201
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("exchangeRateCurrent()"));
3202
+ return abi.decode(data, (uint));
3203
+ }
3204
+
3205
+ /**
3206
+ * @notice Calculates the exchange rate from the underlying to the CToken
3207
+ * @dev This function does not accrue interest before calculating the exchange rate
3208
+ * @return Calculated exchange rate scaled by 1e18
3209
+ */
3210
+ function exchangeRateStored() public view returns (uint) {
3211
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("exchangeRateStored()"));
3212
+ return abi.decode(data, (uint));
3213
+ }
3214
+
3215
+ /**
3216
+ * @notice Get cash balance of this cToken in the underlying asset
3217
+ * @return The quantity of underlying asset owned by this contract
3218
+ */
3219
+ function getCash() external view returns (uint) {
3220
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getCash()"));
3221
+ return abi.decode(data, (uint));
3222
+ }
3223
+
3224
+ /**
3225
+ * @notice Get the accrual block number of this cToken
3226
+ * @return The accrual block number
3227
+ */
3228
+ function getAccrualBlockNumber() external view returns (uint) {
3229
+ bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getAccrualBlockNumber()"));
3230
+ return abi.decode(data, (uint));
3231
+ }
3232
+
3233
+ /**
3234
+ * @notice Applies accrued interest to total borrows and reserves.
3235
+ * @dev This calculates interest accrued from the last checkpointed block
3236
+ * up to the current block and writes new checkpoint to storage.
3237
+ */
3238
+ function accrueInterest() public returns (uint) {
3239
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("accrueInterest()"));
3240
+ return abi.decode(data, (uint));
3241
+ }
3242
+
3243
+ /**
3244
+ * @notice Transfers collateral tokens (this market) to the liquidator.
3245
+ * @dev Will fail unless called by another cToken during the process of liquidation.
3246
+ * Its absolutely critical to use msg.sender as the borrowed cToken and not a parameter.
3247
+ * @param liquidator The account receiving seized collateral
3248
+ * @param borrower The account having collateral seized
3249
+ * @param seizeTokens The number of cTokens to seize
3250
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3251
+ */
3252
+ function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {
3253
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("seize(address,address,uint256)", liquidator, borrower, seizeTokens));
3254
+ return abi.decode(data, (uint));
3255
+ }
3256
+
3257
+ /**
3258
+ * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to admin (Timelock)
3259
+ * @param token The address of the ERC-20 token to sweep
3260
+ */
3261
+ function sweepToken(EIP20NonStandardInterface token) external {
3262
+ delegateToImplementation(abi.encodeWithSignature("sweepToken(address)", token));
3263
+ }
3264
+
3265
+
3266
+ /*** Admin Functions ***/
3267
+
3268
+ /**
3269
+ * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
3270
+ * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
3271
+ * @param newPendingAdmin New pending admin.
3272
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3273
+ */
3274
+ function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {
3275
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setPendingAdmin(address)", newPendingAdmin));
3276
+ return abi.decode(data, (uint));
3277
+ }
3278
+
3279
+ /**
3280
+ * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh
3281
+ * @dev Admin function to accrue interest and set a new reserve factor
3282
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3283
+ */
3284
+ function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {
3285
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setReserveFactor(uint256)", newReserveFactorMantissa));
3286
+ return abi.decode(data, (uint));
3287
+ }
3288
+
3289
+ /**
3290
+ * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin
3291
+ * @dev Admin function for pending admin to accept role and update admin
3292
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3293
+ */
3294
+ function _acceptAdmin() external returns (uint) {
3295
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("_acceptAdmin()"));
3296
+ return abi.decode(data, (uint));
3297
+ }
3298
+
3299
+ /**
3300
+ * @notice Accrues interest and reduces reserves by transferring to admin
3301
+ * @param reduceAmount Amount of reduction to reserves
3302
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3303
+ */
3304
+ function _reduceReserves(uint reduceAmount) external returns (uint) {
3305
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("_reduceReserves(uint256)", reduceAmount));
3306
+ return abi.decode(data, (uint));
3307
+ }
3308
+
3309
+ /**
3310
+ * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh
3311
+ * @dev Admin function to accrue interest and update the interest rate model
3312
+ * @param newInterestRateModel the new interest rate model to use
3313
+ * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
3314
+ */
3315
+ function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {
3316
+ bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setInterestRateModel(address)", newInterestRateModel));
3317
+ return abi.decode(data, (uint));
3318
+ }
3319
+
3320
+ /**
3321
+ * @notice Internal method to delegate execution to another contract
3322
+ * @dev It returns to the external caller whatever the implementation returns or forwards reverts
3323
+ * @param callee The contract to delegatecall
3324
+ * @param data The raw data to delegatecall
3325
+ * @return The returned bytes from the delegatecall
3326
+ */
3327
+ function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {
3328
+ (bool success, bytes memory returnData) = callee.delegatecall(data);
3329
+ assembly {
3330
+ if eq(success, 0) {
3331
+ revert(add(returnData, 0x20), returndatasize)
3332
+ }
3333
+ }
3334
+ return returnData;
3335
+ }
3336
+
3337
+ /**
3338
+ * @notice Delegates execution to the implementation contract
3339
+ * @dev It returns to the external caller whatever the implementation returns or forwards reverts
3340
+ * @param data The raw data to delegatecall
3341
+ * @return The returned bytes from the delegatecall
3342
+ */
3343
+ function delegateToImplementation(bytes memory data) public returns (bytes memory) {
3344
+ return delegateTo(implementation, data);
3345
+ }
3346
+
3347
+ /**
3348
+ * @notice Delegates execution to an implementation contract
3349
+ * @dev It returns to the external caller whatever the implementation returns or forwards reverts
3350
+ * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.
3351
+ * @param data The raw data to delegatecall
3352
+ * @return The returned bytes from the delegatecall
3353
+ */
3354
+ function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {
3355
+ (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data));
3356
+ assembly {
3357
+ if eq(success, 0) {
3358
+ revert(add(returnData, 0x20), returndatasize)
3359
+ }
3360
+ }
3361
+ return abi.decode(returnData, (bytes));
3362
+ }
3363
+
3364
+ /**
3365
+ * @notice Delegates execution to an implementation contract
3366
+ * @dev It returns to the external caller whatever the implementation returns or forwards reverts
3367
+ */
3368
+ function () external payable {
3369
+ require(msg.value == 0,"CErc20Delegator:fallback: cannot send value to fallback");
3370
+
3371
+ // delegate all other functions to current implementation
3372
+ (bool success, ) = implementation.delegatecall(msg.data);
3373
+
3374
+ assembly {
3375
+ let free_mem_ptr := mload(0x40)
3376
+ returndatacopy(free_mem_ptr, 0, returndatasize)
3377
+
3378
+ switch success
3379
+ case 0 { revert(free_mem_ptr, returndatasize) }
3380
+ default { return(free_mem_ptr, returndatasize) }
3381
+ }
3382
+ }
3383
+ }
3384
+
3385
+
3386
+