brakeman-min 3.7.2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +15 -1
  3. data/FEATURES +1 -1
  4. data/lib/brakeman.rb +55 -17
  5. data/lib/brakeman/call_index.rb +2 -2
  6. data/lib/brakeman/checks/base_check.rb +4 -2
  7. data/lib/brakeman/checks/check_basic_auth.rb +3 -3
  8. data/lib/brakeman/checks/check_basic_auth_timing_attack.rb +1 -1
  9. data/lib/brakeman/checks/check_content_tag.rb +12 -12
  10. data/lib/brakeman/checks/check_create_with.rb +5 -5
  11. data/lib/brakeman/checks/check_cross_site_scripting.rb +8 -8
  12. data/lib/brakeman/checks/check_default_routes.rb +4 -4
  13. data/lib/brakeman/checks/check_deserialize.rb +2 -2
  14. data/lib/brakeman/checks/check_detailed_exceptions.rb +4 -4
  15. data/lib/brakeman/checks/check_digest_dos.rb +2 -2
  16. data/lib/brakeman/checks/check_dynamic_finders.rb +1 -1
  17. data/lib/brakeman/checks/check_escape_function.rb +2 -2
  18. data/lib/brakeman/checks/check_evaluation.rb +1 -1
  19. data/lib/brakeman/checks/check_execute.rb +5 -5
  20. data/lib/brakeman/checks/check_file_access.rb +4 -4
  21. data/lib/brakeman/checks/check_file_disclosure.rb +2 -2
  22. data/lib/brakeman/checks/check_filter_skipping.rb +2 -2
  23. data/lib/brakeman/checks/check_forgery_setting.rb +2 -2
  24. data/lib/brakeman/checks/check_header_dos.rb +1 -1
  25. data/lib/brakeman/checks/check_i18n_xss.rb +2 -2
  26. data/lib/brakeman/checks/check_jruby_xml.rb +2 -4
  27. data/lib/brakeman/checks/check_json_encoding.rb +4 -4
  28. data/lib/brakeman/checks/check_json_parsing.rb +6 -6
  29. data/lib/brakeman/checks/check_link_to.rb +5 -5
  30. data/lib/brakeman/checks/check_link_to_href.rb +37 -31
  31. data/lib/brakeman/checks/check_mail_to.rb +2 -2
  32. data/lib/brakeman/checks/check_mass_assignment.rb +6 -6
  33. data/lib/brakeman/checks/check_mime_type_dos.rb +1 -1
  34. data/lib/brakeman/checks/check_model_attr_accessible.rb +5 -5
  35. data/lib/brakeman/checks/check_model_attributes.rb +4 -4
  36. data/lib/brakeman/checks/check_model_serialize.rb +3 -3
  37. data/lib/brakeman/checks/check_nested_attributes.rb +2 -2
  38. data/lib/brakeman/checks/check_nested_attributes_bypass.rb +1 -1
  39. data/lib/brakeman/checks/check_number_to_currency.rb +5 -5
  40. data/lib/brakeman/checks/check_quote_table_name.rb +2 -2
  41. data/lib/brakeman/checks/check_redirect.rb +2 -2
  42. data/lib/brakeman/checks/check_regex_dos.rb +3 -3
  43. data/lib/brakeman/checks/check_render.rb +4 -4
  44. data/lib/brakeman/checks/check_render_dos.rb +1 -1
  45. data/lib/brakeman/checks/check_render_inline.rb +5 -5
  46. data/lib/brakeman/checks/check_response_splitting.rb +1 -1
  47. data/lib/brakeman/checks/check_route_dos.rb +1 -1
  48. data/lib/brakeman/checks/check_safe_buffer_manipulation.rb +2 -2
  49. data/lib/brakeman/checks/check_sanitize_methods.rb +7 -7
  50. data/lib/brakeman/checks/check_secrets.rb +1 -1
  51. data/lib/brakeman/checks/check_select_tag.rb +2 -2
  52. data/lib/brakeman/checks/check_select_vulnerability.rb +3 -3
  53. data/lib/brakeman/checks/check_send.rb +1 -1
  54. data/lib/brakeman/checks/check_session_manipulation.rb +2 -2
  55. data/lib/brakeman/checks/check_session_settings.rb +3 -3
  56. data/lib/brakeman/checks/check_simple_format.rb +4 -4
  57. data/lib/brakeman/checks/check_single_quotes.rb +3 -3
  58. data/lib/brakeman/checks/check_skip_before_filter.rb +3 -3
  59. data/lib/brakeman/checks/check_sql.rb +9 -9
  60. data/lib/brakeman/checks/check_sql_cves.rb +2 -2
  61. data/lib/brakeman/checks/check_ssl_verify.rb +1 -1
  62. data/lib/brakeman/checks/check_strip_tags.rb +7 -7
  63. data/lib/brakeman/checks/check_symbol_dos.rb +2 -2
  64. data/lib/brakeman/checks/check_symbol_dos_cve.rb +1 -1
  65. data/lib/brakeman/checks/check_translate_bug.rb +3 -3
  66. data/lib/brakeman/checks/check_unsafe_reflection.rb +2 -2
  67. data/lib/brakeman/checks/check_unscoped_find.rb +1 -1
  68. data/lib/brakeman/checks/check_validation_regex.rb +1 -1
  69. data/lib/brakeman/checks/check_weak_hash.rb +6 -6
  70. data/lib/brakeman/checks/check_without_protection.rb +2 -2
  71. data/lib/brakeman/checks/check_xml_dos.rb +1 -1
  72. data/lib/brakeman/checks/check_yaml_parsing.rb +2 -2
  73. data/lib/brakeman/commandline.rb +2 -2
  74. data/lib/brakeman/options.rb +9 -5
  75. data/lib/brakeman/processors/alias_processor.rb +3 -1
  76. data/lib/brakeman/processors/lib/rails2_route_processor.rb +8 -8
  77. data/lib/brakeman/processors/lib/render_helper.rb +3 -3
  78. data/lib/brakeman/report.rb +9 -6
  79. data/lib/brakeman/report/report_base.rb +2 -1
  80. data/lib/brakeman/report/report_text.rb +4 -6
  81. data/lib/brakeman/rescanner.rb +8 -8
  82. data/lib/brakeman/tracker.rb +3 -3
  83. data/lib/brakeman/tracker/collection.rb +1 -1
  84. data/lib/brakeman/util.rb +5 -1
  85. data/lib/brakeman/version.rb +1 -1
  86. data/lib/brakeman/warning.rb +49 -21
  87. metadata +2 -2
