brakeman 4.10.0 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +46 -0
  3. data/README.md +11 -2
  4. data/bundle/load.rb +5 -3
  5. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/CHANGELOG.md +16 -0
  6. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/FAQ.md +0 -0
  7. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/Gemfile +1 -4
  8. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/MIT-LICENSE +0 -0
  9. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/README.md +2 -3
  10. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/REFERENCE.md +29 -7
  11. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/TODO +0 -0
  12. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/haml.gemspec +2 -1
  13. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml.rb +0 -0
  14. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/attribute_builder.rb +3 -3
  15. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/attribute_compiler.rb +42 -31
  16. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/attribute_parser.rb +0 -0
  17. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/buffer.rb +0 -0
  18. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/compiler.rb +0 -0
  19. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/engine.rb +0 -0
  20. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/error.rb +0 -0
  21. data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/escapable.rb +77 -0
  22. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/exec.rb +0 -0
  23. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/filters.rb +0 -0
  24. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/generator.rb +0 -0
  25. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/helpers.rb +7 -1
  26. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/helpers/action_view_extensions.rb +0 -0
  27. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/helpers/action_view_mods.rb +0 -0
  28. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/helpers/action_view_xss_mods.rb +0 -0
  29. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/helpers/safe_erubi_template.rb +0 -0
  30. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/helpers/safe_erubis_template.rb +0 -0
  31. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/helpers/xss_mods.rb +6 -3
  32. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/options.rb +0 -0
  33. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/parser.rb +32 -4
  34. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/plugin.rb +0 -0
  35. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/railtie.rb +0 -0
  36. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/sass_rails_filter.rb +0 -0
  37. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/template.rb +0 -0
  38. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/template/options.rb +0 -0
  39. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/temple_engine.rb +0 -0
  40. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/temple_line_counter.rb +0 -0
  41. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/util.rb +1 -1
  42. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/lib/haml/version.rb +1 -1
  43. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/yard/default/fulldoc/html/css/common.sass +0 -0
  44. data/bundle/ruby/2.7.0/gems/{haml-5.1.2 → haml-5.2.1}/yard/default/layout/html/footer.erb +0 -0
  45. data/bundle/ruby/2.7.0/gems/parallel-1.20.1/MIT-LICENSE.txt +20 -0
  46. data/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb +523 -0
  47. data/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel/processor_count.rb +42 -0
  48. data/bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel/version.rb +3 -0
  49. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
  50. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +178 -0
  51. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md +48 -0
  52. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
  53. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
  54. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
  55. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
  56. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
  57. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
  58. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
  59. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
  60. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
  61. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
  62. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
  63. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
  64. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
  65. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
  66. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
  67. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
  68. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
  69. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
  70. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
  71. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
  72. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
  73. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
  74. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
  75. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
  76. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
  77. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
  78. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
  79. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
  80. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
  81. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
  82. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
  83. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
  84. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
  85. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
  86. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
  87. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
  88. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
  89. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
  90. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
  91. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
  92. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
  93. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
  94. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
  95. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
  96. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
  97. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
  98. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
  99. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
  100. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
  101. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
  102. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/History.rdoc +25 -0
  103. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/Manifest.txt +2 -0
  104. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/README.rdoc +0 -0
  105. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/compare/normalize.rb +2 -2
  106. data/bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/debugging.md +190 -0
  107. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/rp_extensions.rb +0 -0
  108. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/rp_stringscanner.rb +0 -0
  109. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby20_parser.rb +2392 -2384
  110. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby20_parser.y +6 -1
  111. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby21_parser.rb +2553 -2550
  112. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby21_parser.y +6 -1
  113. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby22_parser.rb +2491 -2471
  114. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby22_parser.y +6 -1
  115. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby23_parser.rb +2422 -2403
  116. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby23_parser.y +6 -1
  117. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby24_parser.rb +2460 -2450
  118. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby24_parser.y +6 -1
  119. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby25_parser.rb +2450 -2441
  120. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby25_parser.y +6 -1
  121. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby26_parser.rb +2444 -2433
  122. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby26_parser.y +7 -1
  123. data/bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby27_parser.rb +7310 -0
  124. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby27_parser.y +21 -1
  125. data/bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby30_parser.rb +7310 -0
  126. data/bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby30_parser.y +2677 -0
  127. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby_lexer.rb +19 -0
  128. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby_lexer.rex +1 -1
  129. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby_lexer.rex.rb +1 -1
  130. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby_parser.rb +2 -0
  131. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby_parser.yy +27 -1
  132. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/lib/ruby_parser_extras.rb +2 -2
  133. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/tools/munge.rb +2 -2
  134. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.16.0}/tools/ripper.rb +0 -0
  135. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/History.rdoc +12 -0
  136. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/Manifest.txt +0 -0
  137. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/README.rdoc +0 -0
  138. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/lib/composite_sexp_processor.rb +0 -0
  139. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/lib/pt_testcase.rb +2 -2
  140. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/lib/sexp.rb +0 -0
  141. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/lib/sexp_matcher.rb +0 -0
  142. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/lib/sexp_processor.rb +1 -1
  143. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/lib/strict_sexp.rb +0 -0
  144. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.3}/lib/unique.rb +0 -0
  145. data/lib/brakeman.rb +21 -4
  146. data/lib/brakeman/app_tree.rb +36 -3
  147. data/lib/brakeman/checks/base_check.rb +7 -1
  148. data/lib/brakeman/checks/check_detailed_exceptions.rb +1 -1
  149. data/lib/brakeman/checks/check_evaluation.rb +1 -1
  150. data/lib/brakeman/checks/check_execute.rb +2 -1
  151. data/lib/brakeman/checks/check_mass_assignment.rb +4 -6
  152. data/lib/brakeman/checks/check_regex_dos.rb +1 -1
  153. data/lib/brakeman/checks/check_sanitize_methods.rb +2 -1
  154. data/lib/brakeman/checks/check_sql.rb +16 -3
  155. data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +68 -0
  156. data/lib/brakeman/checks/check_verb_confusion.rb +75 -0
  157. data/lib/brakeman/file_parser.rb +50 -22
  158. data/lib/brakeman/options.rb +5 -1
  159. data/lib/brakeman/parsers/template_parser.rb +26 -3
  160. data/lib/brakeman/processors/alias_processor.rb +91 -19
  161. data/lib/brakeman/processors/base_processor.rb +4 -4
  162. data/lib/brakeman/processors/controller_alias_processor.rb +6 -43
  163. data/lib/brakeman/processors/controller_processor.rb +1 -1
  164. data/lib/brakeman/processors/haml_template_processor.rb +8 -1
  165. data/lib/brakeman/processors/lib/call_conversion_helper.rb +10 -0
  166. data/lib/brakeman/processors/lib/file_type_detector.rb +64 -0
  167. data/lib/brakeman/processors/lib/rails3_config_processor.rb +16 -16
  168. data/lib/brakeman/processors/lib/rails4_config_processor.rb +2 -1
  169. data/lib/brakeman/processors/library_processor.rb +9 -0
  170. data/lib/brakeman/processors/output_processor.rb +1 -1
  171. data/lib/brakeman/processors/template_alias_processor.rb +5 -0
  172. data/lib/brakeman/report.rb +12 -1
  173. data/lib/brakeman/report/ignore/interactive.rb +1 -1
  174. data/lib/brakeman/report/report_base.rb +0 -2
  175. data/lib/brakeman/report/report_csv.rb +37 -60
  176. data/lib/brakeman/report/report_github.rb +31 -0
  177. data/lib/brakeman/report/report_junit.rb +2 -2
  178. data/lib/brakeman/report/report_sarif.rb +1 -1
  179. data/lib/brakeman/report/report_sonar.rb +38 -0
  180. data/lib/brakeman/report/report_tabs.rb +1 -1
  181. data/lib/brakeman/report/report_text.rb +1 -1
  182. data/lib/brakeman/rescanner.rb +7 -5
  183. data/lib/brakeman/scanner.rb +47 -18
  184. data/lib/brakeman/tracker.rb +39 -4
  185. data/lib/brakeman/tracker/collection.rb +27 -5
  186. data/lib/brakeman/tracker/config.rb +73 -0
  187. data/lib/brakeman/tracker/controller.rb +1 -1
  188. data/lib/brakeman/tracker/method_info.rb +29 -0
  189. data/lib/brakeman/util.rb +17 -4
  190. data/lib/brakeman/version.rb +1 -1
  191. data/lib/brakeman/warning.rb +10 -2
  192. data/lib/brakeman/warning_codes.rb +2 -0
  193. data/lib/ruby_parser/bm_sexp.rb +9 -9
  194. metadata +149 -84
  195. data/bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/escapable.rb +0 -50
  196. data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/debugging.md +0 -57
  197. data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby27_parser.rb +0 -7224
