brakeman-min 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +16 -0
- data/lib/brakeman.rb +0 -2
- data/lib/brakeman/checks/check_cross_site_scripting.rb +13 -0
- data/lib/brakeman/checks/check_mass_assignment.rb +2 -0
- data/lib/brakeman/checks/check_regex_dos.rb +1 -1
- data/lib/brakeman/checks/check_simple_format.rb +0 -1
- data/lib/brakeman/checks/check_sql.rb +2 -2
- data/lib/brakeman/parsers/template_parser.rb +1 -1
- data/lib/brakeman/processors/alias_processor.rb +2 -2
- data/lib/brakeman/processors/controller_alias_processor.rb +3 -1
- data/lib/brakeman/processors/lib/render_path.rb +100 -0
- data/lib/brakeman/processors/model_processor.rb +2 -1
- data/lib/brakeman/processors/template_alias_processor.rb +4 -3
- data/lib/brakeman/report/report_html.rb +1 -1
- data/lib/brakeman/rescanner.rb +9 -20
- data/lib/brakeman/tracker.rb +2 -3
- data/lib/brakeman/util.rb +2 -0
- data/lib/brakeman/version.rb +1 -1
- metadata +171 -164
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c4d4aa1cf1d1341db5710c8848c08092f0595203
|
4
|
+
data.tar.gz: 41683fd6cffe08af21ca19e52eede92726c6d759
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7907403a8316daf699a8eb028ac5e4bf4fd72268c1af1b5d22421eeed067bb002e63476144658af0c722d0781a37ce69f7e021e22d72246dab45efb24d8e1400
|
7
|
+
data.tar.gz: 8021326560d002192ca6ae8712c77b45745c97fb0f35c26deb77573256657a8243bf91f3b50c9fc99d54aa6520dcb2a443a33fcebb48ffc8f22656dfaf9ad748
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
# 3.0.2
|
2
|
+
|
3
|
+
* Alias process methods called in class scope on models
|
4
|
+
* Treat primary_key, table_name_prefix, table_name_suffix as safe in SQL
|
5
|
+
* Fix using --compare and --add-checks-path together
|
6
|
+
* Avoid warning about mass assignment with string literals
|
7
|
+
* Only report original regex DoS locations
|
8
|
+
* Improve render path information implementation
|
9
|
+
* Report correct file for simple_format usage CVE warning
|
10
|
+
* Remove URI.escape from HTML reports with GitHub repos
|
11
|
+
* Update ruby_parser to ~> 3.6.2
|
12
|
+
* Remove formatting newlines in HAML template output
|
13
|
+
* Ignore case value in XSS checks
|
14
|
+
* Fix CSV output when there are no warnings
|
15
|
+
* Handle processing of explictly shadowed block arguments
|
16
|
+
|
1
17
|
# 3.0.1
|
2
18
|
|
3
19
|
* Avoid protect_from_forgery warning unless ApplicationController inherits from ActionController::Base
|
data/lib/brakeman.rb
CHANGED
@@ -399,8 +399,6 @@ module Brakeman
|
|
399
399
|
require 'brakeman/differ'
|
400
400
|
raise ArgumentError.new("Comparison file doesn't exist") unless File.exists? options[:previous_results_json]
|
401
401
|
|
402
|
-
add_external_checks options
|
403
|
-
|
404
402
|
begin
|
405
403
|
previous_results = MultiJson.load(File.read(options[:previous_results_json]), :symbolize_keys => true)[:warnings]
|
406
404
|
rescue MultiJson::DecodeError
|
@@ -260,6 +260,19 @@ class Brakeman::CheckCrossSiteScripting < Brakeman::BaseCheck
|
|
260
260
|
exp
|
261
261
|
end
|
262
262
|
|
263
|
+
def process_case exp
|
264
|
+
#Ignore user input in case value
|
265
|
+
#TODO: also ignore when values
|
266
|
+
|
267
|
+
current = 2
|
268
|
+
while current < exp.length
|
269
|
+
process exp[current] if exp[current]
|
270
|
+
current += 1
|
271
|
+
end
|
272
|
+
|
273
|
+
exp
|
274
|
+
end
|
275
|
+
|
263
276
|
def setup
|
264
277
|
@ignore_methods = Set[:button_to, :check_box, :content_tag, :escapeHTML, :escape_once,
|
265
278
|
:field_field, :fields_for, :h, :hidden_field,
|
@@ -26,7 +26,7 @@ class Brakeman::CheckRegexDoS < Brakeman::BaseCheck
|
|
26
26
|
|
27
27
|
#Warns if regex includes user input
|
28
28
|
def process_result result
|
29
|
-
return if duplicate? result
|
29
|
+
return if duplicate? result or result[:call].original_line
|
30
30
|
add_result result
|
31
31
|
|
32
32
|
call = result[:call]
|
@@ -53,7 +53,6 @@ class Brakeman::CheckSimpleFormat < Brakeman::CheckCrossSiteScripting
|
|
53
53
|
:warning_code => :CVE_2013_6416_call,
|
54
54
|
:message => "Values passed to simple_format are not safe in Rails #{@tracker.config[:rails_version]}",
|
55
55
|
:confidence => CONFIDENCE[:high],
|
56
|
-
:gem_info => gemfile_or_environment,
|
57
56
|
:link_path => "https://groups.google.com/d/msg/ruby-security-ann/5ZI1-H5OoIM/ZNq4FoR2GnIJ",
|
58
57
|
:user_input => match.match
|
59
58
|
end
|
@@ -549,7 +549,7 @@ class Brakeman::CheckSQL < Brakeman::BaseCheck
|
|
549
549
|
:sanitize_sql, :sanitize_sql_array, :sanitize_sql_for_assignment,
|
550
550
|
:sanitize_sql_for_conditions, :sanitize_sql_hash,
|
551
551
|
:sanitize_sql_hash_for_assignment, :sanitize_sql_hash_for_conditions,
|
552
|
-
:to_sql, :sanitize, :exists]
|
552
|
+
:to_sql, :sanitize, :exists, :primary_key, :table_name_prefix, :table_name_suffix]
|
553
553
|
|
554
554
|
def safe_value? exp
|
555
555
|
return true unless sexp? exp
|
@@ -558,7 +558,7 @@ class Brakeman::CheckSQL < Brakeman::BaseCheck
|
|
558
558
|
when :str, :lit, :const, :colon2, :nil, :true, :false
|
559
559
|
true
|
560
560
|
when :call
|
561
|
-
if exp.method == :to_s
|
561
|
+
if exp.method == :to_s or exp.method == :to_sym
|
562
562
|
safe_value? exp.target
|
563
563
|
else
|
564
564
|
IGNORE_METHODS_IN_SQL.include? exp.method or
|
@@ -75,7 +75,7 @@ module Brakeman
|
|
75
75
|
Brakeman.load_brakeman_dependency 'sass'
|
76
76
|
|
77
77
|
Haml::Engine.new(text,
|
78
|
-
:escape_html => !!tracker.config[:escape_html]).precompiled
|
78
|
+
:escape_html => !!tracker.config[:escape_html]).precompiled.gsub(/([^\\])\\n/, '\1')
|
79
79
|
end
|
80
80
|
|
81
81
|
def parse_slim text
|
@@ -179,10 +179,10 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor
|
|
179
179
|
exp.block_args.each do |e|
|
180
180
|
#Force block arg(s) to be local
|
181
181
|
if node_type? e, :lasgn
|
182
|
-
env.current[Sexp.new(:lvar, e.lhs)] = e.
|
182
|
+
env.current[Sexp.new(:lvar, e.lhs)] = Sexp.new(:lvar, e.lhs)
|
183
183
|
elsif node_type? e, :kwarg
|
184
184
|
env.current[Sexp.new(:lvar, e[1])] = e[2]
|
185
|
-
elsif node_type? e, :masgn
|
185
|
+
elsif node_type? e, :masgn, :shadow
|
186
186
|
e[1..-1].each do |var|
|
187
187
|
local = Sexp.new(:lvar, var)
|
188
188
|
env.current[local] = local
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'brakeman/processors/alias_processor'
|
2
2
|
require 'brakeman/processors/lib/render_helper'
|
3
|
+
require 'brakeman/processors/lib/render_path'
|
3
4
|
require 'brakeman/processors/lib/find_return_value'
|
4
5
|
|
5
6
|
#Processes aliasing in controllers, but includes following
|
@@ -170,7 +171,8 @@ class Brakeman::ControllerAliasProcessor < Brakeman::AliasProcessor
|
|
170
171
|
|
171
172
|
#Process template and add the current class and method name as called_from info
|
172
173
|
def process_template name, args
|
173
|
-
|
174
|
+
render_path = Brakeman::RenderPath.new.add_controller_render(@current_class, @current_method)
|
175
|
+
super name, args, render_path
|
174
176
|
end
|
175
177
|
|
176
178
|
#Turns a method name into a template name
|
@@ -0,0 +1,100 @@
|
|
1
|
+
module Brakeman
|
2
|
+
class RenderPath
|
3
|
+
attr_reader :path
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@path = []
|
7
|
+
end
|
8
|
+
|
9
|
+
def add_controller_render controller_name, method_name
|
10
|
+
method_name ||= ""
|
11
|
+
|
12
|
+
@path << { :type => :controller,
|
13
|
+
:class => controller_name.to_sym,
|
14
|
+
:method => method_name.to_sym }
|
15
|
+
|
16
|
+
self
|
17
|
+
end
|
18
|
+
|
19
|
+
def add_template_render template_name
|
20
|
+
@path << { :type => :template,
|
21
|
+
:name => template_name.to_sym }
|
22
|
+
|
23
|
+
self
|
24
|
+
end
|
25
|
+
|
26
|
+
def include_template? name
|
27
|
+
name = name.to_sym
|
28
|
+
|
29
|
+
@path.any? do |loc|
|
30
|
+
loc[:type] == :template and loc[:name] == name
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def include_controller? klass
|
35
|
+
klass = klass.to_sym
|
36
|
+
|
37
|
+
@path.any? do |loc|
|
38
|
+
loc[:type] == :controller and loc[:class] == klass
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def include_any_method? method_names
|
43
|
+
names = method_names.map(&:to_sym)
|
44
|
+
|
45
|
+
@path.any? do |loc|
|
46
|
+
loc[:type] == :controller and names.include? loc[:method]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def rendered_from_controller?
|
51
|
+
@path.any? do |loc|
|
52
|
+
loc[:type] == :controller
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def each &block
|
57
|
+
@path.each &block
|
58
|
+
end
|
59
|
+
|
60
|
+
def join *args
|
61
|
+
self.to_a.join *args
|
62
|
+
end
|
63
|
+
|
64
|
+
def length
|
65
|
+
@path.length
|
66
|
+
end
|
67
|
+
|
68
|
+
def to_a
|
69
|
+
@path.map do |loc|
|
70
|
+
case loc[:type]
|
71
|
+
when :template
|
72
|
+
"Template:#{loc[:name]}"
|
73
|
+
when :controller
|
74
|
+
"#{loc[:class]}##{loc[:method]}"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def last
|
80
|
+
self.to_a.last
|
81
|
+
end
|
82
|
+
|
83
|
+
def to_s
|
84
|
+
self.to_a.to_s
|
85
|
+
end
|
86
|
+
|
87
|
+
def to_sym
|
88
|
+
self.to_s.to_sym
|
89
|
+
end
|
90
|
+
|
91
|
+
def to_json *args
|
92
|
+
MultiJson.dump(self.to_a)
|
93
|
+
end
|
94
|
+
|
95
|
+
def initialize_copy original
|
96
|
+
@path = original.path.dup
|
97
|
+
self
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'set'
|
2
2
|
require 'brakeman/processors/alias_processor'
|
3
3
|
require 'brakeman/processors/lib/render_helper'
|
4
|
+
require 'brakeman/processors/lib/render_path'
|
4
5
|
require 'brakeman/tracker'
|
5
6
|
|
6
7
|
#Processes aliasing in templates.
|
@@ -19,14 +20,14 @@ class Brakeman::TemplateAliasProcessor < Brakeman::AliasProcessor
|
|
19
20
|
#Process template
|
20
21
|
def process_template name, args
|
21
22
|
if @called_from
|
22
|
-
|
23
|
+
if @called_from.include_template? name
|
23
24
|
Brakeman.debug "Skipping circular render from #{@template[:name]} to #{name}"
|
24
25
|
return
|
25
26
|
end
|
26
27
|
|
27
|
-
super name, args, @called_from
|
28
|
+
super name, args, @called_from.dup.add_template_render(@template[:name])
|
28
29
|
else
|
29
|
-
super name, args,
|
30
|
+
super name, args, Brakeman::RenderPath.new.add_template_render(@template[:name])
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
@@ -195,7 +195,7 @@ class Brakeman::Report::HTML < Brakeman::Report::Base
|
|
195
195
|
|
196
196
|
if warning.file
|
197
197
|
github_url = github_url warning.file, warning.line
|
198
|
-
message.gsub!(/(near line \d+)/, "<a href
|
198
|
+
message.gsub!(/(near line \d+)/, "<a href=\"#{github_url}\" target='_blank'>\\1</a>") if github_url
|
199
199
|
end
|
200
200
|
|
201
201
|
if @highlight_user_input and warning.user_input
|
data/lib/brakeman/rescanner.rb
CHANGED
@@ -113,7 +113,7 @@ class Brakeman::Rescanner < Brakeman::Scanner
|
|
113
113
|
if controller[:files].include?(path)
|
114
114
|
tracker.templates.each do |template_name, template|
|
115
115
|
next unless template[:caller]
|
116
|
-
|
116
|
+
if template[:caller].include_controller? name
|
117
117
|
tracker.reset_template template_name
|
118
118
|
end
|
119
119
|
end
|
@@ -142,21 +142,18 @@ class Brakeman::Rescanner < Brakeman::Scanner
|
|
142
142
|
|
143
143
|
rescan = Set.new
|
144
144
|
|
145
|
-
template_matcher = /^Template:(.+)/
|
146
|
-
controller_matcher = /^(.+Controller)#(.+)/
|
147
|
-
template_name_matcher = /^#{template_name}\./
|
148
|
-
|
149
145
|
#Search for processed template and process it.
|
150
146
|
#Search for rendered versions of template and re-render (if necessary)
|
151
147
|
tracker.templates.each do |name, template|
|
152
148
|
if template[:file] == path or template[:file].nil?
|
153
|
-
next unless template[:caller] and name.
|
149
|
+
next unless template[:caller] and template[:name].to_sym == template_name.to_sym
|
154
150
|
|
155
151
|
template[:caller].each do |from|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
152
|
+
case from[:type]
|
153
|
+
when :template
|
154
|
+
rescan << [:template, from[:name]]
|
155
|
+
when :controller
|
156
|
+
rescan << [:controller, from[:class], from[:method]]
|
160
157
|
end
|
161
158
|
end
|
162
159
|
end
|
@@ -272,13 +269,7 @@ class Brakeman::Rescanner < Brakeman::Scanner
|
|
272
269
|
|
273
270
|
#Remove any rendered versions, or partials rendered from it
|
274
271
|
tracker.templates.delete_if do |name, template|
|
275
|
-
|
276
|
-
true
|
277
|
-
elsif template[:file].nil?
|
278
|
-
name = name.to_s
|
279
|
-
|
280
|
-
name.match(rendered_from_controller) or name.match(rendered_from_view)
|
281
|
-
end
|
272
|
+
template[:file] == path or template[:name].to_sym == template_name.to_sym
|
282
273
|
end
|
283
274
|
end
|
284
275
|
|
@@ -356,8 +347,6 @@ class Brakeman::Rescanner < Brakeman::Scanner
|
|
356
347
|
end
|
357
348
|
end
|
358
349
|
|
359
|
-
method_matcher = /##{method_names.map {|n| Regexp.escape(n.to_s)}.join('|')}$/
|
360
|
-
|
361
350
|
to_rescan = []
|
362
351
|
|
363
352
|
#Rescan controllers that mixed in library
|
@@ -384,7 +373,7 @@ class Brakeman::Rescanner < Brakeman::Scanner
|
|
384
373
|
tracker.templates.each do |name, template|
|
385
374
|
next unless template[:caller]
|
386
375
|
|
387
|
-
|
376
|
+
if template[:caller].include_any_method? method_names
|
388
377
|
name.to_s.match /^([^.]+)/
|
389
378
|
|
390
379
|
original = tracker.templates[$1.to_sym]
|
data/lib/brakeman/tracker.rb
CHANGED
@@ -257,7 +257,7 @@ class Brakeman::Tracker
|
|
257
257
|
def reset_templates options = { :only_rendered => false }
|
258
258
|
if options[:only_rendered]
|
259
259
|
@templates.delete_if do |name, template|
|
260
|
-
|
260
|
+
template[:caller] and template[:caller].rendered_from_controller?
|
261
261
|
end
|
262
262
|
else
|
263
263
|
@templates = {}
|
@@ -311,11 +311,10 @@ class Brakeman::Tracker
|
|
311
311
|
@controllers.each do |name, controller|
|
312
312
|
if controller[:files].include?(path)
|
313
313
|
controller_name = name
|
314
|
-
template_matcher = /^#{name}#/
|
315
314
|
|
316
315
|
#Remove templates rendered from this controller
|
317
316
|
@templates.each do |template_name, template|
|
318
|
-
if template[:caller] and
|
317
|
+
if template[:caller] and template[:caller].include_controller? name
|
319
318
|
reset_template template_name
|
320
319
|
@call_index.remove_template_indexes template_name
|
321
320
|
end
|
data/lib/brakeman/util.rb
CHANGED
@@ -423,6 +423,8 @@ module Brakeman::Util
|
|
423
423
|
|
424
424
|
# rely on Terminal::Table to build the structure, extract the data out in CSV format
|
425
425
|
def table_to_csv table
|
426
|
+
return "" unless table
|
427
|
+
|
426
428
|
Brakeman.load_brakeman_dependency 'terminal-table'
|
427
429
|
output = CSV.generate_line(table.headings.cells.map{|cell| cell.to_s.strip})
|
428
430
|
table.rows.each do |row|
|
data/lib/brakeman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: brakeman-min
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 3.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.2
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Justin Collins
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
|
-
cert_chain:
|
10
|
+
cert_chain:
|
12
11
|
- |
|
13
12
|
-----BEGIN CERTIFICATE-----
|
14
13
|
MIIDijCCAnKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQ8wDQYDVQQDDAZqdXN0
|
@@ -31,226 +30,234 @@ cert_chain:
|
|
31
30
|
bxoxp9KNxkO+709YwLO1rYfmcGghg8WV6MYz3PSHdlgWF4KrjRFc/00hXHqVk0Sf
|
32
31
|
mREEv2LPwHH2SgpSSab+iawnX4l6lV8XcIrmp/HSMySsPVFBeOmB0c05LpEN8w==
|
33
32
|
-----END CERTIFICATE-----
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
38
36
|
name: test-unit
|
39
|
-
|
40
|
-
|
41
|
-
none: false
|
42
|
-
requirements:
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
43
39
|
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
46
42
|
type: :development
|
47
|
-
version_requirements: *id001
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: ruby_parser
|
50
43
|
prerelease: false
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: ruby_parser
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 3.6.2
|
57
56
|
type: :runtime
|
58
|
-
version_requirements: *id002
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: ruby2ruby
|
61
57
|
prerelease: false
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 3.6.2
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: ruby2ruby
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
67
69
|
version: 2.1.1
|
68
70
|
type: :runtime
|
69
|
-
version_requirements: *id003
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: multi_json
|
72
71
|
prerelease: false
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 2.1.1
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: multi_json
|
79
|
+
requirement: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.2'
|
79
84
|
type: :runtime
|
80
|
-
|
81
|
-
|
85
|
+
prerelease: false
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '1.2'
|
91
|
+
description: Brakeman detects security vulnerabilities in Ruby on Rails applications
|
92
|
+
via static analysis. This version of the gem only requires the minimum number of
|
93
|
+
dependencies. Use the 'brakeman' gem for a full install.
|
82
94
|
email: gem@brakeman.org
|
83
|
-
executables:
|
95
|
+
executables:
|
84
96
|
- brakeman
|
85
97
|
extensions: []
|
86
|
-
|
87
98
|
extra_rdoc_files: []
|
88
|
-
|
89
|
-
files:
|
90
|
-
- bin/brakeman
|
99
|
+
files:
|
91
100
|
- CHANGES
|
92
|
-
- WARNING_TYPES
|
93
101
|
- FEATURES
|
94
102
|
- README.md
|
103
|
+
- WARNING_TYPES
|
104
|
+
- bin/brakeman
|
95
105
|
- lib/brakeman.rb
|
96
|
-
- lib/ruby_parser/bm_sexp.rb
|
97
|
-
- lib/ruby_parser/bm_sexp_processor.rb
|
98
106
|
- lib/brakeman/app_tree.rb
|
99
|
-
- lib/brakeman/call_index.rb
|
100
107
|
- lib/brakeman/brakeman.rake
|
101
|
-
- lib/brakeman/
|
102
|
-
- lib/brakeman/
|
103
|
-
- lib/brakeman/
|
104
|
-
- lib/brakeman/
|
105
|
-
- lib/brakeman/checks/
|
106
|
-
- lib/brakeman/checks/
|
107
|
-
- lib/brakeman/checks/
|
108
|
-
- lib/brakeman/checks/
|
109
|
-
- lib/brakeman/checks/
|
110
|
-
- lib/brakeman/checks/check_model_serialize.rb
|
111
|
-
- lib/brakeman/checks/check_regex_dos.rb
|
112
|
-
- lib/brakeman/checks/check_validation_regex.rb
|
113
|
-
- lib/brakeman/checks/check_single_quotes.rb
|
108
|
+
- lib/brakeman/call_index.rb
|
109
|
+
- lib/brakeman/checks.rb
|
110
|
+
- lib/brakeman/checks/base_check.rb
|
111
|
+
- lib/brakeman/checks/check_basic_auth.rb
|
112
|
+
- lib/brakeman/checks/check_content_tag.rb
|
113
|
+
- lib/brakeman/checks/check_create_with.rb
|
114
|
+
- lib/brakeman/checks/check_cross_site_scripting.rb
|
115
|
+
- lib/brakeman/checks/check_default_routes.rb
|
116
|
+
- lib/brakeman/checks/check_deserialize.rb
|
114
117
|
- lib/brakeman/checks/check_detailed_exceptions.rb
|
115
|
-
- lib/brakeman/checks/
|
116
|
-
- lib/brakeman/checks/
|
117
|
-
- lib/brakeman/checks/
|
118
|
-
- lib/brakeman/checks/check_symbol_dos.rb
|
118
|
+
- lib/brakeman/checks/check_digest_dos.rb
|
119
|
+
- lib/brakeman/checks/check_escape_function.rb
|
120
|
+
- lib/brakeman/checks/check_evaluation.rb
|
119
121
|
- lib/brakeman/checks/check_execute.rb
|
120
|
-
- lib/brakeman/checks/
|
121
|
-
- lib/brakeman/checks/check_skip_before_filter.rb
|
122
|
-
- lib/brakeman/checks/check_default_routes.rb
|
122
|
+
- lib/brakeman/checks/check_file_access.rb
|
123
123
|
- lib/brakeman/checks/check_file_disclosure.rb
|
124
|
-
- lib/brakeman/checks/check_basic_auth.rb
|
125
|
-
- lib/brakeman/checks/check_render.rb
|
126
|
-
- lib/brakeman/checks/base_check.rb
|
127
|
-
- lib/brakeman/checks/check_mass_assignment.rb
|
128
|
-
- lib/brakeman/checks/check_sanitize_methods.rb
|
129
|
-
- lib/brakeman/checks/check_simple_format.rb
|
130
|
-
- lib/brakeman/checks/check_select_vulnerability.rb
|
131
|
-
- lib/brakeman/checks/check_send_file.rb
|
132
|
-
- lib/brakeman/checks/check_response_splitting.rb
|
133
|
-
- lib/brakeman/checks/check_ssl_verify.rb
|
134
124
|
- lib/brakeman/checks/check_filter_skipping.rb
|
125
|
+
- lib/brakeman/checks/check_forgery_setting.rb
|
126
|
+
- lib/brakeman/checks/check_header_dos.rb
|
127
|
+
- lib/brakeman/checks/check_i18n_xss.rb
|
135
128
|
- lib/brakeman/checks/check_jruby_xml.rb
|
136
|
-
- lib/brakeman/checks/check_escape_function.rb
|
137
|
-
- lib/brakeman/checks/check_strip_tags.rb
|
138
129
|
- lib/brakeman/checks/check_json_parsing.rb
|
139
|
-
- lib/brakeman/checks/
|
140
|
-
- lib/brakeman/checks/check_translate_bug.rb
|
141
|
-
- lib/brakeman/checks/check_quote_table_name.rb
|
142
|
-
- lib/brakeman/checks/check_sql.rb
|
143
|
-
- lib/brakeman/checks/check_yaml_parsing.rb
|
144
|
-
- lib/brakeman/checks/check_render_inline.rb
|
145
|
-
- lib/brakeman/checks/check_cross_site_scripting.rb
|
130
|
+
- lib/brakeman/checks/check_link_to.rb
|
146
131
|
- lib/brakeman/checks/check_link_to_href.rb
|
147
|
-
- lib/brakeman/checks/
|
132
|
+
- lib/brakeman/checks/check_mail_to.rb
|
133
|
+
- lib/brakeman/checks/check_mass_assignment.rb
|
134
|
+
- lib/brakeman/checks/check_model_attr_accessible.rb
|
148
135
|
- lib/brakeman/checks/check_model_attributes.rb
|
149
|
-
- lib/brakeman/checks/
|
150
|
-
- lib/brakeman/checks/check_content_tag.rb
|
151
|
-
- lib/brakeman/checks/check_symbol_dos_cve.rb
|
136
|
+
- lib/brakeman/checks/check_model_serialize.rb
|
152
137
|
- lib/brakeman/checks/check_nested_attributes.rb
|
138
|
+
- lib/brakeman/checks/check_number_to_currency.rb
|
139
|
+
- lib/brakeman/checks/check_quote_table_name.rb
|
140
|
+
- lib/brakeman/checks/check_redirect.rb
|
141
|
+
- lib/brakeman/checks/check_regex_dos.rb
|
142
|
+
- lib/brakeman/checks/check_render.rb
|
143
|
+
- lib/brakeman/checks/check_render_dos.rb
|
144
|
+
- lib/brakeman/checks/check_render_inline.rb
|
145
|
+
- lib/brakeman/checks/check_response_splitting.rb
|
146
|
+
- lib/brakeman/checks/check_safe_buffer_manipulation.rb
|
147
|
+
- lib/brakeman/checks/check_sanitize_methods.rb
|
148
|
+
- lib/brakeman/checks/check_select_tag.rb
|
149
|
+
- lib/brakeman/checks/check_select_vulnerability.rb
|
153
150
|
- lib/brakeman/checks/check_send.rb
|
154
|
-
- lib/brakeman/checks/
|
155
|
-
- lib/brakeman/checks/
|
151
|
+
- lib/brakeman/checks/check_send_file.rb
|
152
|
+
- lib/brakeman/checks/check_session_settings.rb
|
153
|
+
- lib/brakeman/checks/check_simple_format.rb
|
154
|
+
- lib/brakeman/checks/check_single_quotes.rb
|
155
|
+
- lib/brakeman/checks/check_skip_before_filter.rb
|
156
|
+
- lib/brakeman/checks/check_sql.rb
|
156
157
|
- lib/brakeman/checks/check_sql_cves.rb
|
157
|
-
- lib/brakeman/checks/
|
158
|
+
- lib/brakeman/checks/check_ssl_verify.rb
|
159
|
+
- lib/brakeman/checks/check_strip_tags.rb
|
160
|
+
- lib/brakeman/checks/check_symbol_dos.rb
|
161
|
+
- lib/brakeman/checks/check_symbol_dos_cve.rb
|
162
|
+
- lib/brakeman/checks/check_translate_bug.rb
|
163
|
+
- lib/brakeman/checks/check_unsafe_reflection.rb
|
164
|
+
- lib/brakeman/checks/check_unscoped_find.rb
|
165
|
+
- lib/brakeman/checks/check_validation_regex.rb
|
158
166
|
- lib/brakeman/checks/check_without_protection.rb
|
159
|
-
- lib/brakeman/checks/
|
160
|
-
- lib/brakeman/
|
161
|
-
- lib/brakeman/checks/check_link_to.rb
|
162
|
-
- lib/brakeman/checks/check_render_dos.rb
|
163
|
-
- lib/brakeman/processor.rb
|
167
|
+
- lib/brakeman/checks/check_yaml_parsing.rb
|
168
|
+
- lib/brakeman/differ.rb
|
164
169
|
- lib/brakeman/file_parser.rb
|
165
|
-
- lib/brakeman/version.rb
|
166
170
|
- lib/brakeman/format/style.css
|
167
|
-
- lib/brakeman/
|
168
|
-
- lib/brakeman/tracker.rb
|
169
|
-
- lib/brakeman/parsers/rails3_erubis.rb
|
171
|
+
- lib/brakeman/options.rb
|
170
172
|
- lib/brakeman/parsers/rails2_erubis.rb
|
171
|
-
- lib/brakeman/parsers/template_parser.rb
|
172
173
|
- lib/brakeman/parsers/rails2_xss_plugin_erubis.rb
|
173
|
-
- lib/brakeman/
|
174
|
-
- lib/brakeman/
|
175
|
-
- lib/brakeman/
|
174
|
+
- lib/brakeman/parsers/rails3_erubis.rb
|
175
|
+
- lib/brakeman/parsers/template_parser.rb
|
176
|
+
- lib/brakeman/processor.rb
|
176
177
|
- lib/brakeman/processors/alias_processor.rb
|
177
|
-
- lib/brakeman/processors/
|
178
|
-
- lib/brakeman/processors/template_processor.rb
|
179
|
-
- lib/brakeman/processors/erubis_template_processor.rb
|
180
|
-
- lib/brakeman/processors/erb_template_processor.rb
|
181
|
-
- lib/brakeman/processors/model_processor.rb
|
182
|
-
- lib/brakeman/processors/template_alias_processor.rb
|
178
|
+
- lib/brakeman/processors/base_processor.rb
|
183
179
|
- lib/brakeman/processors/config_processor.rb
|
184
180
|
- lib/brakeman/processors/controller_alias_processor.rb
|
181
|
+
- lib/brakeman/processors/controller_processor.rb
|
182
|
+
- lib/brakeman/processors/erb_template_processor.rb
|
183
|
+
- lib/brakeman/processors/erubis_template_processor.rb
|
184
|
+
- lib/brakeman/processors/gem_processor.rb
|
185
185
|
- lib/brakeman/processors/haml_template_processor.rb
|
186
|
-
- lib/brakeman/processors/base_processor.rb
|
187
|
-
- lib/brakeman/processors/lib/find_return_value.rb
|
188
|
-
- lib/brakeman/processors/lib/rails3_route_processor.rb
|
189
|
-
- lib/brakeman/processors/lib/find_all_calls.rb
|
190
186
|
- lib/brakeman/processors/lib/basic_processor.rb
|
191
|
-
- lib/brakeman/processors/lib/
|
192
|
-
- lib/brakeman/processors/lib/route_helper.rb
|
187
|
+
- lib/brakeman/processors/lib/find_all_calls.rb
|
193
188
|
- lib/brakeman/processors/lib/find_call.rb
|
194
|
-
- lib/brakeman/processors/lib/
|
195
|
-
- lib/brakeman/processors/lib/rails3_config_processor.rb
|
196
|
-
- lib/brakeman/processors/lib/rails2_config_processor.rb
|
189
|
+
- lib/brakeman/processors/lib/find_return_value.rb
|
197
190
|
- lib/brakeman/processors/lib/processor_helper.rb
|
198
|
-
- lib/brakeman/processors/
|
199
|
-
- lib/brakeman/processors/
|
191
|
+
- lib/brakeman/processors/lib/rails2_config_processor.rb
|
192
|
+
- lib/brakeman/processors/lib/rails2_route_processor.rb
|
193
|
+
- lib/brakeman/processors/lib/rails3_config_processor.rb
|
194
|
+
- lib/brakeman/processors/lib/rails3_route_processor.rb
|
195
|
+
- lib/brakeman/processors/lib/render_helper.rb
|
196
|
+
- lib/brakeman/processors/lib/render_path.rb
|
197
|
+
- lib/brakeman/processors/lib/route_helper.rb
|
200
198
|
- lib/brakeman/processors/library_processor.rb
|
201
|
-
- lib/brakeman/processors/
|
199
|
+
- lib/brakeman/processors/model_processor.rb
|
200
|
+
- lib/brakeman/processors/output_processor.rb
|
202
201
|
- lib/brakeman/processors/route_processor.rb
|
203
|
-
- lib/brakeman/
|
202
|
+
- lib/brakeman/processors/slim_template_processor.rb
|
203
|
+
- lib/brakeman/processors/template_alias_processor.rb
|
204
|
+
- lib/brakeman/processors/template_processor.rb
|
205
|
+
- lib/brakeman/report.rb
|
206
|
+
- lib/brakeman/report/ignore/config.rb
|
207
|
+
- lib/brakeman/report/ignore/interactive.rb
|
208
|
+
- lib/brakeman/report/initializers/faster_csv.rb
|
209
|
+
- lib/brakeman/report/initializers/multi_json.rb
|
210
|
+
- lib/brakeman/report/renderer.rb
|
204
211
|
- lib/brakeman/report/report_base.rb
|
212
|
+
- lib/brakeman/report/report_csv.rb
|
205
213
|
- lib/brakeman/report/report_hash.rb
|
214
|
+
- lib/brakeman/report/report_html.rb
|
215
|
+
- lib/brakeman/report/report_json.rb
|
216
|
+
- lib/brakeman/report/report_markdown.rb
|
217
|
+
- lib/brakeman/report/report_table.rb
|
218
|
+
- lib/brakeman/report/report_tabs.rb
|
206
219
|
- lib/brakeman/report/templates/controller_overview.html.erb
|
207
|
-
- lib/brakeman/report/templates/security_warnings.html.erb
|
208
|
-
- lib/brakeman/report/templates/warning_overview.html.erb
|
209
|
-
- lib/brakeman/report/templates/ignored_warnings.html.erb
|
210
|
-
- lib/brakeman/report/templates/model_warnings.html.erb
|
211
220
|
- lib/brakeman/report/templates/controller_warnings.html.erb
|
212
|
-
- lib/brakeman/report/templates/overview.html.erb
|
213
221
|
- lib/brakeman/report/templates/error_overview.html.erb
|
214
|
-
- lib/brakeman/report/templates/view_warnings.html.erb
|
215
222
|
- lib/brakeman/report/templates/header.html.erb
|
223
|
+
- lib/brakeman/report/templates/ignored_warnings.html.erb
|
224
|
+
- lib/brakeman/report/templates/model_warnings.html.erb
|
225
|
+
- lib/brakeman/report/templates/overview.html.erb
|
226
|
+
- lib/brakeman/report/templates/security_warnings.html.erb
|
216
227
|
- lib/brakeman/report/templates/template_overview.html.erb
|
217
|
-
- lib/brakeman/report/
|
218
|
-
- lib/brakeman/report/
|
219
|
-
- lib/brakeman/report/renderer.rb
|
220
|
-
- lib/brakeman/report/report_table.rb
|
221
|
-
- lib/brakeman/report/report_html.rb
|
222
|
-
- lib/brakeman/report/report_csv.rb
|
223
|
-
- lib/brakeman/report/report_tabs.rb
|
224
|
-
- lib/brakeman/report/initializers/faster_csv.rb
|
225
|
-
- lib/brakeman/report/initializers/multi_json.rb
|
226
|
-
- lib/brakeman/report/report_json.rb
|
228
|
+
- lib/brakeman/report/templates/view_warnings.html.erb
|
229
|
+
- lib/brakeman/report/templates/warning_overview.html.erb
|
227
230
|
- lib/brakeman/rescanner.rb
|
231
|
+
- lib/brakeman/scanner.rb
|
232
|
+
- lib/brakeman/tracker.rb
|
233
|
+
- lib/brakeman/util.rb
|
234
|
+
- lib/brakeman/version.rb
|
235
|
+
- lib/brakeman/warning.rb
|
236
|
+
- lib/brakeman/warning_codes.rb
|
237
|
+
- lib/ruby_parser/bm_sexp.rb
|
238
|
+
- lib/ruby_parser/bm_sexp_processor.rb
|
228
239
|
homepage: http://brakemanscanner.org
|
229
|
-
licenses:
|
240
|
+
licenses:
|
230
241
|
- MIT
|
242
|
+
metadata: {}
|
231
243
|
post_install_message:
|
232
244
|
rdoc_options: []
|
233
|
-
|
234
|
-
require_paths:
|
245
|
+
require_paths:
|
235
246
|
- lib
|
236
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
237
|
-
|
238
|
-
requirements:
|
247
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
248
|
+
requirements:
|
239
249
|
- - ">="
|
240
|
-
- !ruby/object:Gem::Version
|
241
|
-
version:
|
242
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
|
-
|
244
|
-
requirements:
|
250
|
+
- !ruby/object:Gem::Version
|
251
|
+
version: '0'
|
252
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
|
+
requirements:
|
245
254
|
- - ">="
|
246
|
-
- !ruby/object:Gem::Version
|
247
|
-
version:
|
255
|
+
- !ruby/object:Gem::Version
|
256
|
+
version: '0'
|
248
257
|
requirements: []
|
249
|
-
|
250
258
|
rubyforge_project:
|
251
|
-
rubygems_version:
|
259
|
+
rubygems_version: 2.2.2
|
252
260
|
signing_key:
|
253
|
-
specification_version:
|
261
|
+
specification_version: 4
|
254
262
|
summary: Security vulnerability scanner for Ruby on Rails.
|
255
263
|
test_files: []
|
256
|
-
|
metadata.gz.sig
CHANGED
Binary file
|