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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +0 -5
- data/lib/sqreen/actions.rb +11 -337
- data/lib/sqreen/actions/base.rb +110 -0
- data/lib/sqreen/actions/block_ip.rb +32 -0
- data/lib/sqreen/actions/block_user.rb +44 -0
- data/lib/sqreen/actions/ip_range_indexed_action_class.rb +36 -0
- data/lib/sqreen/actions/ip_ranges_index.rb +36 -0
- data/lib/sqreen/actions/redirect_ip.rb +40 -0
- data/lib/sqreen/actions/redirect_user.rb +45 -0
- data/lib/sqreen/actions/repository.rb +24 -0
- data/lib/sqreen/actions/unknown_action_type.rb +16 -0
- data/lib/sqreen/actions/user_action_class.rb +41 -0
- data/lib/sqreen/agent.rb +4 -1
- data/lib/sqreen/attack_blocked.rb +17 -0
- data/lib/sqreen/binding_accessor.rb +9 -102
- data/lib/sqreen/binding_accessor/path_elem.rb +8 -0
- data/lib/sqreen/binding_accessor/transforms.rb +107 -0
- data/lib/sqreen/capped_queue.rb +2 -0
- data/lib/sqreen/{callbacks.rb → cb.rb} +1 -53
- data/lib/sqreen/{callback_tree.rb → cb_tree.rb} +2 -2
- data/lib/sqreen/condition_evaluator.rb +22 -5
- data/lib/sqreen/configuration.rb +3 -0
- data/lib/sqreen/default_cb.rb +20 -0
- data/lib/sqreen/deferred_logger.rb +63 -0
- data/lib/sqreen/deliveries.rb +10 -0
- data/lib/sqreen/deliveries/batch.rb +7 -1
- data/lib/sqreen/deliveries/simple.rb +5 -0
- data/lib/sqreen/dependency/rails.rb +4 -0
- data/lib/sqreen/dependency/sinatra.rb +4 -0
- data/lib/sqreen/error_handling_middleware.rb +30 -0
- data/lib/sqreen/event.rb +2 -0
- data/lib/sqreen/events/attack.rb +2 -0
- data/lib/sqreen/events/request_record.rb +11 -56
- data/lib/sqreen/exception.rb +9 -40
- data/lib/sqreen/formatter_with_tid.rb +45 -0
- data/lib/sqreen/framework_cb.rb +28 -0
- data/lib/sqreen/frameworks.rb +7 -0
- data/lib/sqreen/frameworks/generic.rb +5 -1
- data/lib/sqreen/frameworks/rails.rb +2 -0
- data/lib/sqreen/frameworks/request_recorder.rb +3 -0
- data/lib/sqreen/frameworks/sinatra.rb +2 -0
- data/lib/sqreen/frameworks/sqreen_test.rb +2 -0
- data/lib/sqreen/instrumentation.rb +5 -5
- data/lib/sqreen/invalid_signature_exception.rb +8 -0
- data/lib/{sqreen-alt.rb → sqreen/js.rb} +6 -1
- data/lib/sqreen/js/call_context.rb +10 -0
- data/lib/sqreen/js/context_pool.rb +60 -0
- data/lib/sqreen/js/exec_js_runnable.rb +20 -0
- data/lib/sqreen/js/execjs_adapter.rb +6 -47
- data/lib/sqreen/js/executable_js.rb +12 -0
- data/lib/sqreen/js/js_service.rb +2 -22
- data/lib/sqreen/js/js_service_adapter.rb +18 -0
- data/lib/sqreen/js/mini_racer_adapter.rb +6 -180
- data/lib/sqreen/js/mini_racer_executable_js.rb +142 -0
- data/lib/sqreen/js/thread_local_exec_js_runnable.rb +47 -0
- data/lib/sqreen/log.rb +8 -188
- data/lib/sqreen/logger.rb +83 -0
- data/lib/sqreen/metrics_store.rb +3 -11
- data/lib/sqreen/metrics_store/already_registered_metric.rb +11 -0
- data/lib/sqreen/metrics_store/unknown_metric.rb +11 -0
- data/lib/sqreen/metrics_store/unregistered_metric.rb +11 -0
- data/lib/sqreen/middleware.rb +0 -44
- data/lib/sqreen/mono_time.rb +2 -0
- data/lib/sqreen/node.rb +44 -0
- data/lib/sqreen/not_implemented_yet.rb +8 -0
- data/lib/sqreen/null_logger.rb +24 -0
- data/lib/sqreen/payload_creator.rb +2 -19
- data/lib/sqreen/payload_creator/header_section.rb +28 -0
- data/lib/sqreen/prefix.rb +33 -0
- data/lib/sqreen/rails_middleware.rb +14 -0
- data/lib/sqreen/remote_command.rb +1 -8
- data/lib/sqreen/remote_command/failure_output.rb +11 -0
- data/lib/sqreen/rules.rb +32 -2
- data/lib/sqreen/{rule_attributes.rb → rules/attrs.rb} +0 -0
- data/lib/sqreen/{rules_callbacks/sdk_auth_track.rb → rules/auth_track_cb.rb} +2 -2
- data/lib/sqreen/{rules_callbacks/binding_accessor_matcher.rb → rules/binding_accessor_matcher_cb.rb} +4 -8
- data/lib/sqreen/{rules_callbacks → rules}/binding_accessor_metrics.rb +1 -1
- data/lib/sqreen/{rules_callbacks/blacklist_ips.rb → rules/blacklist_ips_cb.rb} +3 -2
- data/lib/sqreen/{rules_callbacks → rules}/count_http_codes.rb +2 -2
- data/lib/sqreen/{rules_callbacks/crawler_user_agent_matches.rb → rules/crawler_user_agent_matches_cb.rb} +1 -1
- data/lib/sqreen/{rules_callbacks/crawler_user_agent_matches_metrics.rb → rules/crawler_user_agent_matches_metrics_cb.rb} +1 -1
- data/lib/sqreen/{rules_callbacks/custom_error.rb → rules/custom_error_cb.rb} +1 -1
- data/lib/sqreen/{rules_callbacks/devise_auth_track.rb → rules/devise_auth_track_cb.rb} +2 -2
- data/lib/sqreen/{rules_callbacks/devise_signup_track.rb → rules/devise_signup_track_cb.rb} +2 -2
- data/lib/sqreen/{rules_callbacks/execjs.rb → rules/execjs_cb.rb} +49 -50
- data/lib/sqreen/{rules_callbacks/headers_insert.rb → rules/headers_insert_cb.rb} +1 -1
- data/lib/sqreen/{rules_callbacks → rules}/matcher_rule.rb +2 -2
- data/lib/sqreen/{rules_callbacks/not_found.rb → rules/not_found_cb.rb} +2 -2
- data/lib/sqreen/{rules_callbacks/rails_parameters.rb → rules/rails_parameters_cb.rb} +1 -1
- data/lib/sqreen/{rules_callbacks → rules}/record_request_context.rb +1 -1
- data/lib/sqreen/{rules_callbacks/regexp_rule.rb → rules/regexp_rule_cb.rb} +1 -1
- data/lib/sqreen/{rule_callback.rb → rules/rule_cb.rb} +2 -2
- data/lib/sqreen/{rules_callbacks → rules}/run_req_start_actions.rb +4 -2
- data/lib/sqreen/{rules_callbacks → rules}/run_user_actions.rb +1 -1
- data/lib/sqreen/{rules_callbacks/shell_env.rb → rules/shell_env_cb.rb} +1 -1
- data/lib/sqreen/{rules_callbacks/sdk_signup_track.rb → rules/signup_track_cb.rb} +2 -2
- data/lib/sqreen/{rules_callbacks → rules}/update_request_context.rb +1 -1
- data/lib/sqreen/{rules_callbacks/url_matches.rb → rules/url_matches_cb.rb} +1 -1
- data/lib/sqreen/{rules_callbacks/user_agent_matches.rb → rules/user_agent_matches_cb.rb} +1 -1
- data/lib/sqreen/{rules_callbacks/waf.rb → rules/waf_cb.rb} +7 -3
- data/lib/sqreen/{rules_callbacks/reflected_xss.rb → rules/xss_cb.rb} +10 -7
- data/lib/sqreen/run_when_called_cb.rb +21 -0
- data/lib/sqreen/sensitive_data_redactor.rb +111 -0
- data/lib/sqreen/signature_verifier.rb +20 -0
- data/lib/sqreen/sinatra_middleware.rb +14 -0
- data/lib/sqreen/{rules_signature.rb → sqreen_signed_verifier.rb} +5 -17
- data/lib/sqreen/token_invalid_exception.rb +8 -0
- data/lib/sqreen/token_not_found_exception.rb +9 -0
- data/lib/sqreen/trie.rb +3 -64
- data/lib/sqreen/unauthorized.rb +8 -0
- data/lib/sqreen/util.rb +2 -0
- data/lib/sqreen/util/capped_array.rb +30 -0
- data/lib/sqreen/util/capped_hash.rb +36 -0
- data/lib/sqreen/util/capped_string.rb +22 -0
- data/lib/sqreen/util/capper.rb +57 -0
- data/lib/sqreen/version.rb +1 -1
- data/lib/sqreen/waf_error.rb +18 -0
- metadata +85 -36
- data/lib/sqreen/rules_callbacks.rb +0 -36
- data/lib/sqreen/rules_callbacks/inspect_rule.rb +0 -25
@@ -0,0 +1,9 @@
|
|
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/exception'
|
5
|
+
|
6
|
+
module Sqreen
|
7
|
+
# When the token is not found
|
8
|
+
class TokenNotFoundException < Sqreen::Exception; end
|
9
|
+
end
|
data/lib/sqreen/trie.rb
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'ipaddr'
|
5
|
+
require 'sqreen/node'
|
6
|
+
|
7
|
+
# TODO: move to Sqreen::IP
|
5
8
|
|
6
9
|
module Sqreen
|
7
10
|
Trie = Struct.new(:head, :num_active_nodes, :family) do
|
@@ -211,68 +214,4 @@ module Sqreen
|
|
211
214
|
xstack
|
212
215
|
end
|
213
216
|
end
|
214
|
-
|
215
|
-
Prefix = Struct.new(:family, :bitlen, :address, :data) do # addr is integer
|
216
|
-
def initialize(*args)
|
217
|
-
super
|
218
|
-
raise ArgumentError, 'no family given' unless family
|
219
|
-
raise ArgumentError, 'no bitlen given' unless bitlen
|
220
|
-
raise ArgumentError, 'no address given' unless address
|
221
|
-
end
|
222
|
-
|
223
|
-
def matches?(addr, family)
|
224
|
-
raise 'family mismatch' unless family == self.family
|
225
|
-
shift_amount = (family == Socket::AF_INET ? 32 : 128) - self.bitlen
|
226
|
-
(addr ^ self.address) >> shift_amount == 0
|
227
|
-
end
|
228
|
-
end
|
229
|
-
|
230
|
-
def Prefix.from_str(str, data = nil)
|
231
|
-
ip_addr = IPAddr.new(str)
|
232
|
-
if str =~ /\/(\d+)$/
|
233
|
-
bitlen = $~[1].to_i
|
234
|
-
else
|
235
|
-
bitlen = ip_addr.family == Socket::AF_INET6 ? 128 : 32
|
236
|
-
end
|
237
|
-
Prefix.new(ip_addr.family, bitlen, ip_addr.to_i, data)
|
238
|
-
end
|
239
|
-
|
240
|
-
# bit starts at 0 (most significant)
|
241
|
-
Node = Struct.new(:bit, :prefix, :l, :r, :parent) do
|
242
|
-
def initialize(*args)
|
243
|
-
super
|
244
|
-
raise ArgumentError, 'no bit given' if bit.nil?
|
245
|
-
end
|
246
|
-
|
247
|
-
def empty?
|
248
|
-
prefix.nil?
|
249
|
-
end
|
250
|
-
|
251
|
-
# cover the whole tree
|
252
|
-
def walk(max_bits, empty_nodes = false)
|
253
|
-
xstack = Array.new(max_bits + 1)
|
254
|
-
sidx = 0 # stack index
|
255
|
-
xhead = self
|
256
|
-
xcur = xhead
|
257
|
-
while !xcur.nil?
|
258
|
-
yield xcur unless xcur.empty? && !empty_nodes
|
259
|
-
|
260
|
-
if xcur.l
|
261
|
-
if xcur.r
|
262
|
-
xstack[sidx] = xcur.r
|
263
|
-
sidx += 1
|
264
|
-
end
|
265
|
-
xcur = xcur.l
|
266
|
-
elsif xcur.r
|
267
|
-
xcur = xcur.r
|
268
|
-
elsif sidx.nonzero?
|
269
|
-
sidx -= 1
|
270
|
-
xcur = xstack[sidx]
|
271
|
-
else
|
272
|
-
xcur = nil
|
273
|
-
end
|
274
|
-
end
|
275
|
-
end
|
276
|
-
end
|
277
|
-
|
278
217
|
end
|
data/lib/sqreen/util.rb
ADDED
@@ -0,0 +1,30 @@
|
|
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/util'
|
5
|
+
|
6
|
+
class Sqreen::Util::CappedArray < Array
|
7
|
+
attr_reader :size_cap, :depth_cap
|
8
|
+
|
9
|
+
def initialize(*args, size_cap: 150, depth_cap: 10, &block)
|
10
|
+
@size_cap = size_cap
|
11
|
+
@depth_cap = depth_cap
|
12
|
+
|
13
|
+
super(*args, &block)
|
14
|
+
end
|
15
|
+
|
16
|
+
def <<(value)
|
17
|
+
keep?(size, value) ? super : self
|
18
|
+
end
|
19
|
+
alias_method :append, :<<
|
20
|
+
|
21
|
+
def []=(index, value)
|
22
|
+
super if keep?(index, value)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def keep?(index, value)
|
28
|
+
index < size_cap && (depth_cap > 0 || !value.is_a?(Hash) && !value.is_a?(Array))
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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/util'
|
5
|
+
|
6
|
+
class Sqreen::Util::CappedHash < Hash
|
7
|
+
attr_reader :size_cap, :depth_cap
|
8
|
+
|
9
|
+
def initialize(*args, size_cap: 150, depth_cap: 10, &block)
|
10
|
+
@size_cap = size_cap
|
11
|
+
@depth_cap = depth_cap
|
12
|
+
|
13
|
+
super(*args, &block)
|
14
|
+
end
|
15
|
+
|
16
|
+
def []=(key, value)
|
17
|
+
super if key?(key) || keep?(value)
|
18
|
+
end
|
19
|
+
alias_method :store, :[]=
|
20
|
+
|
21
|
+
def merge!(h)
|
22
|
+
h.each { |k, v| self[k] = block_given? ? yield(k, self[k], v) : v }
|
23
|
+
end
|
24
|
+
alias_method :update, :merge!
|
25
|
+
|
26
|
+
def replace(h)
|
27
|
+
keep_if { false }
|
28
|
+
merge!(h)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def keep?(value)
|
34
|
+
size < size_cap && (depth_cap > 0 || !value.is_a?(Hash) && !value.is_a?(Array))
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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/util'
|
5
|
+
|
6
|
+
class Sqreen::Util::CappedString < String
|
7
|
+
attr_reader :size_cap
|
8
|
+
|
9
|
+
def initialize(*args, size_cap: 4096, &block)
|
10
|
+
@size_cap = size_cap
|
11
|
+
super(*args, &block)
|
12
|
+
end
|
13
|
+
|
14
|
+
def <<(value)
|
15
|
+
return self unless size < size_cap
|
16
|
+
|
17
|
+
value = value[0, size_cap - size] if size + value.size > size_cap
|
18
|
+
|
19
|
+
super(value)
|
20
|
+
end
|
21
|
+
alias_method :concat, :<<
|
22
|
+
end
|
@@ -0,0 +1,57 @@
|
|
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/util'
|
5
|
+
require 'sqreen/util/capped_hash'
|
6
|
+
require 'sqreen/util/capped_string'
|
7
|
+
require 'sqreen/util/capped_array'
|
8
|
+
|
9
|
+
class Sqreen::Util::Capper
|
10
|
+
attr_reader :string_size_cap, :size_cap, :depth_cap
|
11
|
+
|
12
|
+
def initialize(string_size_cap: 4096, size_cap: 150, depth_cap: 10, flat_size_cap: 10000)
|
13
|
+
@string_size_cap = string_size_cap
|
14
|
+
@size_cap = size_cap
|
15
|
+
@depth_cap = depth_cap
|
16
|
+
@flat_size_cap = flat_size_cap
|
17
|
+
end
|
18
|
+
|
19
|
+
def call(e)
|
20
|
+
r_call(e).first
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def r_call(e, size: @flat_size_cap, depth: @depth_cap)
|
26
|
+
case e
|
27
|
+
when Hash
|
28
|
+
h = Sqreen::Util::CappedHash.new(size_cap: size_cap, depth_cap: depth)
|
29
|
+
e.each do |k, v|
|
30
|
+
break unless size > 0
|
31
|
+
k_capped, = r_call(k, size: size, depth: depth - 1)
|
32
|
+
v_capped, s = r_call(v, size: size, depth: depth - 1)
|
33
|
+
size -= s
|
34
|
+
h[k_capped] = v_capped
|
35
|
+
end
|
36
|
+
[h, h.size]
|
37
|
+
when Array
|
38
|
+
a = Sqreen::Util::CappedArray.new(size_cap: size_cap, depth_cap: depth)
|
39
|
+
e.each do |v|
|
40
|
+
break unless size > 0
|
41
|
+
c, s = r_call(v, size: size, depth: depth - 1)
|
42
|
+
a << c
|
43
|
+
size -= s
|
44
|
+
end
|
45
|
+
[a, a.size]
|
46
|
+
when String
|
47
|
+
return unless size > 0
|
48
|
+
size -= 1
|
49
|
+
s = Sqreen::Util::CappedString.new(size_cap: string_size_cap) << e
|
50
|
+
[s, 1]
|
51
|
+
else
|
52
|
+
return unless size > 0
|
53
|
+
size -= 1
|
54
|
+
[e, 1]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/sqreen/version.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
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/exception'
|
5
|
+
|
6
|
+
module Sqreen
|
7
|
+
class WAFError < Sqreen::Exception
|
8
|
+
attr_reader :rule_name, :error, :data, :args
|
9
|
+
|
10
|
+
def initialize(rule_name, error, data = nil, args = nil)
|
11
|
+
super(error.to_s)
|
12
|
+
@rule_name = rule_name
|
13
|
+
@error = error
|
14
|
+
@data = data
|
15
|
+
@args = args
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqreen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.3.
|
4
|
+
version: 1.18.3.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sqreen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sq_mini_racer
|
@@ -49,23 +49,38 @@ files:
|
|
49
49
|
- CODE_OF_CONDUCT.md
|
50
50
|
- README.md
|
51
51
|
- Rakefile
|
52
|
-
- lib/sqreen-alt.rb
|
53
52
|
- lib/sqreen.rb
|
54
53
|
- lib/sqreen/actions.rb
|
54
|
+
- lib/sqreen/actions/base.rb
|
55
|
+
- lib/sqreen/actions/block_ip.rb
|
56
|
+
- lib/sqreen/actions/block_user.rb
|
57
|
+
- lib/sqreen/actions/ip_range_indexed_action_class.rb
|
58
|
+
- lib/sqreen/actions/ip_ranges_index.rb
|
59
|
+
- lib/sqreen/actions/redirect_ip.rb
|
60
|
+
- lib/sqreen/actions/redirect_user.rb
|
61
|
+
- lib/sqreen/actions/repository.rb
|
62
|
+
- lib/sqreen/actions/unknown_action_type.rb
|
63
|
+
- lib/sqreen/actions/user_action_class.rb
|
55
64
|
- lib/sqreen/agent.rb
|
65
|
+
- lib/sqreen/attack_blocked.rb
|
56
66
|
- lib/sqreen/attack_detected.html
|
57
67
|
- lib/sqreen/backport.rb
|
58
68
|
- lib/sqreen/backport/original_name.rb
|
59
69
|
- lib/sqreen/binding_accessor.rb
|
70
|
+
- lib/sqreen/binding_accessor/path_elem.rb
|
71
|
+
- lib/sqreen/binding_accessor/transforms.rb
|
60
72
|
- lib/sqreen/ca.crt
|
61
73
|
- lib/sqreen/call_countable.rb
|
62
|
-
- lib/sqreen/callback_tree.rb
|
63
|
-
- lib/sqreen/callbacks.rb
|
64
74
|
- lib/sqreen/capped_queue.rb
|
75
|
+
- lib/sqreen/cb.rb
|
76
|
+
- lib/sqreen/cb_tree.rb
|
65
77
|
- lib/sqreen/condition_evaluator.rb
|
66
78
|
- lib/sqreen/conditionable.rb
|
67
79
|
- lib/sqreen/configuration.rb
|
68
80
|
- lib/sqreen/context.rb
|
81
|
+
- lib/sqreen/default_cb.rb
|
82
|
+
- lib/sqreen/deferred_logger.rb
|
83
|
+
- lib/sqreen/deliveries.rb
|
69
84
|
- lib/sqreen/deliveries/batch.rb
|
70
85
|
- lib/sqreen/deliveries/simple.rb
|
71
86
|
- lib/sqreen/dependency.rb
|
@@ -79,11 +94,14 @@ files:
|
|
79
94
|
- lib/sqreen/dependency/sentry.rb
|
80
95
|
- lib/sqreen/dependency/sinatra.rb
|
81
96
|
- lib/sqreen/encoding_sanitizer.rb
|
97
|
+
- lib/sqreen/error_handling_middleware.rb
|
82
98
|
- lib/sqreen/event.rb
|
83
99
|
- lib/sqreen/events/attack.rb
|
84
100
|
- lib/sqreen/events/remote_exception.rb
|
85
101
|
- lib/sqreen/events/request_record.rb
|
86
102
|
- lib/sqreen/exception.rb
|
103
|
+
- lib/sqreen/formatter_with_tid.rb
|
104
|
+
- lib/sqreen/framework_cb.rb
|
87
105
|
- lib/sqreen/frameworks.rb
|
88
106
|
- lib/sqreen/frameworks/generic.rb
|
89
107
|
- lib/sqreen/frameworks/rails.rb
|
@@ -92,10 +110,20 @@ files:
|
|
92
110
|
- lib/sqreen/frameworks/sinatra.rb
|
93
111
|
- lib/sqreen/frameworks/sqreen_test.rb
|
94
112
|
- lib/sqreen/instrumentation.rb
|
113
|
+
- lib/sqreen/invalid_signature_exception.rb
|
114
|
+
- lib/sqreen/js.rb
|
115
|
+
- lib/sqreen/js/call_context.rb
|
116
|
+
- lib/sqreen/js/context_pool.rb
|
117
|
+
- lib/sqreen/js/exec_js_runnable.rb
|
95
118
|
- lib/sqreen/js/execjs_adapter.rb
|
119
|
+
- lib/sqreen/js/executable_js.rb
|
96
120
|
- lib/sqreen/js/js_service.rb
|
121
|
+
- lib/sqreen/js/js_service_adapter.rb
|
97
122
|
- lib/sqreen/js/mini_racer_adapter.rb
|
123
|
+
- lib/sqreen/js/mini_racer_executable_js.rb
|
124
|
+
- lib/sqreen/js/thread_local_exec_js_runnable.rb
|
98
125
|
- lib/sqreen/log.rb
|
126
|
+
- lib/sqreen/logger.rb
|
99
127
|
- lib/sqreen/metrics.rb
|
100
128
|
- lib/sqreen/metrics/average.rb
|
101
129
|
- lib/sqreen/metrics/base.rb
|
@@ -103,58 +131,79 @@ files:
|
|
103
131
|
- lib/sqreen/metrics/collect.rb
|
104
132
|
- lib/sqreen/metrics/sum.rb
|
105
133
|
- lib/sqreen/metrics_store.rb
|
134
|
+
- lib/sqreen/metrics_store/already_registered_metric.rb
|
135
|
+
- lib/sqreen/metrics_store/unknown_metric.rb
|
136
|
+
- lib/sqreen/metrics_store/unregistered_metric.rb
|
106
137
|
- lib/sqreen/middleware.rb
|
107
138
|
- lib/sqreen/mono_time.rb
|
139
|
+
- lib/sqreen/node.rb
|
140
|
+
- lib/sqreen/not_implemented_yet.rb
|
141
|
+
- lib/sqreen/null_logger.rb
|
108
142
|
- lib/sqreen/payload_creator.rb
|
143
|
+
- lib/sqreen/payload_creator/header_section.rb
|
109
144
|
- lib/sqreen/performance_notifications.rb
|
110
145
|
- lib/sqreen/performance_notifications/binned_metrics.rb
|
111
146
|
- lib/sqreen/performance_notifications/log.rb
|
112
147
|
- lib/sqreen/performance_notifications/log_performance.rb
|
113
148
|
- lib/sqreen/performance_notifications/metrics.rb
|
114
149
|
- lib/sqreen/performance_notifications/newrelic.rb
|
150
|
+
- lib/sqreen/prefix.rb
|
151
|
+
- lib/sqreen/rails_middleware.rb
|
115
152
|
- lib/sqreen/remote_command.rb
|
116
|
-
- lib/sqreen/
|
117
|
-
- lib/sqreen/rule_callback.rb
|
153
|
+
- lib/sqreen/remote_command/failure_output.rb
|
118
154
|
- lib/sqreen/rules.rb
|
119
|
-
- lib/sqreen/
|
120
|
-
- lib/sqreen/
|
121
|
-
- lib/sqreen/
|
122
|
-
- lib/sqreen/
|
123
|
-
- lib/sqreen/
|
124
|
-
- lib/sqreen/
|
125
|
-
- lib/sqreen/
|
126
|
-
- lib/sqreen/
|
127
|
-
- lib/sqreen/
|
128
|
-
- lib/sqreen/
|
129
|
-
- lib/sqreen/
|
130
|
-
- lib/sqreen/
|
131
|
-
- lib/sqreen/
|
132
|
-
- lib/sqreen/
|
133
|
-
- lib/sqreen/
|
134
|
-
- lib/sqreen/
|
135
|
-
- lib/sqreen/
|
136
|
-
- lib/sqreen/
|
137
|
-
- lib/sqreen/
|
138
|
-
- lib/sqreen/
|
139
|
-
- lib/sqreen/
|
140
|
-
- lib/sqreen/
|
141
|
-
- lib/sqreen/
|
142
|
-
- lib/sqreen/
|
143
|
-
- lib/sqreen/
|
144
|
-
- lib/sqreen/
|
145
|
-
- lib/sqreen/
|
146
|
-
- lib/sqreen/
|
147
|
-
- lib/sqreen/
|
155
|
+
- lib/sqreen/rules/attrs.rb
|
156
|
+
- lib/sqreen/rules/auth_track_cb.rb
|
157
|
+
- lib/sqreen/rules/binding_accessor_matcher_cb.rb
|
158
|
+
- lib/sqreen/rules/binding_accessor_metrics.rb
|
159
|
+
- lib/sqreen/rules/blacklist_ips_cb.rb
|
160
|
+
- lib/sqreen/rules/count_http_codes.rb
|
161
|
+
- lib/sqreen/rules/crawler_user_agent_matches_cb.rb
|
162
|
+
- lib/sqreen/rules/crawler_user_agent_matches_metrics_cb.rb
|
163
|
+
- lib/sqreen/rules/custom_error_cb.rb
|
164
|
+
- lib/sqreen/rules/devise_auth_track_cb.rb
|
165
|
+
- lib/sqreen/rules/devise_signup_track_cb.rb
|
166
|
+
- lib/sqreen/rules/execjs_cb.rb
|
167
|
+
- lib/sqreen/rules/headers_insert_cb.rb
|
168
|
+
- lib/sqreen/rules/matcher_rule.rb
|
169
|
+
- lib/sqreen/rules/not_found_cb.rb
|
170
|
+
- lib/sqreen/rules/rails_parameters_cb.rb
|
171
|
+
- lib/sqreen/rules/record_request_context.rb
|
172
|
+
- lib/sqreen/rules/regexp_rule_cb.rb
|
173
|
+
- lib/sqreen/rules/rule_cb.rb
|
174
|
+
- lib/sqreen/rules/run_req_start_actions.rb
|
175
|
+
- lib/sqreen/rules/run_user_actions.rb
|
176
|
+
- lib/sqreen/rules/shell_env_cb.rb
|
177
|
+
- lib/sqreen/rules/signup_track_cb.rb
|
178
|
+
- lib/sqreen/rules/update_request_context.rb
|
179
|
+
- lib/sqreen/rules/url_matches_cb.rb
|
180
|
+
- lib/sqreen/rules/user_agent_matches_cb.rb
|
181
|
+
- lib/sqreen/rules/waf_cb.rb
|
182
|
+
- lib/sqreen/rules/xss_cb.rb
|
183
|
+
- lib/sqreen/run_when_called_cb.rb
|
148
184
|
- lib/sqreen/runner.rb
|
149
185
|
- lib/sqreen/runtime_infos.rb
|
150
186
|
- lib/sqreen/safe_json.rb
|
151
187
|
- lib/sqreen/sdk.rb
|
188
|
+
- lib/sqreen/sensitive_data_redactor.rb
|
152
189
|
- lib/sqreen/serializer.rb
|
153
190
|
- lib/sqreen/session.rb
|
154
191
|
- lib/sqreen/shared_storage.rb
|
155
192
|
- lib/sqreen/shared_storage23.rb
|
193
|
+
- lib/sqreen/signature_verifier.rb
|
194
|
+
- lib/sqreen/sinatra_middleware.rb
|
195
|
+
- lib/sqreen/sqreen_signed_verifier.rb
|
196
|
+
- lib/sqreen/token_invalid_exception.rb
|
197
|
+
- lib/sqreen/token_not_found_exception.rb
|
156
198
|
- lib/sqreen/trie.rb
|
199
|
+
- lib/sqreen/unauthorized.rb
|
200
|
+
- lib/sqreen/util.rb
|
201
|
+
- lib/sqreen/util/capped_array.rb
|
202
|
+
- lib/sqreen/util/capped_hash.rb
|
203
|
+
- lib/sqreen/util/capped_string.rb
|
204
|
+
- lib/sqreen/util/capper.rb
|
157
205
|
- lib/sqreen/version.rb
|
206
|
+
- lib/sqreen/waf_error.rb
|
158
207
|
- lib/sqreen/web_server.rb
|
159
208
|
- lib/sqreen/web_server/generic.rb
|
160
209
|
- lib/sqreen/web_server/passenger.rb
|