@@ -80,17 +80,17 @@ class Brakeman::CheckMassAssignment < Brakeman::BaseCheck
80
80
  return
81
81
  elsif not node_type? first_arg, :hash
82
82
  if attr_protected
83
- confidence = CONFIDENCE[:med]
83
+ confidence = :medium
84
84
  else
85
- confidence = CONFIDENCE[:high]
85
+ confidence = :high
86
86
  end
87
87
  else
88
- confidence = CONFIDENCE[:low]
88
+ return
89
89
  end
90
90
  elsif node_type? call.first_arg, :lit, :str
91
91
  return
92
92
  else
93
- confidence = CONFIDENCE[:low]
93
+ confidence = :weak
94
94
  input = nil
95
95
  end
96
96
 
@@ -182,9 +182,9 @@ class Brakeman::CheckMassAssignment < Brakeman::BaseCheck
182
182
  return unless original? result
183
183
 
184
184
  confidence = if subsequent_mass_assignment? result
185
- CONFIDENCE[:high]
185
+ :high
186
186
  else
187
- CONFIDENCE[:med]
187
+ :medium
188
188
  end
189
189
 
190
190
  warn :result => result,
@@ -24,7 +24,7 @@ class Brakeman::CheckMimeTypeDoS < Brakeman::BaseCheck
24
24
  warn :warning_type => "Denial of Service",
