sqreen 1.18.3.beta1 → 1.18.3.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +0 -5
  3. data/lib/sqreen/actions.rb +11 -337
  4. data/lib/sqreen/actions/base.rb +110 -0
  5. data/lib/sqreen/actions/block_ip.rb +32 -0
  6. data/lib/sqreen/actions/block_user.rb +44 -0
  7. data/lib/sqreen/actions/ip_range_indexed_action_class.rb +36 -0
  8. data/lib/sqreen/actions/ip_ranges_index.rb +36 -0
  9. data/lib/sqreen/actions/redirect_ip.rb +40 -0
  10. data/lib/sqreen/actions/redirect_user.rb +45 -0
  11. data/lib/sqreen/actions/repository.rb +24 -0
  12. data/lib/sqreen/actions/unknown_action_type.rb +16 -0
  13. data/lib/sqreen/actions/user_action_class.rb +41 -0
  14. data/lib/sqreen/agent.rb +4 -1
  15. data/lib/sqreen/attack_blocked.rb +17 -0
  16. data/lib/sqreen/binding_accessor.rb +9 -102
  17. data/lib/sqreen/binding_accessor/path_elem.rb +8 -0
  18. data/lib/sqreen/binding_accessor/transforms.rb +107 -0
  19. data/lib/sqreen/capped_queue.rb +2 -0
  20. data/lib/sqreen/{callbacks.rb → cb.rb} +1 -53
  21. data/lib/sqreen/{callback_tree.rb → cb_tree.rb} +2 -2
  22. data/lib/sqreen/condition_evaluator.rb +22 -5
  23. data/lib/sqreen/configuration.rb +3 -0
  24. data/lib/sqreen/default_cb.rb +20 -0
  25. data/lib/sqreen/deferred_logger.rb +63 -0
  26. data/lib/sqreen/deliveries.rb +10 -0
  27. data/lib/sqreen/deliveries/batch.rb +7 -1
  28. data/lib/sqreen/deliveries/simple.rb +5 -0
  29. data/lib/sqreen/dependency/rails.rb +4 -0
  30. data/lib/sqreen/dependency/sinatra.rb +4 -0
  31. data/lib/sqreen/error_handling_middleware.rb +30 -0
  32. data/lib/sqreen/event.rb +2 -0
  33. data/lib/sqreen/events/attack.rb +2 -0
  34. data/lib/sqreen/events/request_record.rb +11 -56
  35. data/lib/sqreen/exception.rb +9 -40
  36. data/lib/sqreen/formatter_with_tid.rb +45 -0
  37. data/lib/sqreen/framework_cb.rb +28 -0
  38. data/lib/sqreen/frameworks.rb +7 -0
  39. data/lib/sqreen/frameworks/generic.rb +5 -1
  40. data/lib/sqreen/frameworks/rails.rb +2 -0
  41. data/lib/sqreen/frameworks/request_recorder.rb +3 -0
  42. data/lib/sqreen/frameworks/sinatra.rb +2 -0
  43. data/lib/sqreen/frameworks/sqreen_test.rb +2 -0
  44. data/lib/sqreen/instrumentation.rb +5 -5
  45. data/lib/sqreen/invalid_signature_exception.rb +8 -0
  46. data/lib/{sqreen-alt.rb → sqreen/js.rb} +6 -1
  47. data/lib/sqreen/js/call_context.rb +10 -0
  48. data/lib/sqreen/js/context_pool.rb +60 -0
  49. data/lib/sqreen/js/exec_js_runnable.rb +20 -0
  50. data/lib/sqreen/js/execjs_adapter.rb +6 -47
  51. data/lib/sqreen/js/executable_js.rb +12 -0
  52. data/lib/sqreen/js/js_service.rb +2 -22
  53. data/lib/sqreen/js/js_service_adapter.rb +18 -0
  54. data/lib/sqreen/js/mini_racer_adapter.rb +6 -180
  55. data/lib/sqreen/js/mini_racer_executable_js.rb +142 -0
  56. data/lib/sqreen/js/thread_local_exec_js_runnable.rb +47 -0
  57. data/lib/sqreen/log.rb +8 -188
  58. data/lib/sqreen/logger.rb +83 -0
  59. data/lib/sqreen/metrics_store.rb +3 -11
  60. data/lib/sqreen/metrics_store/already_registered_metric.rb +11 -0
  61. data/lib/sqreen/metrics_store/unknown_metric.rb +11 -0
  62. data/lib/sqreen/metrics_store/unregistered_metric.rb +11 -0
  63. data/lib/sqreen/middleware.rb +0 -44
  64. data/lib/sqreen/mono_time.rb +2 -0
  65. data/lib/sqreen/node.rb +44 -0
  66. data/lib/sqreen/not_implemented_yet.rb +8 -0
  67. data/lib/sqreen/null_logger.rb +24 -0
  68. data/lib/sqreen/payload_creator.rb +2 -19
  69. data/lib/sqreen/payload_creator/header_section.rb +28 -0
  70. data/lib/sqreen/prefix.rb +33 -0
  71. data/lib/sqreen/rails_middleware.rb +14 -0
  72. data/lib/sqreen/remote_command.rb +1 -8
  73. data/lib/sqreen/remote_command/failure_output.rb +11 -0
  74. data/lib/sqreen/rules.rb +32 -2
  75. data/lib/sqreen/{rule_attributes.rb → rules/attrs.rb} +0 -0
  76. data/lib/sqreen/{rules_callbacks/sdk_auth_track.rb → rules/auth_track_cb.rb} +2 -2
  77. data/lib/sqreen/{rules_callbacks/binding_accessor_matcher.rb → rules/binding_accessor_matcher_cb.rb} +4 -8
  78. data/lib/sqreen/{rules_callbacks → rules}/binding_accessor_metrics.rb +1 -1
  79. data/lib/sqreen/{rules_callbacks/blacklist_ips.rb → rules/blacklist_ips_cb.rb} +3 -2
  80. data/lib/sqreen/{rules_callbacks → rules}/count_http_codes.rb +2 -2
  81. data/lib/sqreen/{rules_callbacks/crawler_user_agent_matches.rb → rules/crawler_user_agent_matches_cb.rb} +1 -1
  82. data/lib/sqreen/{rules_callbacks/crawler_user_agent_matches_metrics.rb → rules/crawler_user_agent_matches_metrics_cb.rb} +1 -1
  83. data/lib/sqreen/{rules_callbacks/custom_error.rb → rules/custom_error_cb.rb} +1 -1
  84. data/lib/sqreen/{rules_callbacks/devise_auth_track.rb → rules/devise_auth_track_cb.rb} +2 -2
  85. data/lib/sqreen/{rules_callbacks/devise_signup_track.rb → rules/devise_signup_track_cb.rb} +2 -2
  86. data/lib/sqreen/{rules_callbacks/execjs.rb → rules/execjs_cb.rb} +49 -50
  87. data/lib/sqreen/{rules_callbacks/headers_insert.rb → rules/headers_insert_cb.rb} +1 -1
  88. data/lib/sqreen/{rules_callbacks → rules}/matcher_rule.rb +2 -2
  89. data/lib/sqreen/{rules_callbacks/not_found.rb → rules/not_found_cb.rb} +2 -2
  90. data/lib/sqreen/{rules_callbacks/rails_parameters.rb → rules/rails_parameters_cb.rb} +1 -1
  91. data/lib/sqreen/{rules_callbacks → rules}/record_request_context.rb +1 -1
  92. data/lib/sqreen/{rules_callbacks/regexp_rule.rb → rules/regexp_rule_cb.rb} +1 -1
  93. data/lib/sqreen/{rule_callback.rb → rules/rule_cb.rb} +2 -2
  94. data/lib/sqreen/{rules_callbacks → rules}/run_req_start_actions.rb +4 -2
  95. data/lib/sqreen/{rules_callbacks → rules}/run_user_actions.rb +1 -1
  96. data/lib/sqreen/{rules_callbacks/shell_env.rb → rules/shell_env_cb.rb} +1 -1
  97. data/lib/sqreen/{rules_callbacks/sdk_signup_track.rb → rules/signup_track_cb.rb} +2 -2
  98. data/lib/sqreen/{rules_callbacks → rules}/update_request_context.rb +1 -1
  99. data/lib/sqreen/{rules_callbacks/url_matches.rb → rules/url_matches_cb.rb} +1 -1
  100. data/lib/sqreen/{rules_callbacks/user_agent_matches.rb → rules/user_agent_matches_cb.rb} +1 -1
  101. data/lib/sqreen/{rules_callbacks/waf.rb → rules/waf_cb.rb} +7 -3
  102. data/lib/sqreen/{rules_callbacks/reflected_xss.rb → rules/xss_cb.rb} +10 -7
  103. data/lib/sqreen/run_when_called_cb.rb +21 -0
  104. data/lib/sqreen/sensitive_data_redactor.rb +111 -0
  105. data/lib/sqreen/signature_verifier.rb +20 -0
  106. data/lib/sqreen/sinatra_middleware.rb +14 -0
  107. data/lib/sqreen/{rules_signature.rb → sqreen_signed_verifier.rb} +5 -17
  108. data/lib/sqreen/token_invalid_exception.rb +8 -0
  109. data/lib/sqreen/token_not_found_exception.rb +9 -0
  110. data/lib/sqreen/trie.rb +3 -64
  111. data/lib/sqreen/unauthorized.rb +8 -0
  112. data/lib/sqreen/util.rb +2 -0
  113. data/lib/sqreen/util/capped_array.rb +30 -0
  114. data/lib/sqreen/util/capped_hash.rb +36 -0
  115. data/lib/sqreen/util/capped_string.rb +22 -0
  116. data/lib/sqreen/util/capper.rb +57 -0
  117. data/lib/sqreen/version.rb +1 -1
  118. data/lib/sqreen/waf_error.rb +18 -0
  119. metadata +85 -36
  120. data/lib/sqreen/rules_callbacks.rb +0 -36
  121. data/lib/sqreen/rules_callbacks/inspect_rule.rb +0 -25