@@ -125,7 +125,7 @@ module Brakeman
125
125
  value = args[-1][2]
126
126
  case value.node_type
127
127
  when :array
128
- filter[option] = value[1..-1].map {|v| v[1] }
128
+ filter[option] = value.sexp_body.map {|v| v[1] }
129
129
  when :lit, :str
130
130
  filter[option] = value[1]
131
131
  else
@@ -0,0 +1,29 @@
1
+ require 'brakeman/util'
2
+
3
+ module Brakeman
4
+ class MethodInfo
5
+ include Brakeman::Util
6
+
7
+ attr_reader :name, :src, :owner, :file, :type
8
+
9
+ def initialize name, src, owner, file
10
+ @name = name
11
+ @src = src
12
+ @owner = owner
13
+ @file = file
14
+ @type = case src.node_type
15
+ when :defn
16
+ :instance
17
+ when :defs
18
+ :class
19
+ else
20
+ raise "Expected sexp type: #{src.node_type}"
21
+ end
22
+ end
23
+
24
+ # To support legacy code that expected a Hash
25
+ def [] attr
26
+ self.send(attr)
27
+ end
28
+ end
29
+ end
data/lib/brakeman/util.rb CHANGED
@@ -142,6 +142,14 @@ module Brakeman::Util
142
142
  nil