25
25
  :warning_code => :CVE_2016_0751,
26
26
  :message => message,
27
- :confidence => CONFIDENCE[:med],
27
+ :confidence => :medium,
28
28
  :gem_info => gemfile_or_environment,
29
29
  :link_path => "https://groups.google.com/d/msg/rubyonrails-security/9oLY_FCzvoc/w9oI9XxbFQAJ"
30
30
  end
@@ -11,11 +11,11 @@ class Brakeman::CheckModelAttrAccessible < Brakeman::BaseCheck
11
11
  @description = "Reports models which have dangerous attributes defined under the attr_accessible whitelist."
12
12
 
13
13
  SUSP_ATTRS = [
14
- [:admin, CONFIDENCE[:high]], # Very dangerous unless some Rails authorization used
15
- [:role, CONFIDENCE[:med]],
16
- [:banned, CONFIDENCE[:med]],
17
- [:account_id, CONFIDENCE[:high]],
18
- [/\S*_id(s?)\z/, CONFIDENCE[:low]] # All other foreign keys have weak/low confidence
14
+ [:admin, :high], # Very dangerous unless some Rails authorization used
15
+ [:role, :medium],
16
+ [:banned, :medium],
17
+ [:account_id, :high],
18
+ [/\S*_id(s?)\z/, :weak] # All other foreign keys have weak/low confidence
19
19
  ]
20
20
 
21
21
  def run_check
@@ -31,7 +31,7 @@ class Brakeman::CheckModelAttributes < Brakeman::BaseCheck
31
31
  :warning_type => "Attribute Restriction",
32
32
  :warning_code => :no_attr_accessible,
33
33
  :message => "Mass assignment is not restricted using attr_accessible",
34
- :confidence => CONFIDENCE[:high]
34
+ :confidence => :high
35
35
  end
36
36
 
37
37
  unless protected_names.empty?
@@ -60,7 +60,7 @@ class Brakeman::CheckModelAttributes < Brakeman::BaseCheck
60
60
  :warning_type => "Attribute Restriction",
61
61
  :warning_code => :no_attr_accessible,
62
62
  :message => "Mass assignment is not restricted using attr_accessible",
63
- :confidence => CONFIDENCE[:high]
63
+ :confidence => :high
64
64
  elsif not tracker.options[:ignore_attr_protected]
65
65
  message, confidence, link = check_for_attr_protected_bypass
66
66
 
@@ -106,11 +106,11 @@ class Brakeman::CheckModelAttributes < Brakeman::BaseCheck
106
106
 
107
107
  if upgrade_version
108
108
  message = "attr_protected is bypassable in #{rails_version}, use attr_accessible or upgrade to #{upgrade_version}"
109
- confidence = CONFIDENCE[:high]
109
+ confidence = :high
110
110
  link = "https://groups.google.com/d/topic/rubyonrails-security/AFBKNY7VSH8/discussion"
111
111
  else
112
112
  message = "attr_accessible is recommended over attr_protected"
113
- confidence = CONFIDENCE[:med]
113
+ confidence = :medium
114
114
  link = nil
115
115
  end
116
116
 
@@ -17,7 +17,7 @@ class Brakeman::CheckModelSerialize < Brakeman::BaseCheck
17
17
 
18
18
  return unless @upgrade_version
19
19
 
20
- tracker.models.each do |name, model|
20
+ tracker.models.each do |_name, model|
21
21
  check_for_serialize model
22
22
  end
23
23
  end
@@ -49,9 +49,9 @@ class Brakeman::CheckModelSerialize < Brakeman::BaseCheck
49
49
  end
50
50
 
51
51
  if attrs.empty?
52
- confidence = CONFIDENCE[:med]
52
+ confidence = :medium
53
53
  else