@@ -0,0 +1,8 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
4
+ module Sqreen
5
+ class BindingAccessor
6
+ PathElem = Struct.new(:kind, :value)
7
+ end
8
+ end
@@ -0,0 +1,107 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
4
+ require 'set'
5
+
6
+ module Sqreen
7
+ class BindingAccessor
8
+ # Available final transformations
9
+ module Transforms
10
+ def flat_keys(value, max_iter = 1000)
11
+ return nil if value.nil?
12
+ seen = Set.new
13
+ look_into = [value]
14
+ keys = []
15
+ idx = 0
16
+ until look_into.empty? || max_iter <= idx
17
+ idx += 1
18
+ val = look_into.pop
19
+ next unless seen.add?(val.object_id)
20
+ case val
21
+ when Hash
22
+ keys.concat(val.keys)
23
+ look_into.concat(val.values)
24
+ when Array
25
+ look_into.concat(val)
26
+ else
27
+ next if val.respond_to?(:seek)
28
+ val.each { |v| look_into << v } if val.respond_to?(:each)
29
+ end
30
+ end
31
+ keys
32
+ end
33
+
34
+ def flat_values(value, max_iter = 1000)
35
+ return nil if value.nil?
36
+ seen = Set.new
37
+ look_into = [value]
38
+ values = []
39
+ idx = 0
40
+ until look_into.empty? || max_iter <= idx
41
+ idx += 1
42
+ val = look_into.shift
43
+ next unless seen.add?(val.object_id)
44
+ case val
45
+ when Hash
46
+ look_into.concat(val.values)
47
+ when Array
48
+ look_into.concat(val)
49
+ else
50
+ next if val.respond_to?(:seek)
51
+ if val.respond_to?(:each)
52
+ val.each { |v| look_into << v }
53
+ else
54
+ values << val
55
+ end
56
+ end
57
+ end
58
+ values
59
+ end
60
+
61
+ def concat_keys_and_values(value, max_size = nil)
62
+ return nil if value.nil?
63
+ values = Set.new
64
+ max_size = max_size.to_i if max_size
65
+ res = ''
66
+ descend(value) do |x|
67
+ next unless values.add?(x)
68
+ x = x.to_s
69
+ return res if max_size && res.size + x.size + 1 > max_size
70
+ res << "\n" unless res.empty?
71
+ res << x
72
+ end
73
+ res
74
+ end
75
+
76
+ private
77
+
78
+ def descend(value, max_iter = 1000)
79
+ seen = Set.new
80
+ look_into = [value]
81
+ idx = 0
82
+ until look_into.empty? || max_iter <= idx
83
+ idx += 1
84
+ val = look_into.pop
85
+
86
+ case val
87
+ when Hash
88
+ next unless seen.add?(val.object_id)
89
+ look_into.concat(val.keys)
90
+ look_into.concat(val.values)
91
+ when Array
92
+ next unless seen.add?(val.object_id)
93
+ look_into.concat(val)
94
+ else
95
+ next if val.respond_to?(:seek)
96
+ if val.respond_to?(:each)
97
+ next unless seen.add?(val.object_id)
98
+ val.each { |v| look_into << v }
99
+ else
100
+ yield val
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -1,6 +1,8 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
+ require 'sqreen/log'
5
+
4
6
  module Sqreen