143
143
  end
144
144
 
145
+ def hash_values hash
146
+ values = hash.each_sexp.each_slice(2).map do |_, value|
147
+ value
148
+ end
149
+
150
+ Sexp.new(:array).concat(values).line(hash.line)
151
+ end
152
+
145
153
  #These are never modified
146
154
  PARAMS_SEXP = Sexp.new(:params)
147
155
  SESSION_SEXP = Sexp.new(:session)
@@ -321,7 +329,7 @@ module Brakeman::Util
321
329
  if node_type? current, :class
322
330
  return true
323
331
  elsif sexp? current
324
- todo = current[1..-1].concat todo
332
+ todo = current.sexp_body.concat todo
325
333
  end
326
334
  end
327
335
 
@@ -334,7 +342,7 @@ module Brakeman::Util
334
342
  if args.empty? or args.first.empty?
335
343
  #nothing to do
336
344
  elsif node_type? args.first, :arglist
337
- call.concat args.first[1..-1]
345
+ call.concat args.first.sexp_body
338
346
  elsif args.first.node_type.is_a? Sexp #just a list of args
339
347
  call.concat args.first
340
348
  else
@@ -368,8 +376,13 @@ module Brakeman::Util
368
376
  #
369
377
  # views/test/something.html.erb -> test/something
370
378
  def template_path_to_name path
371
- names = path.relative.split("/")
379
+ names = path.relative.split('/')
372
380
  names.last.gsub!(/(\.(html|js)\..*|\.(rhtml|haml|erb|slim))$/, '')