54
- confidence = CONFIDENCE[:high]
54
+ confidence = :high
55
55
  end
56
56
 
57
57
  warn :model => model.name,
@@ -22,14 +22,14 @@ class Brakeman::CheckNestedAttributes < Brakeman::BaseCheck
22
22
  warn :warning_type => "Nested Attributes",
23
23
  :warning_code => :CVE_2010_3933,
24
24
  :message => message,
25
- :confidence => CONFIDENCE[:high],
25
+ :confidence => :high,
26
26
  :gem_info => gemfile_or_environment,
27
27
  :link_path => "https://groups.google.com/d/topic/rubyonrails-security/-fkT0yja_gw/discussion"
28
28
  end
29
29
  end
30
30
 
31
31
  def uses_nested_attributes?
32
- active_record_models.each do |name, model|
32
+ active_record_models.each do |_name, model|
33
33
  return true if model.options[:accepts_nested_attributes_for]
34
34
  end
35
35
 
@@ -38,7 +38,7 @@ class Brakeman::CheckNestedAttributesBypass < Brakeman::BaseCheck
38
38
  :message => message,
39
39
  :file => model.file,
40
40
  :line => args.line,
41
- :confidence => CONFIDENCE[:med],
41
+ :confidence => :medium,
42
42
  :link_path => "https://groups.google.com/d/msg/rubyonrails-security/cawsWcQ6c8g/tegZtYdbFQAJ"
43
43
  end
44
44
 
@@ -31,10 +31,10 @@ class Brakeman::CheckNumberToCurrency < Brakeman::BaseCheck
31
31
  message << "4.0.3"
32
32
  end
33
33
 
34
- warn :warning_type => "Cross Site Scripting",
34
+ warn :warning_type => "Cross-Site Scripting",
35
35
  :warning_code => :CVE_2014_0081,
36
36
  :message => message,
37
- :confidence => CONFIDENCE[:med],
37
+ :confidence => :medium,
38
38
  :gem_info => gemfile_or_environment,
39
39
  :link_path => "https://groups.google.com/d/msg/ruby-security-ann/9WiRn2nhfq0/2K2KRB4LwCMJ"
40
40
  end
@@ -46,7 +46,7 @@ class Brakeman::CheckNumberToCurrency < Brakeman::BaseCheck
46
46
  next unless arg
47
47
 
48
48
  if not check_helper_option(result, arg) and hash? arg
49
- hash_iterate(arg) do |key, value|
49
+ hash_iterate(arg) do |_key, value|
50
50
  break if check_helper_option(result, value)
51
51
  end
52
52
  end
@@ -64,10 +64,10 @@ class Brakeman::CheckNumberToCurrency < Brakeman::BaseCheck
64
64
 
65
65
  def warn_on_number_helper result, match
66
66
  warn :result => result,
67
- :warning_type => "Cross Site Scripting",
67
+ :warning_type => "Cross-Site Scripting",
68
68
  :warning_code => :CVE_2014_0081_call,
69
69
  :message => "Format options in #{result[:call].method} are not safe in Rails #{rails_version}",
70
- :confidence => CONFIDENCE[:high],
70
+ :confidence => :high,
71
71
  :link_path => "https://groups.google.com/d/msg/ruby-security-ann/9WiRn2nhfq0/2K2KRB4LwCMJ",
72
72
  :user_input => match
73
73
  end
@@ -12,9 +12,9 @@ class Brakeman::CheckQuoteTableName < Brakeman::BaseCheck
12
12
  version_between?('3.0.0', '3.0.9'))
13
13
 
14
14
  if uses_quote_table_name?
15
- confidence = CONFIDENCE[:high]
15
+ confidence = :high
16
16
  else
17
- confidence = CONFIDENCE[:med]
17
+ confidence = :medium
18
18
  end
19
19
 
20
20
  if rails_version =~ /^3/
@@ -41,9 +41,9 @@ class Brakeman::CheckRedirect < Brakeman::BaseCheck
41
41
  res = include_user_input?(call)