5
7
  # A simple size limited queue.
6
8
  # When trying to enqueue more than the capacity
@@ -1,12 +1,10 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
- require 'set'
5
- require 'sqreen/shared_storage'
4
+ require 'sqreen/exception'
6
5
  require 'sqreen/log'
7
6
 
8
7
  module Sqreen
9
-
10
8
  class CB
11
9
  # Callback class.
12
10
  #
@@ -87,54 +85,4 @@ module Sqreen
87
85
  nil
88
86
  end
89
87
  end
90
- # target_method, position, callback, callback class
91
-
92
- class DefaultCB < CB
93
- def pre(_inst, args, _budget = nil, &_block)
94
- Sqreen.log.debug "<< #{@klass} #{@method} #{Thread.current}"
95
- Sqreen.log.debug args.join ' '
96
- # log params
97
- end
98
-
99
- def post(_rv, _inst, _args, _budget = nil, &_block)
100
- # log "#{rv}"
101
- Sqreen.log.debug ">> #{@klass} #{@method} #{Thread.current}"
102
- end
103
- end
104
-
105
- class RunWhenCalledCB < CB
106
- def initialize(klass, method, &block)
107
- super(klass, method)
108
-
109
- raise 'missing block' unless block_given?
110
- @block = block
111
- end
112
-
113
- def pre(_inst, _args, _budget = nil, &_block)
114
- # FIXME: implement this removal
115
- @remove_me = true
116
- @block.call
117
- end
118
- end
119
-
120
- # Framework-aware callback
121
- class FrameworkCB < CB
122
- attr_accessor :framework
123
-
124
- def whitelisted?
125
- whitelisted = SharedStorage.get(:whitelisted)
126
- return whitelisted unless whitelisted.nil?
127
- framework && !framework.whitelisted_match.nil?
128
- end
129
-
130
- # Record a metric observation
131
- # @param category [String] Name of the metric observed
132
- # @param key [String] aggregation key
133
- # @param observation [Object] data observed
134
- # @param at [Time] time when observation was made
135
- def record_observation(category, key, observation, at = Time.now.utc)
136
- return unless framework
137
- framework.observe(:observations, [category, key, observation, at], [], false)
138
- end
139
- end
140
88
  end