373
- names[(names.index("views") + 1)..-1].join("/").to_sym
381
+
382
+ if names.include? 'views'
383
+ names[(names.index('views') + 1)..-1]
384
+ else
385
+ names
386
+ end.join('/').to_sym
374
387
  end
375
388
  end
@@ -1,3 +1,3 @@
1
1
  module Brakeman
2
- Version = "4.10.0"
2
+ Version = "5.0.2"
3
3
  end
@@ -275,6 +275,14 @@ class Brakeman::Warning
275
275
  self.file.relative
276
276
  end
277
277
 
278
+ def check_name
279
+ @check_name ||= self.check.sub(/^Brakeman::Check/, '')
280
+ end
281
+
282
+ def confidence_name
283
+ TEXT_CONFIDENCE[self.confidence]
284
+ end
285
+
278
286
  def to_hash absolute_paths: true
279
287
  if self.called_from and not absolute_paths
280
288
  render_path = self.called_from.with_relative_paths
@@ -285,7 +293,7 @@ class Brakeman::Warning
285
293
  { :warning_type => self.warning_type,
286
294
  :warning_code => @warning_code,
287
295
  :fingerprint => self.fingerprint,
288
- :check_name => self.check.gsub(/^Brakeman::Check/, ''),
296
+ :check_name => self.check_name,
289
297
  :message => self.message.to_s,
290
298
  :file => (absolute_paths ? self.file.absolute : self.file.relative),
291
299
  :line => self.line,
@@ -294,7 +302,7 @@ class Brakeman::Warning
294
302
  :render_path => render_path,
295
303
  :location => self.location(false),
296
304
  :user_input => (@user_input && self.format_user_input(false)),
297
- :confidence => TEXT_CONFIDENCE[self.confidence]
305
+ :confidence => self.confidence_name
298
306
  }
299
307
  end
300
308
 
@@ -119,6 +119,8 @@ module Brakeman::WarningCodes
119
119
  :CVE_2020_8159 => 115,
120
120
  :CVE_2020_8166 => 116,
121
121
  :erb_template_injection => 117,
122
+ :http_verb_confusion => 118,
123
+ :unsafe_method_reflection => 119,
122
124
 
123
125
  :custom_check => 9090,
124
126
  }
@@ -175,7 +175,7 @@ class Sexp
175
175
  start_index = 3
176
176
 
177
177
  if exp.is_a? Sexp and exp.node_type == :arglist
178
- exp = exp[1..-1]
178
+ exp = exp.sexp_body
179
179
  end
180
180
 
181
181
  exp.each_with_index do |e, i|
@@ -198,10 +198,10 @@ class Sexp
198
198
 
199
199
  case self.node_type
200
200
  when :call, :attrasgn, :safe_call, :safe_attrasgn
201
- self[3..-1].unshift :arglist
201
+ self.sexp_body(3).unshift :arglist
202
202
  when :super, :zsuper
203
203
  if self[1]
204
- self[1..-1].unshift :arglist
204
+ self.sexp_body.unshift :arglist
205
205
  else
206
206
  Sexp.new(:arglist)
207
207
  end
@@ -218,13 +218,13 @@ class Sexp
218
218
  case self.node_type
219
219
  when :call, :attrasgn, :safe_call, :safe_attrasgn
220
220
  if self[3]
221
- self[3..-1]
221
+ self.sexp_body(3)
222
222
  else
223
223
  Sexp.new
224
224
  end
225
225
  when :super, :zsuper
226
226
  if self[1]
227
- self[1..-1]
227
+ self.sexp_body
228
228
  else
229
229
  Sexp.new
230
230
  end
@@ -512,7 +512,7 @@ class Sexp
512
512
  self.slice!(index..-1) #Remove old body
513
513
 
514
514
  if exp.first == :rlist
515
- exp = exp[1..-1]
515
+ exp = exp.sexp_body
516
516
  end
517
517
 
518
518
  #Insert new body
@@ -529,11 +529,11 @@ class Sexp
529
529
 
530
530
  case self.node_type
531
531
  when :defn, :class
