brakeman 5.2.0 → 5.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +17 -0
  3. data/bundle/load.rb +3 -3
  4. data/bundle/ruby/2.7.0/gems/{parallel-1.21.0 → parallel-1.22.1}/MIT-LICENSE.txt +0 -0
  5. data/bundle/ruby/2.7.0/gems/{parallel-1.21.0 → parallel-1.22.1}/lib/parallel/processor_count.rb +2 -3
  6. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +4 -0
  7. data/bundle/ruby/2.7.0/gems/{parallel-1.21.0 → parallel-1.22.1}/lib/parallel.rb +84 -4
  8. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/History.rdoc +28 -0
  9. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/Manifest.txt +2 -0
  10. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/README.rdoc +8 -6
  11. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/compare/normalize.rb +0 -0
  12. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/debugging.md +0 -0
  13. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/gauntlet.md +19 -18
  14. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/rp_extensions.rb +0 -0
  15. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/rp_stringscanner.rb +0 -0
  16. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.rb +10973 -0
  17. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby20_parser.y +14 -27
  18. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.rb +10980 -0
  19. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby21_parser.y +14 -27
  20. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.rb +11123 -0
  21. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby22_parser.y +14 -27
  22. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.rb +11132 -0
  23. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby23_parser.y +14 -27
  24. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.rb +11231 -0
  25. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby24_parser.y +14 -27
  26. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.rb +11231 -0
  27. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby25_parser.y +14 -27
  28. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.rb +11253 -0
  29. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby26_parser.y +14 -27
  30. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.rb +12980 -0
  31. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby27_parser.y +19 -41
  32. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.rb +13242 -0
  33. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby30_parser.y +65 -90
  34. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.rb +13622 -0
  35. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1/lib/ruby3_parser.yy → ruby_parser-3.19.1/lib/ruby31_parser.y} +110 -105
  36. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy +3536 -0
  37. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_lexer.rb +0 -0
  38. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_lexer.rex +0 -0
  39. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_lexer.rex.rb +0 -0
  40. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_lexer_strings.rb +0 -0
  41. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_parser.rb +2 -0
  42. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_parser.yy +19 -41
  43. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_parser_extras.rb +55 -2
  44. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/tools/munge.rb +0 -0
  45. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/tools/ripper.rb +0 -0
  46. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/History.rdoc +6 -0
  47. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/Manifest.txt +0 -0
  48. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/README.rdoc +0 -0
  49. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/composite_sexp_processor.rb +0 -0
  50. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/pt_testcase.rb +7 -3
  51. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/sexp.rb +0 -0
  52. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/sexp_matcher.rb +0 -0
  53. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/sexp_processor.rb +1 -1
  54. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/strict_sexp.rb +0 -0
  55. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/unique.rb +0 -0
  56. data/lib/brakeman/checks/check_sql.rb +3 -2
  57. data/lib/brakeman/checks/check_unsafe_reflection.rb +7 -2
  58. data/lib/brakeman/processors/alias_processor.rb +41 -2
  59. data/lib/brakeman/report/ignore/interactive.rb +2 -2
  60. data/lib/brakeman/version.rb +1 -1
  61. data/lib/brakeman/warning_codes.rb +2 -0
  62. metadata +54 -52
  63. data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/version.rb +0 -4
  64. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby20_parser.rb +0 -7128
  65. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby21_parser.rb +0 -7182
  66. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby22_parser.rb +0 -7228
  67. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby23_parser.rb +0 -7237
  68. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby24_parser.rb +0 -7268
  69. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.rb +0 -7268
  70. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.rb +0 -7287
  71. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.rb +0 -8517
  72. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.rb +0 -8751
@@ -680,8 +680,7 @@ rule
680
680
 
681
681
  cpath: tCOLON3 cname
682
682
  {
683
- _, (name, line) = val
684
- result = s(:colon3, name.to_sym).line line
683
+ result = wrap :colon3, val[1]
685
684
  }
