brakeman 4.10.1 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +25 -0
- data/README.md +1 -1
- data/bundle/load.rb +2 -2
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/History.rdoc +6 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/Manifest.txt +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/README.rdoc +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/compare/normalize.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/debugging.md +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/rp_extensions.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/rp_stringscanner.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby20_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby20_parser.y +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby21_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby21_parser.y +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby22_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby22_parser.y +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby23_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby23_parser.y +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby24_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby24_parser.y +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby25_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby25_parser.y +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby26_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby26_parser.y +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby27_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby27_parser.y +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby_lexer.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby_lexer.rex +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby_lexer.rex.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby_parser.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby_parser.yy +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/lib/ruby_parser_extras.rb +1 -1
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/tools/munge.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{ruby_parser-3.15.0 → ruby_parser-3.15.1}/tools/ripper.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/History.rdoc +6 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/Manifest.txt +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/README.rdoc +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/lib/pt_testcase.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/lib/sexp.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/lib/sexp_matcher.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/lib/strict_sexp.rb +0 -0
- data/bundle/ruby/2.7.0/gems/{sexp_processor-4.15.1 → sexp_processor-4.15.2}/lib/unique.rb +0 -0
- data/lib/brakeman.rb +6 -0
- data/lib/brakeman/app_tree.rb +36 -3
- data/lib/brakeman/checks/base_check.rb +7 -1
- data/lib/brakeman/checks/check_execute.rb +1 -0
- data/lib/brakeman/checks/check_sql.rb +1 -1
- data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +68 -0
- data/lib/brakeman/checks/check_verb_confusion.rb +75 -0
- data/lib/brakeman/file_parser.rb +19 -18
- data/lib/brakeman/options.rb +5 -1
- data/lib/brakeman/parsers/template_parser.rb +2 -3
- data/lib/brakeman/processors/alias_processor.rb +18 -2
- data/lib/brakeman/processors/lib/file_type_detector.rb +64 -0
- data/lib/brakeman/processors/lib/rails3_config_processor.rb +16 -16
- data/lib/brakeman/report.rb +8 -0
- data/lib/brakeman/report/report_base.rb +0 -2
- data/lib/brakeman/report/report_csv.rb +37 -60
- data/lib/brakeman/report/report_junit.rb +2 -2
- data/lib/brakeman/report/report_sarif.rb +1 -1
- data/lib/brakeman/report/report_sonar.rb +38 -0
- data/lib/brakeman/report/report_tabs.rb +1 -1
- data/lib/brakeman/report/report_text.rb +1 -1
- data/lib/brakeman/rescanner.rb +7 -5
- data/lib/brakeman/scanner.rb +44 -18
- data/lib/brakeman/tracker.rb +6 -0
- data/lib/brakeman/tracker/config.rb +73 -0
- data/lib/brakeman/util.rb +7 -2
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning.rb +10 -2
- data/lib/brakeman/warning_codes.rb +2 -0
- metadata +48 -44
@@ -0,0 +1,38 @@
|
|
1
|
+
class Brakeman::Report::Sonar < Brakeman::Report::Base
|
2
|
+
def generate_report
|
3
|
+
report_object = {
|
4
|
+
issues: all_warnings.map { |warning| issue_json(warning) }
|
5
|
+
}
|
6
|
+
return JSON.pretty_generate report_object
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def issue_json(warning)
|
12
|
+
{
|
13
|
+
engineId: "Brakeman",
|
14
|
+
ruleId: warning.warning_code,
|
15
|
+
type: "VULNERABILITY",
|
16
|
+
severity: severity_level_for(warning.confidence),
|
17
|
+
primaryLocation: {
|
18
|
+
message: warning.message,
|
19
|
+
filePath: warning.file.relative,
|
20
|
+
textRange: {
|
21
|
+
"startLine": warning.line || 1,
|
22
|
+
"endLine": warning.line || 1,
|
23
|
+
}
|
24
|
+
},
|
25
|
+
effortMinutes: (4 - warning.confidence) * 15
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
def severity_level_for(confidence)
|
30
|
+
if confidence == 0
|
31
|
+
"CRITICAL"
|
32
|
+
elsif confidence == 1
|
33
|
+
"MAJOR"
|
34
|
+
else
|
35
|
+
"MINOR"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -10,7 +10,7 @@ class Brakeman::Report::Tabs < Brakeman::Report::Table
|
|
10
10
|
self.send(meth).map do |w|
|
11
11
|
line = w.line || 0
|
12
12
|
w.warning_type.gsub!(/[^\w\s]/, ' ')
|
13
|
-
"#{(w.file.absolute)}\t#{line}\t#{w.warning_type}\t#{category}\t#{w.format_message}\t#{
|
13
|
+
"#{(w.file.absolute)}\t#{line}\t#{w.warning_type}\t#{category}\t#{w.format_message}\t#{w.confidence_name}"
|
14
14
|
end.join "\n"
|
15
15
|
|
16
16
|
end.join "\n"
|
@@ -160,7 +160,7 @@ class Brakeman::Report::Text < Brakeman::Report::Base
|
|
160
160
|
when :category
|
161
161
|
label('Category', w.warning_type.to_s)
|
162
162
|
when :check
|
163
|
-
label('Check', w.
|
163
|
+
label('Check', w.check_name)
|
164
164
|
when :message
|
165
165
|
label('Message', w.message)
|
166
166
|
when :code
|
data/lib/brakeman/rescanner.rb
CHANGED
@@ -132,10 +132,11 @@ class Brakeman::Rescanner < Brakeman::Scanner
|
|
132
132
|
template_name = template_path_to_name(path)
|
133
133
|
|
134
134
|
tracker.reset_template template_name
|
135
|
-
fp = Brakeman::FileParser.new(tracker)
|
135
|
+
fp = Brakeman::FileParser.new(tracker.app_tree, tracker.options[:parser_timeout])
|
136
136
|
template_parser = Brakeman::TemplateParser.new(tracker, fp)
|
137
137
|
template_parser.parse_template path, path.read
|
138
|
-
|
138
|
+
tracker.add_errors(fp.errors)
|
139
|
+
process_template fp.file_list.first
|
139
140
|
|
140
141
|
@processor.process_template_alias tracker.templates[template_name]
|
141
142
|
|
@@ -390,9 +391,10 @@ class Brakeman::Rescanner < Brakeman::Scanner
|
|
390
391
|
|
391
392
|
def parse_ruby_files list
|
392
393
|
paths = list.select(&:exists?)
|
393
|
-
file_parser = Brakeman::FileParser.new(tracker)
|
394
|
-
file_parser.parse_files paths
|
395
|
-
file_parser.
|
394
|
+
file_parser = Brakeman::FileParser.new(tracker.app_tree, tracker.options[:parser_timeout])
|
395
|
+
file_parser.parse_files paths
|
396
|
+
tracker.add_errors(file_parser.errors)
|
397
|
+
file_parser.file_list
|
396
398
|
end
|
397
399
|
end
|
398
400
|
|
data/lib/brakeman/scanner.rb
CHANGED
@@ -7,6 +7,7 @@ begin
|
|
7
7
|
require 'brakeman/app_tree'
|
8
8
|
require 'brakeman/file_parser'
|
9
9
|
require 'brakeman/parsers/template_parser'
|
10
|
+
require 'brakeman/processors/lib/file_type_detector'
|
10
11
|
rescue LoadError => e
|
11
12
|
$stderr.puts e.message
|
12
13
|
$stderr.puts "Please install the appropriate dependency."
|
@@ -23,7 +24,10 @@ class Brakeman::Scanner
|
|
23
24
|
@app_tree = Brakeman::AppTree.from_options(options)
|
24
25
|
|
25
26
|
if (!@app_tree.root || !@app_tree.exists?("app")) && !options[:force_scan]
|
26
|
-
|
27
|
+
message = "Please supply the path to a Rails application (looking in #{@app_tree.root}).\n" <<
|
28
|
+
" Use `--force` to run a scan anyway."
|
29
|
+
|
30
|
+
raise Brakeman::NoApplication, message
|
27
31
|
end
|
28
32
|
|
29
33
|
@processor = processor || Brakeman::Processor.new(@app_tree, options)
|
@@ -43,6 +47,8 @@ class Brakeman::Scanner
|
|
43
47
|
process_config
|
44
48
|
Brakeman.notify "Parsing files..."
|
45
49
|
parse_files
|
50
|
+
Brakeman.notify "Detecting file types..."
|
51
|
+
detect_file_types
|
46
52
|
Brakeman.notify "Processing initializers..."
|
47
53
|
process_initializers
|
48
54
|
Brakeman.notify "Processing libs..."
|
@@ -65,29 +71,47 @@ class Brakeman::Scanner
|
|
65
71
|
end
|
66
72
|
|
67
73
|
def parse_files
|
68
|
-
fp = Brakeman::FileParser.new tracker
|
69
|
-
|
70
|
-
files = {
|
71
|
-
:initializers => @app_tree.initializer_paths,
|
72
|
-
:controllers => @app_tree.controller_paths,
|
73
|
-
:models => @app_tree.model_paths
|
74
|
-
}
|
75
|
-
|
76
|
-
unless options[:skip_libs]
|
77
|
-
files[:libs] = @app_tree.lib_paths
|
78
|
-
end
|
74
|
+
fp = Brakeman::FileParser.new(tracker.app_tree, tracker.options[:parser_timeout])
|
79
75
|
|
80
|
-
|
81
|
-
fp.parse_files paths, name
|
82
|
-
end
|
76
|
+
fp.parse_files tracker.app_tree.ruby_file_paths
|
83
77
|
|
84
78
|
template_parser = Brakeman::TemplateParser.new(tracker, fp)
|
85
79
|
|
86
|
-
fp.read_files(@app_tree.template_paths
|
80
|
+
fp.read_files(@app_tree.template_paths) do |path, contents|
|
87
81
|
template_parser.parse_template path, contents
|
88
82
|
end
|
89
83
|
|
90
|
-
|
84
|
+
# Collect errors raised during parsing
|
85
|
+
tracker.add_errors(fp.errors)
|
86
|
+
|
87
|
+
@parsed_files = fp.file_list
|
88
|
+
end
|
89
|
+
|
90
|
+
def detect_file_types
|
91
|
+
@file_list = {
|
92
|
+
controllers: [],
|
93
|
+
initializers: [],
|
94
|
+
libs: [],
|
95
|
+
models: [],
|
96
|
+
templates: [],
|
97
|
+
}
|
98
|
+
|
99
|
+
detector = Brakeman::FileTypeDetector.new
|
100
|
+
|
101
|
+
@parsed_files.each do |file|
|
102
|
+
if file.is_a? Brakeman::TemplateParser::TemplateFile
|
103
|
+
@file_list[:templates] << file
|
104
|
+
else
|
105
|
+
type = detector.detect_type(file)
|
106
|
+
unless type == :skip
|
107
|
+
if @file_list[type].nil?
|
108
|
+
raise type.to_s
|
109
|
+
else
|
110
|
+
@file_list[type] << file
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
91
115
|
end
|
92
116
|
|
93
117
|
#Process config/environment.rb and config/gems.rb
|
@@ -115,6 +139,8 @@ class Brakeman::Scanner
|
|
115
139
|
if @app_tree.exists? ".ruby-version"
|
116
140
|
tracker.config.set_ruby_version @app_tree.file_path(".ruby-version").read
|
117
141
|
end
|
142
|
+
|
143
|
+
tracker.config.load_rails_defaults
|
118
144
|
end
|
119
145
|
|
120
146
|
def process_config_file file
|
@@ -325,7 +351,7 @@ class Brakeman::Scanner
|
|
325
351
|
end
|
326
352
|
|
327
353
|
def parse_ruby_file file
|
328
|
-
fp = Brakeman::FileParser.new(
|
354
|
+
fp = Brakeman::FileParser.new(tracker.app_tree, tracker.options[:parser_timeout])
|
329
355
|
fp.parse_ruby(file.read, file)
|
330
356
|
end
|
331
357
|
end
|
data/lib/brakeman/tracker.rb
CHANGED
@@ -149,5 +149,78 @@ module Brakeman
|
|
149
149
|
def session_settings
|
150
150
|
@rails.dig(:action_controller, :session)
|
151
151
|
end
|
152
|
+
|
153
|
+
|
154
|
+
# Set Rails config option value
|
155
|
+
# where path is an array of attributes, e.g.
|
156
|
+
#
|
157
|
+
# :action_controller, :perform_caching
|
158
|
+
#
|
159
|
+
# then this will set
|
160
|
+
#
|
161
|
+
# rails[:action_controller][:perform_caching] = value
|
162
|
+
def set_rails_config value, *path
|
163
|
+
config = self.rails
|
164
|
+
|
165
|
+
path[0..-2].each do |o|
|
166
|
+
config[o] ||= {}
|
167
|
+
|
168
|
+
option = config[o]
|
169
|
+
|
170
|
+
if not option.is_a? Hash
|
171
|
+
Brakeman.debug "[Notice] Skipping config setting: #{path.map(&:to_s).join(".")}"
|
172
|
+
return
|
173
|
+
end
|
174
|
+
|
175
|
+
config = option
|
176
|
+
end
|
177
|
+
|
178
|
+
config[path.last] = value
|
179
|
+
end
|
180
|
+
|
181
|
+
# Load defaults based on config.load_defaults value
|
182
|
+
# as documented here: https://guides.rubyonrails.org/configuring.html#results-of-config-load-defaults
|
183
|
+
def load_rails_defaults
|
184
|
+
return unless number? tracker.config.rails[:load_defaults]
|
185
|
+
|
186
|
+
version = tracker.config.rails[:load_defaults].value
|
187
|
+
true_value = Sexp.new(:true)
|
188
|
+
false_value = Sexp.new(:false)
|
189
|
+
|
190
|
+
if version >= 5.0
|
191
|
+
set_rails_config(true_value, :action_controller, :per_form_csrf_tokens)
|
192
|
+
set_rails_config(true_value, :action_controller, :forgery_protection_origin_check)
|
193
|
+
set_rails_config(true_value, :active_record, :belongs_to_required_by_default)
|
194
|
+
# Note: this may need to be changed, because ssl_options is a Hash
|
195
|
+
set_rails_config(true_value, :ssl_options, :hsts, :subdomains)
|
196
|
+
end
|
197
|
+
|
198
|
+
if version >= 5.1
|
199
|
+
set_rails_config(false_value, :assets, :unknown_asset_fallback)
|
200
|
+
set_rails_config(true_value, :action_view, :form_with_generates_remote_forms)
|
201
|
+
end
|
202
|
+
|
203
|
+
if version >= 5.2
|
204
|
+
set_rails_config(true_value, :active_record, :cache_versioning)
|
205
|
+
set_rails_config(true_value, :action_dispatch, :use_authenticated_cookie_encryption)
|
206
|
+
set_rails_config(true_value, :active_support, :use_authenticated_message_encryption)
|
207
|
+
set_rails_config(true_value, :active_support, :use_sha1_digests)
|
208
|
+
set_rails_config(true_value, :action_controller, :default_protect_from_forgery)
|
209
|
+
set_rails_config(true_value, :action_view, :form_with_generates_ids)
|
210
|
+
end
|
211
|
+
|
212
|
+
if version >= 6.0
|
213
|
+
set_rails_config(Sexp.new(:lit, :zeitwerk), :autoloader)
|
214
|
+
set_rails_config(false_value, :action_view, :default_enforce_utf8)
|
215
|
+
set_rails_config(true_value, :action_dispatch, :use_cookies_with_metadata)
|
216
|
+
set_rails_config(false_value, :action_dispatch, :return_only_media_type_on_content_type)
|
217
|
+
set_rails_config(Sexp.new(:str, 'ActionMailer::MailDeliveryJob'), :action_mailer, :delivery_job)
|
218
|
+
set_rails_config(true_value, :active_job, :return_false_on_aborted_enqueue)
|
219
|
+
set_rails_config(Sexp.new(:lit, :active_storage_analysis), :active_storage, :queues, :analysis)
|
220
|
+
set_rails_config(Sexp.new(:lit, :active_storage_purge), :active_storage, :queues, :purge)
|
221
|
+
set_rails_config(true_value, :active_storage, :replace_on_assign_to_many)
|
222
|
+
set_rails_config(true_value, :active_record, :collection_cache_versioning)
|
223
|
+
end
|
224
|
+
end
|
152
225
|
end
|
153
226
|
end
|
data/lib/brakeman/util.rb
CHANGED
@@ -368,8 +368,13 @@ module Brakeman::Util
|
|
368
368
|
#
|
369
369
|
# views/test/something.html.erb -> test/something
|
370
370
|
def template_path_to_name path
|
371
|
-
names = path.relative.split(
|
371
|
+
names = path.relative.split('/')
|
372
372
|
names.last.gsub!(/(\.(html|js)\..*|\.(rhtml|haml|erb|slim))$/, '')
|
373
|
-
|
373
|
+
|
374
|
+
if names.include? 'views'
|
375
|
+
names[(names.index('views') + 1)..-1]
|
376
|
+
else
|
377
|
+
names
|
378
|
+
end.join('/').to_sym
|
374
379
|
end
|
375
380
|
end
|
data/lib/brakeman/version.rb
CHANGED
data/lib/brakeman/warning.rb
CHANGED
@@ -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.
|
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 =>
|
305
|
+
:confidence => self.confidence_name
|
298
306
|
}
|
299
307
|
end
|
300
308
|
|
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
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Collins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-27 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.
|
@@ -190,37 +190,37 @@ files:
|
|
190
190
|
- bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/Manifest.txt
|
191
191
|
- bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/README.rdoc
|
192
192
|
- bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb
|
193
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
194
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
195
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
196
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
197
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
198
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
199
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
200
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
201
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
202
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
203
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
204
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
205
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
206
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
207
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
208
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
209
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
210
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
211
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
212
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
213
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
214
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
215
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
216
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
217
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
218
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
219
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
220
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
221
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
222
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
223
|
-
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.
|
193
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/History.rdoc
|
194
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/Manifest.txt
|
195
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/README.rdoc
|
196
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/compare/normalize.rb
|
197
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/debugging.md
|
198
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/rp_extensions.rb
|
199
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/rp_stringscanner.rb
|
200
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby20_parser.rb
|
201
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby20_parser.y
|
202
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby21_parser.rb
|
203
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby21_parser.y
|
204
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby22_parser.rb
|
205
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby22_parser.y
|
206
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby23_parser.rb
|
207
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby23_parser.y
|
208
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby24_parser.rb
|
209
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby24_parser.y
|
210
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby25_parser.rb
|
211
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby25_parser.y
|
212
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby26_parser.rb
|
213
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby26_parser.y
|
214
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby27_parser.rb
|
215
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby27_parser.y
|
216
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_lexer.rb
|
217
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_lexer.rex
|
218
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_lexer.rex.rb
|
219
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_parser.rb
|
220
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_parser.yy
|
221
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/lib/ruby_parser_extras.rb
|
222
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/tools/munge.rb
|
223
|
+
- bundle/ruby/2.7.0/gems/ruby_parser-3.15.1/tools/ripper.rb
|
224
224
|
- bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc
|
225
225
|
- bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt
|
226
226
|
- bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc
|
@@ -265,16 +265,16 @@ files:
|
|
265
265
|
- bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb
|
266
266
|
- bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh
|
267
267
|
- bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec
|
268
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
269
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
270
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
271
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
272
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
273
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
274
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
275
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
276
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
277
|
-
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.
|
268
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/History.rdoc
|
269
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/Manifest.txt
|
270
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/README.rdoc
|
271
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/composite_sexp_processor.rb
|
272
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/pt_testcase.rb
|
273
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/sexp.rb
|
274
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/sexp_matcher.rb
|
275
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/sexp_processor.rb
|
276
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/strict_sexp.rb
|
277
|
+
- bundle/ruby/2.7.0/gems/sexp_processor-4.15.2/lib/unique.rb
|
278
278
|
- bundle/ruby/2.7.0/gems/slim-4.1.0/CHANGES
|
279
279
|
- bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile
|
280
280
|
- bundle/ruby/2.7.0/gems/slim-4.1.0/LICENSE
|
@@ -502,8 +502,10 @@ files:
|
|
502
502
|
- lib/brakeman/checks/check_template_injection.rb
|
503
503
|
- lib/brakeman/checks/check_translate_bug.rb
|
504
504
|
- lib/brakeman/checks/check_unsafe_reflection.rb
|
505
|
+
- lib/brakeman/checks/check_unsafe_reflection_methods.rb
|
505
506
|
- lib/brakeman/checks/check_unscoped_find.rb
|
506
507
|
- lib/brakeman/checks/check_validation_regex.rb
|
508
|
+
- lib/brakeman/checks/check_verb_confusion.rb
|
507
509
|
- lib/brakeman/checks/check_weak_hash.rb
|
508
510
|
- lib/brakeman/checks/check_without_protection.rb
|
509
511
|
- lib/brakeman/checks/check_xml_dos.rb
|
@@ -534,6 +536,7 @@ files:
|
|
534
536
|
- lib/brakeman/processors/haml_template_processor.rb
|
535
537
|
- lib/brakeman/processors/lib/basic_processor.rb
|
536
538
|
- lib/brakeman/processors/lib/call_conversion_helper.rb
|
539
|
+
- lib/brakeman/processors/lib/file_type_detector.rb
|
537
540
|
- lib/brakeman/processors/lib/find_all_calls.rb
|
538
541
|
- lib/brakeman/processors/lib/find_call.rb
|
539
542
|
- lib/brakeman/processors/lib/find_return_value.rb
|
@@ -570,6 +573,7 @@ files:
|
|
570
573
|
- lib/brakeman/report/report_junit.rb
|
571
574
|
- lib/brakeman/report/report_markdown.rb
|
572
575
|
- lib/brakeman/report/report_sarif.rb
|
576
|
+
- lib/brakeman/report/report_sonar.rb
|
573
577
|
- lib/brakeman/report/report_table.rb
|
574
578
|
- lib/brakeman/report/report_tabs.rb
|
575
579
|
- lib/brakeman/report/report_text.rb
|
@@ -619,7 +623,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
619
623
|
requirements:
|
620
624
|
- - ">="
|
621
625
|
- !ruby/object:Gem::Version
|
622
|
-
version: 2.
|
626
|
+
version: 2.4.0
|
623
627
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
624
628
|
requirements:
|
625
629
|
- - ">="
|