brakeman 5.0.1 → 5.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +10 -0
  3. data/bundle/load.rb +2 -2
  4. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/History.rdoc +19 -0
  5. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/Manifest.txt +2 -0
  6. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/README.rdoc +0 -0
  7. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/compare/normalize.rb +2 -2
  8. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/debugging.md +0 -0
  9. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/rp_extensions.rb +0 -0
  10. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/rp_stringscanner.rb +0 -0
  11. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby20_parser.rb +0 -0
  12. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby20_parser.y +0 -0
  13. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby21_parser.rb +0 -0
  14. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby21_parser.y +0 -0
  15. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby22_parser.rb +0 -0
  16. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby22_parser.y +0 -0
  17. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby23_parser.rb +0 -0
  18. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby23_parser.y +0 -0
  19. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby24_parser.rb +0 -0
  20. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby24_parser.y +0 -0
  21. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby25_parser.rb +0 -0
  22. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby25_parser.y +0 -0
  23. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby26_parser.rb +0 -0
  24. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby26_parser.y +0 -0
  25. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby27_parser.rb +0 -0
  26. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby27_parser.y +0 -0
  27. data/bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby30_parser.rb +7358 -0
  28. data/bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby30_parser.y +2703 -0
  29. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby_lexer.rb +0 -0
  30. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby_lexer.rex +0 -0
  31. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby_lexer.rex.rb +0 -0
  32. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby_parser.rb +2 -0
  33. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby_parser.yy +2 -0
  34. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/lib/ruby_parser_extras.rb +2 -2
  35. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/tools/munge.rb +0 -0
  36. data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.1 → ruby_parser-3.16.0}/tools/ripper.rb +0 -0
  37. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/History.rdoc +6 -0
  38. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/Manifest.txt +0 -0
  39. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/README.rdoc +0 -0
  40. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/lib/composite_sexp_processor.rb +0 -0
  41. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/lib/pt_testcase.rb +2 -2
  42. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/lib/sexp.rb +0 -0
  43. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/lib/sexp_matcher.rb +0 -0
  44. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/lib/sexp_processor.rb +1 -1
  45. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/lib/strict_sexp.rb +0 -0
  46. data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.2 → sexp_processor-4.15.3}/lib/unique.rb +0 -0
  47. data/lib/brakeman/checks/check_sanitize_methods.rb +2 -1
  48. data/lib/brakeman/version.rb +1 -1
  49. metadata +45 -43
@@ -79,10 +79,12 @@ require "ruby24_parser"
79
79
  require "ruby25_parser"
80
80
  require "ruby26_parser"
81
81
  require "ruby27_parser"
82
+ require "ruby30_parser"
82
83
 
83
84
  class RubyParser # HACK
84
85
  VERSIONS.clear # also a HACK caused by racc namespace issues
85
86
 
87
+ class V30 < ::Ruby30Parser; end
86
88
  class V27 < ::Ruby27Parser; end
87
89
  class V26 < ::Ruby26Parser; end
88
90
  class V25 < ::Ruby25Parser; end
@@ -16,6 +16,8 @@ class Ruby25Parser
16
16
  class Ruby26Parser
17
17
  #elif V == 27
18
18
  class Ruby27Parser
19
+ #elif V == 30
20
+ class Ruby30Parser
19
21
  #else
20
22
  fail "version not specified or supported on code generation"
21
23
  #endif
@@ -29,7 +29,7 @@ class Sexp
29
29
  end
30
30
 
31
31
  module RubyParserStuff
32
- VERSION = "3.15.1"
32
+ VERSION = "3.16.0"
33
33
 
34
34
  attr_accessor :lexer, :in_def, :in_single, :file
35
35
  attr_accessor :in_kwarg
@@ -115,7 +115,7 @@ module RubyParserStuff
115
115
  def initialize(options = {})
116
116
  super()
117
117
 
118
- v = self.class.name[/2\d/]
118
+ v = self.class.name[/[23]\d/]
119
119
  raise "Bad Class name #{self.class}" unless v
120
120
 
121
121
  self.lexer = RubyLexer.new v && v.to_i
@@ -1,3 +1,9 @@
1
+ === 4.15.3 / 2021-05-15
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Added 3.0 to pt_testcase.rb
6
+
1
7
  === 4.15.2 / 2021-01-10
2
8
 
3
9
  * 1 bug fix:
@@ -77,7 +77,7 @@ class ParseTreeTestCase < Minitest::Test
77
77
  end
78
78
 
79
79
  def self.add_19tests name, hash
80
- add_tests "#{name}__19_20_21_22_23_24_25_26_27", hash # HACK?
80
+ add_tests "#{name}__19_20_21_22_23_24_25_26_27_30", hash # HACK?
81
81
  end
82
82
 
83
83
  def self.add_19edgecases ruby, sexp, cases