42
42
 
43
43
  if res.type == :immediate
44
- confidence = CONFIDENCE[:high]
44
+ confidence = :high
45
45
  else
46
- confidence = CONFIDENCE[:low]
46
+ confidence = :weak
47
47
  end
48
48
 
49
49
  warn :result => result,
@@ -35,12 +35,12 @@ class Brakeman::CheckRegexDoS < Brakeman::BaseCheck
35
35
  next unless sexp? component
36
36
 
37
37
  if match = has_immediate_user_input?(component)
38
- confidence = CONFIDENCE[:high]
38
+ confidence = :high
39
39
  elsif match = has_immediate_model?(component)
40
40
  match = Match.new(:model, match)
41
- confidence = CONFIDENCE[:med]
41
+ confidence = :medium
42
42
  elsif match = include_user_input?(component)
43
- confidence = CONFIDENCE[:low]
43
+ confidence = :weak
44
44
  end
45
45
 
46
46
  if match
@@ -36,12 +36,12 @@ class Brakeman::CheckRender < Brakeman::BaseCheck
36
36
 
37
37
  if input = has_immediate_user_input?(view)
38
38
  if string_interp? view
39
- confidence = CONFIDENCE[:med]
39
+ confidence = :medium
40
40
  else
41
- confidence = CONFIDENCE[:high]
41
+ confidence = :high
42
42
  end
43
43
  elsif input = include_user_input?(view)
44
- confidence = CONFIDENCE[:low]
44
+ confidence = :weak
45
45
  else
46
46
  return
47
47
  end
@@ -77,7 +77,7 @@ class Brakeman::CheckRender < Brakeman::BaseCheck
77
77
  :warning_code => :dynamic_render_path_rce,
78
78
  :message => "Passing query parameters to render() is vulnerable in Rails #{rails_version} (CVE-2016-0752)",
79
79
  :user_input => view,
80
- :confidence => CONFIDENCE[:high]
80
+ :confidence => :high
81
81
  end
82
82
  end
83
83
  end
@@ -30,7 +30,7 @@ class Brakeman::CheckRenderDoS < Brakeman::BaseCheck
30
30
  warn :warning_type => "Denial of Service",
31
31
  :warning_code => :CVE_2014_0082,
32
32
  :message => message,
33
- :confidence => CONFIDENCE[:high],
33
+ :confidence => :high,
34
34
  :link_path => "https://groups.google.com/d/msg/rubyonrails-security/LMxO_3_eCuc/ozGBEhKaJbIJ",
35
35
  :gem_info => gemfile_or_environment
36
36
  end
@@ -1,7 +1,7 @@
1
1
  class Brakeman::CheckRenderInline < Brakeman::CheckCrossSiteScripting
2
2
  Brakeman::Checks.add self
3
3
 
4
- @description = "Checks for cross site scripting in render calls"
4
+ @description = "Checks for cross-site scripting in render calls"
5
5
 
6
6
  def run_check
7
7
  setup
@@ -24,18 +24,18 @@ class Brakeman::CheckRenderInline < Brakeman::CheckCrossSiteScripting
24
24
 
25
25
  if input = has_immediate_user_input?(render_value)
26
26
  warn :result => result,
27
- :warning_type => "Cross Site Scripting",
27
+ :warning_type => "Cross-Site Scripting",
28
28
  :warning_code => :cross_site_scripting_inline,
29
29
  :message => "Unescaped #{friendly_type_of input} rendered inline",
30
30
  :user_input => input,
31
- :confidence => CONFIDENCE[:high]
31
+ :confidence => :high
32
32
  elsif input = has_immediate_model?(render_value)
33
33
  warn :result => result,
34
- :warning_type => "Cross Site Scripting",
34
+ :warning_type => "Cross-Site Scripting",
35
35
  :warning_code => :cross_site_scripting_inline,