686
685
  | cname
687
686
  {
@@ -706,9 +705,7 @@ rule
706
705
 
707
706
  fitem: fname
708
707
  {
709
- (id, line), = val
710
-
711
- result = s(:lit, id.to_sym).line line
708
+ result = wrap :lit, val[0]
712
709
  }
713
710
  | symbol
714
711
 
@@ -777,9 +774,9 @@ rule
777
774
  }
778
775
  | tCOLON3 tCONSTANT tOP_ASGN arg_rhs
779
776
  {
780
- _, (lhs, line), op, rhs = val
777
+ _, lhs, op, rhs = val
781
778
 
782
- lhs = s(:colon3, lhs.to_sym).line line
779
+ lhs = wrap :colon3, lhs
783
780
  result = new_const_op_asgn [lhs, op, rhs]
784
781
  }
785
782
  | backref tOP_ASGN arg_rhs
@@ -1181,9 +1178,7 @@ rule
1181
1178
  }
1182
1179
  | tCOLON3 tCONSTANT
1183
1180
  {
1184
- _, (id, line) = val
1185
-
1186
- result = s(:colon3, id.to_sym).line line
1181
+ result = wrap :colon3, val[1]
1187
1182
  }
1188
1183
  | tLBRACK { result = lexer.lineno } aref_args tRBRACK
1189
1184
  {
@@ -1677,8 +1672,7 @@ opt_block_args_tail: tCOMMA block_args_tail
1677
1672
 
1678
1673
  bvar: tIDENTIFIER
1679
1674
  {
1680
- (id, line), = val
1681
- result = s(:shadow, id.to_sym).line line
1675
+ result = wrap :shadow, val[0]
1682
1676
  }
1683
1677
  | f_bad_arg
1684
1678
 
@@ -2193,18 +2187,15 @@ regexp_contents: none
2193
2187
 
2194
2188
  string_dvar: tGVAR
2195
2189
  {
2196
- (id, line), = val
2197
- result = s(:gvar, id.to_sym).line line
2190
+ result = wrap :gvar, val[0]
2198
2191
  }
2199
2192
  | tIVAR
2200
2193
  {
2201
- (id, line), = val
2202
- result = s(:ivar, id.to_sym).line line
2194
+ result = wrap :ivar, val[0]
2203
2195
  }
2204
2196
  | tCVAR
2205
2197
  {
2206
- (id, line), = val
2207
- result = s(:cvar, id.to_sym).line line
2198
+ result = wrap :cvar, val[0]
2208
2199
  }
2209
2200
  | backref
2210
2201
 
@@ -2213,17 +2204,13 @@ regexp_contents: none
2213
2204
 
2214
2205
  ssym: tSYMBEG sym
2215
2206
  {
2216
- _, (id, line) = val
2217
-
2218
2207
  lexer.lex_state = EXPR_END
2219
- result = s(:lit, id.to_sym).line line
2208
+ result = wrap :lit, val[1]
2220
2209
  }
2221
2210
  | tSYMBOL
2222
2211
  {
2223
- (id, line), = val
2224
-
2225
2212
  lexer.lex_state = EXPR_END
2226
- result = s(:lit, id.to_sym).line line
2213
+ result = wrap :lit, val[0]
2227
2214
  }
2228
2215
 
2229
2216
  sym: fname | tIVAR | tGVAR | tCVAR
@@ -2667,10 +2654,10 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
2667
2654
  }
2668
2655
  | tLABEL arg_value
2669
2656
  {
2670
- (label, line), arg = val
2657
+ label, arg = val
2671
2658
 
2672
- lit = s(:lit, label.to_sym).line line
2673
- result = s(:array, lit, arg).line line
2659
+ lit = wrap :lit, label
2660
+ result = s(:array, lit, arg).line lit.line
2674
2661
  }
2675
2662
  | tSTRING_BEG string_contents tLABEL_END arg_value
2676
2663
  {