@@ -31,7 +31,7 @@ module Sqreen
31
31
  methods[1] ||= []
32
32
  add_to_array(methods[1], cb)
33
33
  end
34
- if cb.failing?
34
+ if cb.failing? # rubocop:disable Style/GuardClause
35
35
  methods[2] ||= []
36
36
  add_to_array(methods[2], cb)
37
37
  end
@@ -50,7 +50,7 @@ module Sqreen
50
50
  types[1].delete(cb)
51
51
  types[1] = nil if types[1].empty?
52
52
  end
53
- if cb.failing? && types[2]
53
+ if cb.failing? && types[2] # rubocop:disable Style/GuardClause
54
54
  types[2].delete(cb)
55
55
  types[2] = nil if types[2].empty?
56
56
  end
@@ -179,7 +179,7 @@ module Sqreen
179
179
  return true if exp.empty?
180
180
  raise(Sqreen::Exception, 'too deep call detected') if rem <= 0
181
181
  exp.all? do |op, values|
182
- res = values.map do |v|
182
+ val_to_res = lambda do |v|
183
183
  case v
184
184
  when Hash
185
185
  evaluate_expr(v, rem - 1, *args)
@@ -191,27 +191,42 @@ module Sqreen
191
191
  end
192
192
 
193
193
  arity = OPERATORS_ARITY[op]