36
36
  :message => "Unescaped model attribute rendered inline",
37
37
  :user_input => input,
38
- :confidence => CONFIDENCE[:med]
38
+ :confidence => :medium
39
39
  end
40
40
  end
41
41
  end
@@ -13,7 +13,7 @@ class Brakeman::CheckResponseSplitting < Brakeman::BaseCheck
13
13
  warn :warning_type => "Response Splitting",
14
14
  :warning_code => :CVE_2011_3186,
15
15
  :message => "Versions before 2.3.14 have a vulnerability content type handling allowing injection of headers: CVE-2011-3186",
16
- :confidence => CONFIDENCE[:med],
16
+ :confidence => :medium,
17
17
  :gem_info => gemfile_or_environment,
18
18
  :link_path => "https://groups.google.com/d/topic/rubyonrails-security/b_yTveAph2g/discussion"
19
19
  end
@@ -21,7 +21,7 @@ class Brakeman::CheckRouteDoS < Brakeman::BaseCheck
21
21
  warn :warning_type => "Denial of Service",
22
22
  :warning_code => :CVE_2015_7581,
23
23
  :message => message,
24
- :confidence => CONFIDENCE[:med],
24
+ :confidence => :medium,
25
25
  :gem_info => gemfile_or_environment,
26
26
  :link_path => "https://groups.google.com/d/msg/rubyonrails-security/dthJ5wL69JE/YzPnFelbFQAJ"
27
27
  end
@@ -22,10 +22,10 @@ class Brakeman::CheckSafeBufferManipulation < Brakeman::BaseCheck
22
22
 
23
23
  message = "Rails #{rails_version} has a vulnerabilty in SafeBuffer. Upgrade to #{suggested_version} or apply patches."
24
24
 
25
- warn :warning_type => "Cross Site Scripting",
25
+ warn :warning_type => "Cross-Site Scripting",
26
26
  :warning_code => :safe_buffer_vuln,
27
27
  :message => message,
28
- :confidence => CONFIDENCE[:med],
28
+ :confidence => :medium,
29
29
  :gem_info => gemfile_or_environment
30
30
  end
31
31
  end
@@ -46,16 +46,16 @@ class Brakeman::CheckSanitizeMethods < Brakeman::BaseCheck
46
46
  message = "Rails #{rails_version} has a vulnerability in #{method}: upgrade to #{@fix_version} or patch"
47
47
 
48
48
  if include_user_input? result[:call]
49
- confidence = CONFIDENCE[:high]
49
+ confidence = :high
50
50
  else
51
- confidence = CONFIDENCE[:medium]
51
+ confidence = :medium
52
52
  end
53
53
 
54
54
  warn :result => result,
55
- :warning_type => "Cross Site Scripting",
55
+ :warning_type => "Cross-Site Scripting",
56
56
  :warning_code => code,
57
57
  :message => message,
58
- :confidence => CONFIDENCE[:high],
58
+ :confidence => :high,
59
59
  :link_path => link
60
60
  end
61
61
  end
@@ -64,12 +64,12 @@ class Brakeman::CheckSanitizeMethods < Brakeman::BaseCheck
64
64
  message = "rails-html-sanitizer #{tracker.config.gem_version(:'rails-html-sanitizer')} is vulnerable (#{cve}). Upgrade to 1.0.3"
65
65
 
66
66
  if tracker.find_call(:target => false, :method => :sanitize).any?
67
- confidence = CONFIDENCE[:high]
67
+ confidence = :high
68
68
  else
69
- confidence = CONFIDENCE[:med]
69
+ confidence = :medium
70
70
  end
71
71
 
72
- warn :warning_type => "Cross Site Scripting",
72
+ warn :warning_type => "Cross-Site Scripting",
73
73
  :warning_code => cve.tr('-', '_').to_sym,
74
74
  :message => message,
75
75
  :gem_info => gemfile_or_environment,