@@ -102,7 +102,7 @@ class ParseTreeTestCase < Minitest::Test
102
102
  testcases[verbose][klass] = testcases[nonverbose][klass]
103
103
  end
104
104
 
105
- VER_RE = "(1[89]|2[01234567])"
105
+ VER_RE = "(1[89]|2[01234567]|3[0])"
106
106
 
107
107
  def self.generate_test klass, node, data, input_name, output_name
108
108
  klass.send :define_method, "test_#{node}" do
@@ -34,7 +34,7 @@ require "sexp"
34
34
  class SexpProcessor
35
35
 
36
36
  # duh
37
- VERSION = "4.15.2"
37
+ VERSION = "4.15.3"
38
38
 
39
39
  ##
40
40
  # Automatically shifts off the Sexp type before handing the
@@ -90,7 +90,8 @@ class Brakeman::CheckSanitizeMethods < Brakeman::BaseCheck
90
90
  def loofah_vulnerable_cve_2018_8048?
91
91
  loofah_version = tracker.config.gem_version(:loofah)
92
92
 
93
- loofah_version and loofah_version < "2.2.1"
93
+ # 2.2.1 is fix version
94
+ loofah_version and version_between?("0.0.0", "2.2.0", loofah_version)
94
95
  end
95
96
 
96
97
  def warn_sanitizer_cve cve, link, upgrade_version
@@ -1,3 +1,3 @@
1
1
  module Brakeman
2
- Version = "5.0.1"
2
+ Version = "5.0.4"
3
3
  end
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: 5.0.1
4
+ version: 5.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Collins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-28 00:00:00.000000000 Z
11
+ date: 2021-06-08 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.
@@ -189,37 +189,39 @@ files:
189
189
  - bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/Manifest.txt
190
190
  - bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/README.rdoc
191
191
  - bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb
192
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/History.rdoc
193
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/Manifest.txt
194
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/README.rdoc
195
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/compare/normalize.rb
196
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/debugging.md
197
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/rp_extensions.rb
198
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/rp_stringscanner.rb
199
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby20_parser.rb
200
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby20_parser.y
201
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby21_parser.rb
202
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby21_parser.y
203
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby22_parser.rb
204
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby22_parser.y
205
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby23_parser.rb
206
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby23_parser.y
207
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby24_parser.rb
208
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby24_parser.y
209
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby25_parser.rb
210
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby25_parser.y
211
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby26_parser.rb
212
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby26_parser.y
213
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby27_parser.rb
214
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby27_parser.y
215
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_lexer.rb
216
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_lexer.rex
217
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_lexer.rex.rb
218
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_parser.rb
219
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_parser.yy
220
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_parser_extras.rb
221
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/tools/munge.rb
222
- - bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/tools/ripper.rb
192
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/History.rdoc
193
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/Manifest.txt
194
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/README.rdoc
195
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/compare/normalize.rb
196
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/debugging.md
197
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/rp_extensions.rb
198
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/rp_stringscanner.rb
199
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby20_parser.rb
200
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby20_parser.y
201
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby21_parser.rb
202
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby21_parser.y
203
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby22_parser.rb
204
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby22_parser.y
205
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby23_parser.rb
206
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby23_parser.y
207
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby24_parser.rb
208
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby24_parser.y
209
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby25_parser.rb
210
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby25_parser.y
211
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby26_parser.rb
212
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby26_parser.y
213
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby27_parser.rb
214
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby27_parser.y
215
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby30_parser.rb
216
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby30_parser.y
217
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_lexer.rb
218
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_lexer.rex
219
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_lexer.rex.rb
220
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_parser.rb
221
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_parser.yy
222
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/lib/ruby_parser_extras.rb
223
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/tools/munge.rb
224
+ - bundle/ruby/2.7.0/gems/ruby_parser-3.16.0/tools/ripper.rb
223
225
  - bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc
224
226
  - bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt
225
227
  - bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc
@@ -264,16 +266,16 @@ files:
264
266
  - bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb
265
267
  - bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh
266
268
  - bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec
267
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/History.rdoc
268
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/Manifest.txt
269
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/README.rdoc
270
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/composite_sexp_processor.rb
271
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/pt_testcase.rb
272
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/sexp.rb
273
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/sexp_matcher.rb
274
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/sexp_processor.rb
275
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/strict_sexp.rb
276
- - bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/unique.rb
269
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/History.rdoc
270
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/Manifest.txt
271
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/README.rdoc
272
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/composite_sexp_processor.rb
273
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/pt_testcase.rb
274
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/sexp.rb
275
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/sexp_matcher.rb
276
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/sexp_processor.rb
277
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/strict_sexp.rb
278
+ - bundle/ruby/2.7.0/gems/sexp_processor-4.15.3/lib/unique.rb
277
279
  - bundle/ruby/2.7.0/gems/slim-4.1.0/CHANGES
278
280
  - bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile
279
281
  - bundle/ruby/2.7.0/gems/slim-4.1.0/LICENSE