194
- if !arity.nil? && res.size != arity
195
- raise(Sqreen::Exception, "bad res #{res} (op #{op} wanted #{arity})")
194
+ if !arity.nil? && values.size != arity
195
+ raise(Sqreen::Exception, "bad arg count #{values.inspect} (op #{op} wanted #{arity})")
196
196
  end
197
197
  bool = case op
198
198
  when OR_OPERATOR
199
- res.any?
199
+ values.reduce(false) do |_, v|
200
+ r = val_to_res.call(v)
201
+ break r if r
202
+ r
203
+ end
200
204
  when AND_OPERATOR
201
- res.all?
205
+ values.reduce(true) do |_, v|
206
+ r = val_to_res.call(v)
207
+ break r unless r
208
+ r
209
+ end
202
210
  when EQ_OPERATOR
211
+ res = values.map(&val_to_res)
203
212
  res[0] == res[1]
204
213
  when NEQ_OPERATOR
214
+ res = values.map(&val_to_res)
205
215
  res[0] != res[1]
206
216
  when GT_OPERATOR
217
+ res = values.map(&val_to_res)
207
218
  res[0] > res[1]
208
219
  when GTE_OPERATOR
220
+ res = values.map(&val_to_res)
209
221
  res[0] >= res[1]
210
222
  when LT_OPERATOR
223
+ res = values.map(&val_to_res)
211
224
  res[0] < res[1]
212
225
  when LTE_OPERATOR
226
+ res = values.map(&val_to_res)
213
227
  res[0] <= res[1]
214
228
  when INC_OPERATOR
229
+ res = values.map(&val_to_res)
215
230
  unless res[0].respond_to?(:include?)
216
231
  raise(Sqreen::Exception, "no include on res #{res[0].inspect}")
217
232
  end
@@ -221,8 +236,10 @@ module Sqreen
221
236
  res[0].include?(res[1])
222
237
  end
223
238
  when HASH_INC_OPERATOR
239
+ res = values.map(&val_to_res)
224
240
  ConditionEvaluator.hash_val_include?(res[0], res[1], res[2])
225
241
  when HASH_KEY_OPERATOR
242
+ res = values.map(&val_to_res)
226
243
  ConditionEvaluator.hash_key_include?(res[0], res[1], res[2])
227
244
  else
228
245
  # FIXME: this should be check in compile
@@ -6,6 +6,9 @@ require 'erb'
6
6
  require 'sqreen/performance_notifications/newrelic'
7
7
 
8
8
  module Sqreen
9
+ # TODO: remove all referecnes to global such as config_get
10
+ # TODO: move within Sqreen::Configuration
11
+
9
12
  @config = nil
10
13
 
11
14
  def self.config_init(framework = nil)