@@ -25,7 +25,7 @@ class Brakeman::CheckSecrets < Brakeman::BaseCheck
25
25
  warn :warning_code => :secret_in_source,
26
26
  :warning_type => "Authentication",
27
27
  :message => "Hardcoded value for #{name} in source code",
28
- :confidence => CONFIDENCE[:med],
28
+ :confidence => :medium,
29
29
  :file => constant.file,
30
30
  :line => constant.line
31
31
  end
@@ -46,11 +46,11 @@ class Brakeman::CheckSelectTag < Brakeman::BaseCheck
46
46
  return
47
47
  elsif sexp? prompt_option and input = include_user_input?(prompt_option)
48
48
 
49
- warn :warning_type => "Cross Site Scripting",
49
+ warn :warning_type => "Cross-Site Scripting",
50
50
  :warning_code => :CVE_2012_3463,
51
51
  :result => result,
52
52
  :message => @message,
53
- :confidence => CONFIDENCE[:high],
53
+ :confidence => :high,
54
54
  :user_input => input,
55
55
  :link_path => "https://groups.google.com/d/topic/rubyonrails-security/fV3QUToSMSw/discussion"
56
56
  end
@@ -44,13 +44,13 @@ class Brakeman::CheckSelectVulnerability < Brakeman::BaseCheck
44
44
  add_result result
45
45
 
46
46
  if string_interp? third_arg
47
- confidence = CONFIDENCE[:med]
47
+ confidence = :medium
48
48
  else
49
- confidence = CONFIDENCE[:low]
49
+ confidence = :weak
50
50
  end
51
51
 
52
52
  warn :template => result[:location][:template],
53
- :warning_type => "Cross Site Scripting",
53
+ :warning_type => "Cross-Site Scripting",
54
54
  :warning_code => :select_options_vuln,
55
55
  :result => result,
56
56
  :message => @message,
@@ -30,7 +30,7 @@ class Brakeman::CheckSend < Brakeman::BaseCheck
30
30
  :message => "User controlled method execution",
31
31
  :code => result[:call],
32
32
  :user_input => input,
33
- :confidence => CONFIDENCE[:high]
33
+ :confidence => :high
34
34
  end
35
35
  end
36
36
 
@@ -18,9 +18,9 @@ class Brakeman::CheckSessionManipulation < Brakeman::BaseCheck
18
18
 
19
19
  if input = has_immediate_user_input?(index)
20
20
  if params? index
21
- confidence = CONFIDENCE[:high]
21
+ confidence = :high
22
22
  else
23
- confidence = CONFIDENCE[:med]
23
+ confidence = :medium
24
24
  end
25
25
 
26
26
  warn :result => result,
@@ -137,7 +137,7 @@ class Brakeman::CheckSessionSettings < Brakeman::BaseCheck
137
137
  warn :warning_type => "Session Setting",
138
138
  :warning_code => :http_cookies,
139
139
  :message => "Session cookies should be set to HTTP only",
140
- :confidence => CONFIDENCE[:high],
140
+ :confidence => :high,
141
141
  :line => line,
142
142
  :file => file
143
143
 
@@ -147,7 +147,7 @@ class Brakeman::CheckSessionSettings < Brakeman::BaseCheck
147
147
  warn :warning_type => "Session Setting",
148
148
  :warning_code => :session_secret,
149
149
  :message => "Session secret should not be included in version control",
150
- :confidence => CONFIDENCE[:high],
150
+ :confidence => :high,
151
151
  :line => line,
152
152
  :file => file
153
153
  end
@@ -156,7 +156,7 @@ class Brakeman::CheckSessionSettings < Brakeman::BaseCheck
156
156
  warn :warning_type => "Session Setting",
157
157
  :warning_code => :secure_cookies,
158
158
  :message => "Session cookie should be set to secure only",
159
- :confidence => CONFIDENCE[:high],
159
+ :confidence => :high,
160
160
  :line => line,
161
161
  :file => file
162
162
  end