532
- self[3..-1]
532
+ self.sexp_body(3)
533
533
  when :defs
534
- self[4..-1]
534
+ self.sexp_body(4)
535
535
  when :module
536
- self[2..-1]
536
+ self.sexp_body(2)
537
537
  end
538
538
  end
539
539
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brakeman
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.10.0
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Collins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-28 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Brakeman detects security vulnerabilities in Ruby on Rails applications
14
14
  via static analysis.
@@ -56,46 +56,46 @@ files:
56
56
  - bundle/ruby/2.7.0/gems/erubis-2.7.0/lib/erubis/tiny.rb
57
57
  - bundle/ruby/2.7.0/gems/erubis-2.7.0/lib/erubis/util.rb
58
58
  - bundle/ruby/2.7.0/gems/erubis-2.7.0/setup.rb
59
- - bundle/ruby/2.7.0/gems/haml-5.1.2/CHANGELOG.md
60
- - bundle/ruby/2.7.0/gems/haml-5.1.2/FAQ.md
61
- - bundle/ruby/2.7.0/gems/haml-5.1.2/Gemfile
62
- - bundle/ruby/2.7.0/gems/haml-5.1.2/MIT-LICENSE
63
- - bundle/ruby/2.7.0/gems/haml-5.1.2/README.md
64
- - bundle/ruby/2.7.0/gems/haml-5.1.2/REFERENCE.md
65
- - bundle/ruby/2.7.0/gems/haml-5.1.2/TODO
66
- - bundle/ruby/2.7.0/gems/haml-5.1.2/haml.gemspec
67
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml.rb
68
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/attribute_builder.rb
69
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/attribute_compiler.rb
70
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/attribute_parser.rb
71
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/buffer.rb
72
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/compiler.rb
73
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/engine.rb
74
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/error.rb
75
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/escapable.rb
76
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/exec.rb
77
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/filters.rb
78
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/generator.rb
79
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/helpers.rb
80
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/helpers/action_view_extensions.rb
81
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/helpers/action_view_mods.rb
82
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/helpers/action_view_xss_mods.rb
83
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/helpers/safe_erubi_template.rb
84
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/helpers/safe_erubis_template.rb
85
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/helpers/xss_mods.rb
86
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/options.rb
87
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/parser.rb
88
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/plugin.rb
89
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/railtie.rb
90
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/sass_rails_filter.rb
91
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/template.rb
92
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/template/options.rb
93
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/temple_engine.rb
94
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/temple_line_counter.rb
95
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/util.rb
96
- - bundle/ruby/2.7.0/gems/haml-5.1.2/lib/haml/version.rb
97
- - bundle/ruby/2.7.0/gems/haml-5.1.2/yard/default/fulldoc/html/css/common.sass
98
- - bundle/ruby/2.7.0/gems/haml-5.1.2/yard/default/layout/html/footer.erb
59
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/CHANGELOG.md
60
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/FAQ.md
61
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/Gemfile
62
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/MIT-LICENSE
63
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/README.md
64
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/REFERENCE.md
65
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/TODO
66
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/haml.gemspec
67
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml.rb
68
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/attribute_builder.rb
69
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/attribute_compiler.rb
70
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/attribute_parser.rb
71
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/buffer.rb
72
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/compiler.rb
73
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/engine.rb
74
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/error.rb
75
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/escapable.rb
76
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/exec.rb
77
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/filters.rb
78
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/generator.rb
79
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/helpers.rb
80
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/helpers/action_view_extensions.rb
81
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/helpers/action_view_mods.rb
82
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/helpers/action_view_xss_mods.rb
83
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/helpers/safe_erubi_template.rb
84
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/helpers/safe_erubis_template.rb
85
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/helpers/xss_mods.rb
86
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/options.rb
87
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/parser.rb
88
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/plugin.rb
89
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/railtie.rb
90
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/sass_rails_filter.rb
91
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/template.rb
92
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/template/options.rb
93
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/temple_engine.rb
94
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/temple_line_counter.rb
95
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/util.rb
96
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/version.rb
97
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/yard/default/fulldoc/html/css/common.sass
98
+ - bundle/ruby/2.7.0/gems/haml-5.2.1/yard/default/layout/html/footer.erb
99
99
  - bundle/ruby/2.7.0/gems/highline-2.0.3/AUTHORS
