brakeman 5.2.0 → 5.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +17 -0
- data/bundle/load.rb +3 -3
- data/bundle/ruby/2.7.0/gems/{parallel-1.21.0 → parallel-1.22.1}/MIT-LICENSE.txt +0 -0
- data/bundle/ruby/2.7.0/gems/{parallel-1.21.0 → parallel-1.22.1}/lib/parallel/processor_count.rb +2 -3
- data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +4 -0
- data/bundle/ruby/2.7.0/gems/{parallel-1.21.0 → parallel-1.22.1}/lib/parallel.rb +84 -4
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/History.rdoc +28 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/Manifest.txt +2 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/README.rdoc +8 -6
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/compare/normalize.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/debugging.md +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/gauntlet.md +19 -18
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/rp_extensions.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/rp_stringscanner.rb +0 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.rb +10973 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby20_parser.y +14 -27
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.rb +10980 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby21_parser.y +14 -27
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.rb +11123 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby22_parser.y +14 -27
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.rb +11132 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby23_parser.y +14 -27
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.rb +11231 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby24_parser.y +14 -27
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.rb +11231 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby25_parser.y +14 -27
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.rb +11253 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby26_parser.y +14 -27
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.rb +12980 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby27_parser.y +19 -41
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.rb +13242 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby30_parser.y +65 -90
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.rb +13622 -0
- 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
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy +3536 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_lexer.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_lexer.rex +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_lexer.rex.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_lexer_strings.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_parser.rb +2 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_parser.yy +19 -41
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/lib/ruby_parser_extras.rb +55 -2
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/tools/munge.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.18.1 → ruby_parser-3.19.1}/tools/ripper.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/History.rdoc +6 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/Manifest.txt +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/README.rdoc +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/pt_testcase.rb +7 -3
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/sexp.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/sexp_matcher.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/strict_sexp.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.16.0 → sexp_processor-4.16.1}/lib/unique.rb +0 -0
- data/lib/brakeman/checks/check_sql.rb +3 -2
- data/lib/brakeman/checks/check_unsafe_reflection.rb +7 -2
- data/lib/brakeman/processors/alias_processor.rb +41 -2
- data/lib/brakeman/report/ignore/interactive.rb +2 -2
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning_codes.rb +2 -0
- metadata +54 -52
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/version.rb +0 -4
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby20_parser.rb +0 -7128
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby21_parser.rb +0 -7182
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby22_parser.rb +0 -7228
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby23_parser.rb +0 -7237
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby24_parser.rb +0 -7268
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.rb +0 -7268
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.rb +0 -7287
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.rb +0 -8517
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.rb +0 -8751
@@ -721,8 +721,7 @@ rule
|
|
721
721
|
|
722
722
|
cpath: tCOLON3 cname
|
723
723
|
{
|
724
|
-
|
725
|
-
result = s(:colon3, name.to_sym).line line
|
724
|
+
result = wrap :colon3, val[1]
|
726
725
|
}
|
727
726
|
| cname
|
728
727
|
{
|
@@ -747,9 +746,7 @@ rule
|
|
747
746
|
|
748
747
|
fitem: fname
|
749
748
|
{
|
750
|
-
|
751
|
-
|
752
|
-
result = s(:lit, id.to_sym).line line
|
749
|
+
result = wrap :lit, val[0]
|
753
750
|
}
|
754
751
|
| symbol
|
755
752
|
|
@@ -818,9 +815,9 @@ rule
|
|
818
815
|
}
|
819
816
|
| tCOLON3 tCONSTANT tOP_ASGN arg_rhs
|
820
817
|
{
|
821
|
-
_,
|
818
|
+
_, lhs, op, rhs = val
|
822
819
|
|
823
|
-
lhs =
|
820
|
+
lhs = wrap :colon3, lhs
|
824
821
|
result = new_const_op_asgn [lhs, op, rhs]
|
825
822
|
}
|
826
823
|
| backref tOP_ASGN arg_rhs
|
@@ -1268,9 +1265,7 @@ rule
|
|
1268
1265
|
}
|
1269
1266
|
| tCOLON3 tCONSTANT
|
1270
1267
|
{
|
1271
|
-
|
1272
|
-
|
1273
|
-
result = s(:colon3, id.to_sym).line line
|
1268
|
+
result = wrap :colon3, val[1]
|
1274
1269
|
}
|
1275
1270
|
| tLBRACK { result = lexer.lineno } aref_args tRBRACK
|
1276
1271
|
{
|
@@ -1774,8 +1769,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1774
1769
|
|
1775
1770
|
bvar: tIDENTIFIER
|
1776
1771
|
{
|
1777
|
-
|
1778
|
-
result = s(:shadow, id.to_sym).line line
|
1772
|
+
result = wrap :shadow, val[0]
|
1779
1773
|
}
|
1780
1774
|
| f_bad_arg
|
1781
1775
|
|
@@ -2381,9 +2375,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2381
2375
|
|
2382
2376
|
p_kw_label: tLABEL
|
2383
2377
|
{
|
2384
|
-
|
2385
|
-
|
2386
|
-
result = s(:lit, id.to_sym).line line
|
2378
|
+
result = wrap :lit, val[0]
|
2387
2379
|
}
|
2388
2380
|
|
2389
2381
|
p_kwrest: kwrest_mark tIDENTIFIER
|
@@ -2475,26 +2467,20 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2475
2467
|
|
2476
2468
|
p_variable: tIDENTIFIER
|
2477
2469
|
{
|
2478
|
-
(id, line), = val
|
2479
|
-
|
2480
2470
|
# TODO: error_duplicate_pattern_variable(p, $1, &@1);
|
2481
2471
|
# TODO: assignable(p, $1, 0, &@$);
|
2482
|
-
result =
|
2472
|
+
result = wrap :lvar, val[0]
|
2483
2473
|
}
|
2484
2474
|
|
2485
2475
|
p_var_ref: tCARET tIDENTIFIER
|
2486
2476
|
{
|
2487
|
-
_, (id, line) = val
|
2488
|
-
|
2489
2477
|
# TODO: check id against env for lvar or dvar
|
2490
|
-
|
2491
|
-
result = s(:lvar, id.to_sym).line line
|
2478
|
+
result = wrap :lvar, val[1]
|
2492
2479
|
}
|
2493
2480
|
|
2494
2481
|
p_const: tCOLON3 cname
|
2495
2482
|
{
|
2496
|
-
|
2497
|
-
result = s(:colon3, id.to_sym).line line
|
2483
|
+
result = wrap :colon3, val[1]
|
2498
2484
|
}
|
2499
2485
|
| p_const tCOLON2 cname
|
2500
2486
|
{
|
@@ -2506,8 +2492,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2506
2492
|
| tCONSTANT
|
2507
2493
|
{
|
2508
2494
|
# TODO $$ = gettable(p, $1, &@$);
|
2509
|
-
|
2510
|
-
result = s(:const, id.to_sym).line line
|
2495
|
+
result = wrap :const, val[0]
|
2511
2496
|
}
|
2512
2497
|
######################################################################
|
2513
2498
|
|
@@ -2793,18 +2778,15 @@ regexp_contents: none
|
|
2793
2778
|
|
2794
2779
|
string_dvar: tGVAR
|
2795
2780
|
{
|
2796
|
-
|
2797
|
-
result = s(:gvar, id.to_sym).line line
|
2781
|
+
result = wrap :gvar, val[0]
|
2798
2782
|
}
|
2799
2783
|
| tIVAR
|
2800
2784
|
{
|
2801
|
-
|
2802
|
-
result = s(:ivar, id.to_sym).line line
|
2785
|
+
result = wrap :ivar, val[0]
|
2803
2786
|
}
|
2804
2787
|
| tCVAR
|
2805
2788
|
{
|
2806
|
-
|
2807
|
-
result = s(:cvar, id.to_sym).line line
|
2789
|
+
result = wrap :cvar, val[0]
|
2808
2790
|
}
|
2809
2791
|
| backref
|
2810
2792
|
|
@@ -2813,17 +2795,13 @@ regexp_contents: none
|
|
2813
2795
|
|
2814
2796
|
ssym: tSYMBEG sym
|
2815
2797
|
{
|
2816
|
-
_, (id, line) = val
|
2817
|
-
|
2818
2798
|
lexer.lex_state = EXPR_END
|
2819
|
-
result =
|
2799
|
+
result = wrap :lit, val[1]
|
2820
2800
|
}
|
2821
2801
|
| tSYMBOL
|
2822
2802
|
{
|
2823
|
-
(id, line), = val
|
2824
|
-
|
2825
2803
|
lexer.lex_state = EXPR_END
|
2826
|
-
result =
|
2804
|
+
result = wrap :lit, val[0]
|
2827
2805
|
}
|
2828
2806
|
|
2829
2807
|
sym: fname | tIVAR | tGVAR | tCVAR
|
@@ -3287,10 +3265,10 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
3287
3265
|
}
|
3288
3266
|
| tLABEL arg_value
|
3289
3267
|
{
|
3290
|
-
|
3268
|
+
label, arg = val
|
3291
3269
|
|
3292
|
-
lit =
|
3293
|
-
result = s(:array, lit, arg).line line
|
3270
|
+
lit = wrap :lit, label
|
3271
|
+
result = s(:array, lit, arg).line lit.line
|
3294
3272
|
}
|
3295
3273
|
| tSTRING_BEG string_contents tLABEL_END arg_value
|
3296
3274
|
{
|