@@ -0,0 +1,20 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
4
+ require 'sqreen/cb'
5
+ require 'sqreen/log'
6
+
7
+ module Sqreen
8
+ class DefaultCB < CB
9
+ def pre(_inst, args, _budget = nil, &_block)
10
+ Sqreen.log.debug "<< #{@klass} #{@method} #{Thread.current}"
11
+ Sqreen.log.debug args.join ' '
12
+ # log params
13
+ end
14
+
15
+ def post(_rv, _inst, _args, _budget = nil, &_block)
16
+ # log "#{rv}"
17
+ Sqreen.log.debug ">> #{@klass} #{@method} #{Thread.current}"
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,63 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
4
+ require 'singleton'
5
+ require 'logger'
6
+ require 'sqreen/logger'
7
+
8
+ module Sqreen
9
+ class DeferredLogger
10
+ include Singleton
11
+
12
+ def initialize
13
+ @buffer = StringIO.new
14
+ @logger = ::Logger.new(@buffer)
15
+ end
16
+
17
+ def debug(msg = nil, &block)
18
+ @logger.debug(msg, &block)
19
+ end
20
+
21
+ def info(msg = nil, &block)
22
+ @logger.info(msg, &block)
23
+ end
24
+
25
+ def warn(msg = nil, &block)
26
+ @logger.warn(msg, &block)
27
+ end
28
+
29
+ def error(msg = nil, &block)
30
+ @logger.error(msg, &block)
31
+ end
32
+
33
+ def fatal(msg = nil, &block)
34
+ @logger.error(msg, &block)
35
+ end
36
+
37
+ def add(severity, msg = nil, &block)
38
+ send(Sqreen::Logger::SEVERITY_TO_METHOD[severity], msg, &block)
39
+ end
40
+
41
+ def formatter=(value)
42
+ @logger.formatter = value
43
+ end
44
+
45
+ def flush_to(logger)
46
+ logger.instance_eval { @logdev }.write(read).tap { reset }
47
+ end
48
+
49
+ private
50
+
51
+ def read
52
+ @buffer.rewind
53
+ @buffer.read
54
+ end
55
+
56
+ def reset
57
+ buffer = StringIO.new
58
+ logger = ::Logger.new(buffer)
59
+ logger.formatter = @logger.formatter
60
+ @buffer, @logger = buffer, logger
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,10 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
4
+ require 'sqreen/deliveries/simple'
5
+ require 'sqreen/deliveries/batch'
6
+
7
+ module Sqreen
8
+ module Deliveries
9
+ end
10
+ end
@@ -1,9 +1,15 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
- require 'sqreen/deliveries/simple'
4
+ # TODO: Sqreen::Attack => sqreen/events
5
+ # TODO: Sqreen::RemoteException => sqreen/events
6
+ # TODO: Sqreen::RequestRecord => sqreen/events
7
+ # TODO: Sqreen.time
8
+
9
+ require 'sqreen/events/attack'
5
10
  require 'sqreen/events/remote_exception'
6
11
  require 'sqreen/mono_time'
12
+ require 'sqreen/deliveries/simple'
7
13
 
8
14
  module Sqreen
9
15
  module Deliveries
@@ -1,6 +1,11 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
+ # TODO: Sqreen::Attack => sqreen/events
5
+ # TODO: Sqreen::RemoteException => sqreen/events
6
+ # TODO: Sqreen::RequestRecord => sqreen/events
7
+
8
+ require 'sqreen/events/attack'
4
9
  require 'sqreen/events/remote_exception'
5
10
  require 'sqreen/events/request_record'
6
11
 
@@ -1,6 +1,10 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
+ require 'sqreen/middleware'
5
+ require 'sqreen/error_handling_middleware'
6
+ require 'sqreen/rails_middleware'
7
+
4
8
  module Sqreen
5
9
  module Dependency
6
10
  module Rails
@@ -1,6 +1,10 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
+ require 'sqreen/middleware'
5
+ require 'sqreen/error_handling_middleware'
6
+ require 'sqreen/sinatra_middleware'
7
+
4
8
  module Sqreen
5
9
  module Dependency
6
10
  module Sinatra