100
100
  - bundle/ruby/2.7.0/gems/highline-2.0.3/COPYING
101
101
  - bundle/ruby/2.7.0/gems/highline-2.0.3/Changelog.md
@@ -132,41 +132,100 @@ files:
132
132
  - bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal/unix_stty.rb
133
133
  - bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/version.rb
134
134
  - bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/wrapper.rb
135
+ - bundle/ruby/2.7.0/gems/parallel-1.20.1/MIT-LICENSE.txt
136
+ - bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel.rb
137
+ - bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel/processor_count.rb
138
+ - bundle/ruby/2.7.0/gems/parallel-1.20.1/lib/parallel/version.rb
139
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/LICENSE.txt
140
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md
141
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md
142
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml.rb
143
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb
144
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb
145
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb
146
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb
147
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb
148
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb
149
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb
150
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb
151
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb
152
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb
153
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb
154
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb
155
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb
156
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb
157
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb
158
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb
159
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb
160
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb
161
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb
162
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb
163
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/light/node.rb
164
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb
165
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb
166
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/output.rb
167
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parent.rb
168
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb
169
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb
170
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb
171
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb
172
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb
173
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb
174
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb
175
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb
176
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb
177
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb
178
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb
179
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb
180
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb
181
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb
182
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb
183
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb
184
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb
185
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb
186
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb
187
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb
188
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb
189
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb
190
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb
191
+ - bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb
135
192
  - bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/History.rdoc
136
193
  - bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/Manifest.txt
137
194
  - bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/README.rdoc
138
195
  - bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb
139
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/History.rdoc
140
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/Manifest.txt
141
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/README.rdoc
142
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/compare/normalize.rb
143
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/debugging.md
144
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/rp_extensions.rb
145
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/rp_stringscanner.rb
146
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby20_parser.rb
147
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby20_parser.y
148
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby21_parser.rb
149
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby21_parser.y
150
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby22_parser.rb
151
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby22_parser.y
152
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby23_parser.rb
153
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby23_parser.y
154
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby24_parser.rb
155
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby24_parser.y
156
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby25_parser.rb
157
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby25_parser.y
158
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby26_parser.rb
159
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby26_parser.y
160
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby27_parser.rb
161
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby27_parser.y
162
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby_lexer.rb
163
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby_lexer.rex
164
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby_lexer.rex.rb
165
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby_parser.rb
166
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby_parser.yy
167
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby_parser_extras.rb
168
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/tools/munge.rb
169
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/tools/ripper.rb
196
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/History.rdoc
197
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/Manifest.txt
198
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/README.rdoc
199
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/compare/normalize.rb
200
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/debugging.md
201
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/rp_extensions.rb
202
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/rp_stringscanner.rb
203
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby20_parser.rb
204
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby20_parser.y
205
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby21_parser.rb
206
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby21_parser.y
207
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby22_parser.rb
208
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby22_parser.y
209
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby23_parser.rb
210
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby23_parser.y
211
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby24_parser.rb
212
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby24_parser.y
213
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby25_parser.rb
214
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby25_parser.y
215
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby26_parser.rb
216
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby26_parser.y
217
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby27_parser.rb
218
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby27_parser.y
219
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby30_parser.rb
220
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby30_parser.y
221
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_lexer.rb
222
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_lexer.rex
223
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_lexer.rex.rb
224
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_parser.rb
225
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_parser.yy
226
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_parser_extras.rb
227
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/tools/munge.rb
228
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/tools/ripper.rb
170
229
  - bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc
171
230
  - bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt
172
231
  - bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc
@@ -211,16 +270,16 @@ files:
211
270
  - bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb
212
271
  - bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh
213
272
  - bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec
214
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/History.rdoc
215
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/Manifest.txt
216
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/README.rdoc
217
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/lib/composite_sexp_processor.rb
218
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/lib/pt_testcase.rb
219
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/lib/sexp.rb
220
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/lib/sexp_matcher.rb
221
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/lib/sexp_processor.rb
222
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/lib/strict_sexp.rb
223
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/lib/unique.rb
273
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/History.rdoc
274
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/Manifest.txt
275
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/README.rdoc
276
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/composite_sexp_processor.rb
277
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/pt_testcase.rb
278
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/sexp.rb
279
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/sexp_matcher.rb
280
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/sexp_processor.rb
281
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/strict_sexp.rb
282
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/unique.rb
224
283
  - bundle/ruby/2.7.0/gems/slim-4.1.0/CHANGES
225
284
  - bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile
226
285
  - bundle/ruby/2.7.0/gems/slim-4.1.0/LICENSE
@@ -448,8 +507,10 @@ files:
448
507
  - lib/brakeman/checks/check_template_injection.rb
449
508
  - lib/brakeman/checks/check_translate_bug.rb
450
509
  - lib/brakeman/checks/check_unsafe_reflection.rb
510
+ - lib/brakeman/checks/check_unsafe_reflection_methods.rb
451
511
  - lib/brakeman/checks/check_unscoped_find.rb
452
512
  - lib/brakeman/checks/check_validation_regex.rb
513
+ - lib/brakeman/checks/check_verb_confusion.rb
453
514
  - lib/brakeman/checks/check_weak_hash.rb
454
515
  - lib/brakeman/checks/check_without_protection.rb
455
516
  - lib/brakeman/checks/check_xml_dos.rb
@@ -480,6 +541,7 @@ files:
480
541
  - lib/brakeman/processors/haml_template_processor.rb
481
542
  - lib/brakeman/processors/lib/basic_processor.rb
482
543
  - lib/brakeman/processors/lib/call_conversion_helper.rb
544
+ - lib/brakeman/processors/lib/file_type_detector.rb
483
545
  - lib/brakeman/processors/lib/find_all_calls.rb
484
546
  - lib/brakeman/processors/lib/find_call.rb
485
547
  - lib/brakeman/processors/lib/find_return_value.rb
@@ -510,12 +572,14 @@ files:
510
572
  - lib/brakeman/report/report_base.rb
511
573
  - lib/brakeman/report/report_codeclimate.rb
512
574
  - lib/brakeman/report/report_csv.rb
575
+ - lib/brakeman/report/report_github.rb
513
576
  - lib/brakeman/report/report_hash.rb
514
577
  - lib/brakeman/report/report_html.rb
515
578
  - lib/brakeman/report/report_json.rb
516
579
  - lib/brakeman/report/report_junit.rb
517
580
  - lib/brakeman/report/report_markdown.rb
518
581
  - lib/brakeman/report/report_sarif.rb
582
+ - lib/brakeman/report/report_sonar.rb
519
583
  - lib/brakeman/report/report_table.rb
520
584
  - lib/brakeman/report/report_tabs.rb
521
585
  - lib/brakeman/report/report_text.rb
@@ -538,6 +602,7 @@ files:
538
602
  - lib/brakeman/tracker/constants.rb
539
603
  - lib/brakeman/tracker/controller.rb
540
604
  - lib/brakeman/tracker/library.rb
605
+ - lib/brakeman/tracker/method_info.rb
541
606
  - lib/brakeman/tracker/model.rb
542
607
  - lib/brakeman/tracker/template.rb
543
608
  - lib/brakeman/util.rb
@@ -565,7 +630,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
565
630
  requirements:
566
631
  - - ">="
567
632
  - !ruby/object:Gem::Version
568
- version: 2.3.0
633
+ version: 2.4.0
569
634
  required_rubygems_version: !ruby/object:Gem::Requirement
570
635
  requirements:
571
636
  - - ">="