tcell_agent 0.2.29 → 0.4.0

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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/Readme.txt +7 -0
  3. data/bin/tcell_agent +9 -0
  4. data/lib/tcell_agent/agent/policy_manager.rb +3 -0
  5. data/lib/tcell_agent/agent/policy_types.rb +4 -1
  6. data/lib/tcell_agent/appsensor/injections_matcher.rb +20 -0
  7. data/lib/tcell_agent/appsensor/injections_reporter.rb +15 -56
  8. data/lib/tcell_agent/appsensor/meta_data.rb +56 -2
  9. data/lib/tcell_agent/appsensor/rules/baserules.json +371 -138
  10. data/lib/tcell_agent/cmdi.rb +113 -0
  11. data/lib/tcell_agent/config/unknown_options.rb +2 -0
  12. data/lib/tcell_agent/configuration.rb +30 -16
  13. data/lib/tcell_agent/hooks/login_fraud.rb +79 -0
  14. data/lib/tcell_agent/instrumentation.rb +6 -11
  15. data/lib/tcell_agent/patches/meta_data.rb +14 -11
  16. data/lib/tcell_agent/policies/appsensor/injection_sensor.rb +5 -9
  17. data/lib/tcell_agent/policies/appsensor_policy.rb +22 -206
  18. data/lib/tcell_agent/policies/clickjacking_policy.rb +4 -2
  19. data/lib/tcell_agent/policies/command_injection_policy.rb +196 -0
  20. data/lib/tcell_agent/policies/content_security_policy.rb +3 -2
  21. data/lib/tcell_agent/policies/dataloss_policy.rb +3 -1
  22. data/lib/tcell_agent/policies/honeytokens_policy.rb +3 -1
  23. data/lib/tcell_agent/policies/http_redirect_policy.rb +51 -37
  24. data/lib/tcell_agent/policies/http_tx_policy.rb +5 -1
  25. data/lib/tcell_agent/policies/login_fraud_policy.rb +6 -1
  26. data/lib/tcell_agent/policies/patches_policy.rb +3 -1
  27. data/lib/tcell_agent/policies/policy.rb +10 -0
  28. data/lib/tcell_agent/policies/secure_headers_policy.rb +5 -2
  29. data/lib/tcell_agent/rails/auth/devise.rb +12 -23
  30. data/lib/tcell_agent/rails/csrf_exception.rb +1 -1
  31. data/lib/tcell_agent/rails/dlp.rb +50 -54
  32. data/lib/tcell_agent/rails/middleware/body_filter_middleware.rb +0 -1
  33. data/lib/tcell_agent/rails/middleware/context_middleware.rb +0 -1
  34. data/lib/tcell_agent/rails/middleware/global_middleware.rb +0 -1
  35. data/lib/tcell_agent/rails/middleware/headers_middleware.rb +7 -10
  36. data/lib/tcell_agent/rails/on_start.rb +0 -1
  37. data/lib/tcell_agent/rails/tcell_body_proxy.rb +4 -4
  38. data/lib/tcell_agent/rails.rb +0 -2
  39. data/lib/tcell_agent/rust/libtcellagent-0.6.1.dylib +0 -0
  40. data/lib/tcell_agent/rust/libtcellagent-0.6.1.so +0 -0
  41. data/lib/tcell_agent/rust/models.rb +61 -0
  42. data/lib/tcell_agent/rust/tcellagent-0.6.1.dll +0 -0
  43. data/lib/tcell_agent/rust/whisperer.rb +112 -0
  44. data/lib/tcell_agent/sensor_events/appsensor_event.rb +25 -21
  45. data/lib/tcell_agent/sensor_events/appsensor_meta_event.rb +31 -24
  46. data/lib/tcell_agent/sensor_events/command_injection.rb +58 -0
  47. data/lib/tcell_agent/sensor_events/discovery.rb +1 -1
  48. data/lib/tcell_agent/sensor_events/login_fraud.rb +3 -13
  49. data/lib/tcell_agent/sensor_events/sensor.rb +81 -77
  50. data/lib/tcell_agent/sensor_events/util/sanitizer_utilities.rb +8 -0
  51. data/lib/tcell_agent/start_background_thread.rb +12 -3
  52. data/lib/tcell_agent/utils/io.rb +4 -1
  53. data/lib/tcell_agent/utils/params.rb +1 -0
  54. data/lib/tcell_agent/version.rb +1 -1
  55. data/lib/tcell_agent.rb +0 -1
  56. data/spec/lib/tcell_agent/appsensor/injections_matcher_spec.rb +27 -9
  57. data/spec/lib/tcell_agent/appsensor/injections_reporter_spec.rb +143 -193
  58. data/spec/lib/tcell_agent/appsensor/meta_data_spec.rb +67 -0
  59. data/spec/lib/tcell_agent/appsensor/rules/appsensor_rule_manager_spec.rb +0 -10
  60. data/spec/lib/tcell_agent/cmdi_spec.rb +748 -0
  61. data/spec/lib/tcell_agent/config/unknown_options_spec.rb +8 -0
  62. data/spec/lib/tcell_agent/configuration_spec.rb +138 -6
  63. data/spec/lib/tcell_agent/hooks/login_fraud_spec.rb +357 -0
  64. data/spec/lib/tcell_agent/patches/block_rule_spec.rb +70 -87
  65. data/spec/lib/tcell_agent/patches_spec.rb +9 -4
  66. data/spec/lib/tcell_agent/policies/appsensor/xss_sensor_spec.rb +186 -9
  67. data/spec/lib/tcell_agent/policies/appsensor_policy_spec.rb +309 -484
  68. data/spec/lib/tcell_agent/policies/command_injection_policy_spec.rb +736 -0
  69. data/spec/lib/tcell_agent/policies/http_redirect_policy_spec.rb +222 -41
  70. data/spec/lib/tcell_agent/policies/patches_policy_spec.rb +56 -32
  71. data/spec/lib/tcell_agent/rails/middleware/appsensor_middleware_spec.rb +161 -85
  72. data/spec/lib/tcell_agent/rails/middleware/tcell_body_proxy_spec.rb +40 -72
  73. data/spec/lib/tcell_agent/rust/whisperer_spec.rb +267 -0
  74. data/spec/lib/tcell_agent/sensor_events/appsensor_meta_event_spec.rb +20 -15
  75. data/spec/spec_helper.rb +0 -9
  76. data/tcell_agent.gemspec +8 -3
  77. metadata +40 -39
  78. data/lib/tcell_agent/appsensor/sensor.rb +0 -52
  79. data/lib/tcell_agent/policies/appsensor/database_sensor.rb +0 -56
  80. data/lib/tcell_agent/policies/appsensor/misc_sensor.rb +0 -59
  81. data/lib/tcell_agent/policies/appsensor/payloads_policy.rb +0 -150
  82. data/lib/tcell_agent/policies/appsensor/request_size_sensor.rb +0 -25
  83. data/lib/tcell_agent/policies/appsensor/response_codes_sensor.rb +0 -73
  84. data/lib/tcell_agent/policies/appsensor/response_size_sensor.rb +0 -25
  85. data/lib/tcell_agent/policies/appsensor/size_sensor.rb +0 -71
  86. data/lib/tcell_agent/policies/appsensor/user_agent_sensor.rb +0 -47
  87. data/lib/tcell_agent/rails/auth/hooks.rb +0 -79
  88. data/lib/tcell_agent/sensor_events/util/redirect_utils.rb +0 -22
  89. data/spec/lib/tcell_agent/policies/appsensor/database_sensor_spec.rb +0 -165
  90. data/spec/lib/tcell_agent/policies/appsensor/misc_sensor_spec.rb +0 -429
  91. data/spec/lib/tcell_agent/policies/appsensor/payloads_policy_apply_spec.rb +0 -466
  92. data/spec/lib/tcell_agent/policies/appsensor/payloads_policy_from_json_spec.rb +0 -890
  93. data/spec/lib/tcell_agent/policies/appsensor/payloads_policy_log_spec.rb +0 -417
  94. data/spec/lib/tcell_agent/policies/appsensor/request_size_sensor_spec.rb +0 -236
  95. data/spec/lib/tcell_agent/policies/appsensor/response_codes_sensor_spec.rb +0 -297
  96. data/spec/lib/tcell_agent/policies/appsensor/response_size_sensor_spec.rb +0 -241
  97. data/spec/lib/tcell_agent/policies/appsensor/user_agent_sensor_spec.rb +0 -172
  98. data/spec/lib/tcell_agent/rails/auth/hooks_spec.rb +0 -246
  99. data/spec/lib/tcell_agent/sensor_events/util/redirect_utils_spec.rb +0 -25
  100. data/spec/support/resources/baserules.json +0 -155
@@ -4,219 +4,169 @@ module TCellAgent
4
4
  module AppSensor
5
5
 
6
6
  describe InjectionsReporter do
7
-
8
- describe "#check" do
9
- before(:each) do
10
- @payloads_policy = double("payloads_policy")
11
- @injections_matcher = double("injections_matcher")
12
- @injections_reporter = InjectionsReporter.new(@injections_matcher, @payloads_policy, false)
13
-
14
- @appsensor_meta = TCellAgent::SensorEvents::AppSensorMetaEvent.new
15
- @appsensor_meta.remote_address = "remote_address"
16
- @appsensor_meta.method = "get"
17
- @appsensor_meta.location = "location"
18
- @appsensor_meta.route_id = "route_id"
19
- @appsensor_meta.session_id = "session_id"
20
- @appsensor_meta.user_id = "user_id"
21
- @appsensor_meta.transaction_id = "transaction_id"
22
- end
23
-
24
- context "no matches" do
25
- it "should not send any events" do
26
- expect(@injections_matcher).to receive(:each_injection)
27
- expect(@payloads_policy).to_not receive(:apply)
7
+ describe ".report_and_log" do
8
+ context "with nil events" do
9
+ it "should do nothing" do
28
10
  expect(TCellAgent).to_not receive(:send_event)
11
+ expect(TCellAgent).to_not receive(:logger)
29
12
 
30
- @injections_reporter.check(@appsensor_meta)
13
+ InjectionsReporter.report_and_log(nil)
31
14
  end
32
15
  end
33
16
 
34
- context "with one GET injection match" do
35
- it "should send the appropriate event" do
36
- expect(@injections_matcher).to receive(:each_injection) do |md, &block|
37
- injection_attempt = TCellAgent::Policies::InjectionAttempt.new(
38
- InjectionsReporter::GET_PARAM,
39
- "xss",
40
- {
41
- "param" => "dirty",
42
- "value" => "<script>",
43
- "pattern" => "pattern_id"
44
- }
45
- )
46
-
47
- block.call(injection_attempt)
48
- end
49
- expect(@payloads_policy).to receive(:apply).with(
50
- "xss", {}, InjectionsReporter::GET_PARAM, "dirty", "<script>", {"l"=>"query"}, "pattern_id"
51
- )
52
- expect(TCellAgent).to receive(:send_event).with(
53
- {
54
- "event_type"=>"as",
55
- "dp"=>"xss",
56
- "param"=>"dirty",
57
- "remote_addr"=>"remote_address",
58
- "m"=>"get",
59
- "pattern"=>"pattern_id",
60
- "meta"=>{"l"=>"query"},
61
- "rid"=>"route_id"
62
- }
63
- )
64
-
65
- @injections_reporter.check(@appsensor_meta)
17
+ context "with empty events" do
18
+ it "should do nothing" do
19
+ expect(TCellAgent).to_not receive(:send_event)
20
+ expect(TCellAgent).to_not receive(:logger)
21
+
22
+ InjectionsReporter.report_and_log([])
66
23
  end
67
24
  end
68
25
 
69
- context "with one POST injection match" do
70
- it "should send the appropriate event" do
71
- @appsensor_meta.method = "post"
72
-
73
- expect(@injections_matcher).to receive(:each_injection) do |md, &block|
74
- injection_attempt = TCellAgent::Policies::InjectionAttempt.new(
75
- InjectionsReporter::POST_PARAM,
76
- "xss",
77
- {
78
- "param" => "dirty",
79
- "value" => "<script>",
80
- "pattern" => "pattern_id"
81
- }
82
- )
83
-
84
- block.call(injection_attempt)
85
- end
86
- expect(@payloads_policy).to receive(:apply).with(
87
- "xss", {}, InjectionsReporter::POST_PARAM, "dirty", "<script>", {"l"=>"body"}, "pattern_id"
88
- )
89
- expect(TCellAgent).to receive(:send_event).with(
90
- {
91
- "event_type"=>"as",
92
- "dp"=>"xss",
93
- "param"=>"dirty",
94
- "remote_addr"=>"remote_address",
95
- "m"=>"post",
96
- "pattern"=>"pattern_id",
97
- "meta"=>{"l"=>"body"},
98
- "rid"=>"route_id"
99
- }
100
- )
101
-
102
- @injections_reporter.check(@appsensor_meta)
26
+ context "with one event" do
27
+ it "should send the event" do
28
+ events = [{
29
+ "pattern" => "1",
30
+ "method" => "request_method",
31
+ "uri" => "abosolute_uri",
32
+ "parameter" => "avatar",
33
+ "meta" => {"l" => "body"},
34
+ "session_id" => "session_id",
35
+ "route_id" => "route_id",
36
+ "detection_point" => "xss",
37
+ "user_id" => "user_id"
38
+ }]
39
+
40
+ expect(TCellAgent).to_not receive(:logger)
41
+
42
+ expect(TCellAgent).to receive(:send_event).with({
43
+ "event_type" => "as",
44
+ "dp" => "xss",
45
+ "param" => "avatar",
46
+ "m" => "request_method",
47
+ "pattern" => "1",
48
+ "meta" => {"l" => "body"},
49
+ "rid" => "route_id",
50
+ "uri" => "abosolute_uri",
51
+ "uid" => "user_id",
52
+ "sid" => "session_id"
53
+ })
54
+
55
+ InjectionsReporter.report_and_log(events)
103
56
  end
104
57
  end
105
58
 
106
- context "with one JSON injection match" do
107
- it "should send the appropriate event" do
108
- @appsensor_meta.method = "post"
109
-
110
- expect(@injections_matcher).to receive(:each_injection) do |md, &block|
111
- injection_attempt = TCellAgent::Policies::InjectionAttempt.new(
112
- InjectionsReporter::JSON_PARAM,
113
- "xss",
114
- {
115
- "param" => "dirty",
116
- "value" => "<script>",
117
- "pattern" => "pattern_id"
118
- }
119
- )
120
-
121
- block.call(injection_attempt)
122
- end
123
- expect(@payloads_policy).to receive(:apply).with(
124
- "xss", {}, InjectionsReporter::JSON_PARAM, "dirty", "<script>", {"l"=>"body"}, "pattern_id"
125
- )
126
- expect(TCellAgent).to receive(:send_event).with(
127
- {
128
- "event_type"=>"as",
129
- "dp"=>"xss",
130
- "param"=>"dirty",
131
- "remote_addr"=>"remote_address",
132
- "m"=>"post",
133
- "pattern"=>"pattern_id",
134
- "meta"=>{"l"=>"body"},
135
- "rid"=>"route_id"
136
- }
137
- )
138
-
139
- @injections_reporter.check(@appsensor_meta)
59
+ context "with one event with full payload" do
60
+ it "should send and log the event" do
61
+ events = [{
62
+ "pattern" => "1",
63
+ "method" => "request_method",
64
+ "uri" => "abosolute_uri",
65
+ "parameter" => "avatar",
66
+ "meta" => {"l" => "body"},
67
+ "session_id" => "session_id",
68
+ "route_id" => "route_id",
69
+ "detection_point" => "xss",
70
+ "user_id" => "user_id",
71
+ "full_payload" => "full_payload"
72
+ }]
73
+
74
+ logger = double("logger")
75
+
76
+ expect(TCellAgent).to receive(:logger).and_return(logger)
77
+ expect(logger).to receive(:info).with(/"payload":"full_payload"/)
78
+
79
+ expect(TCellAgent).to receive(:send_event).with({
80
+ "event_type" => "as",
81
+ "dp" => "xss",
82
+ "param" => "avatar",
83
+ "m" => "request_method",
84
+ "pattern" => "1",
85
+ "meta" => {"l" => "body"},
86
+ "rid" => "route_id",
87
+ "uri" => "abosolute_uri",
88
+ "uid" => "user_id",
89
+ "sid" => "session_id"
90
+ })
91
+
92
+ InjectionsReporter.report_and_log(events)
140
93
  end
141
94
  end
142
95
 
143
- context "with one URI injection match" do
144
- it "should send the appropriate event" do
145
- @appsensor_meta.method = "get"
146
-
147
- expect(@injections_matcher).to receive(:each_injection) do |md, &block|
148
- injection_attempt = TCellAgent::Policies::InjectionAttempt.new(
149
- InjectionsReporter::URI_PARAM,
150
- "xss",
151
- {
152
- "param" => "dirty",
153
- "value" => "<script>",
154
- "pattern" => "pattern_id"
155
- }
156
- )
157
-
158
- block.call(injection_attempt)
159
- end
160
- expect(@payloads_policy).to receive(:apply).with(
161
- "xss", {}, InjectionsReporter::URI_PARAM, "dirty", "<script>", {"l"=>"uri"}, "pattern_id"
162
- )
163
- expect(TCellAgent).to receive(:send_event).with(
164
- {
165
- "event_type"=>"as",
166
- "dp"=>"xss",
167
- "param"=>"dirty",
168
- "remote_addr"=>"remote_address",
169
- "m"=>"get",
170
- "pattern"=>"pattern_id",
171
- "meta"=>{"l"=>"uri"},
172
- "rid"=>"route_id"
173
- }
174
- )
175
-
176
- @injections_reporter.check(@appsensor_meta)
96
+ context "with one event with payload" do
97
+ it "should send the event" do
98
+ events = [{
99
+ "pattern" => "1",
100
+ "method" => "request_method",
101
+ "uri" => "abosolute_uri",
102
+ "parameter" => "avatar",
103
+ "meta" => {"l" => "body"},
104
+ "session_id" => "session_id",
105
+ "route_id" => "route_id",
106
+ "detection_point" => "xss",
107
+ "user_id" => "user_id",
108
+ "payload" => "payload"
109
+ }]
110
+
111
+ expect(TCellAgent).to_not receive(:logger)
112
+
113
+ expect(TCellAgent).to receive(:send_event).with({
114
+ "event_type" => "as",
115
+ "dp" => "xss",
116
+ "param" => "avatar",
117
+ "m" => "request_method",
118
+ "pattern" => "1",
119
+ "meta" => {"l" => "body"},
120
+ "rid" => "route_id",
121
+ "uri" => "abosolute_uri",
122
+ "uid" => "user_id",
123
+ "sid" => "session_id",
124
+ "payload" => "payload"
125
+ })
126
+
127
+ InjectionsReporter.report_and_log(events)
177
128
  end
178
129
  end
179
130
 
180
- context "with one COOKIE injection match" do
181
- it "should send the appropriate event" do
182
- @appsensor_meta.method = "get"
183
-
184
- expect(@injections_matcher).to receive(:each_injection) do |md, &block|
185
- injection_attempt = TCellAgent::Policies::InjectionAttempt.new(
186
- InjectionsReporter::COOKIE_PARAM,
187
- "xss",
188
- {
189
- "param" => "dirty",
190
- "value" => "<script>",
191
- "pattern" => "pattern_id"
192
- }
193
- )
194
-
195
- block.call(injection_attempt)
196
- end
197
- expect(@payloads_policy).to receive(:apply).with(
198
- "xss", {}, InjectionsReporter::COOKIE_PARAM, "dirty", "<script>", {"l"=>"cookie"}, "pattern_id"
199
- )
200
- expect(TCellAgent).to receive(:send_event).with(
201
- {
202
- "event_type"=>"as",
203
- "dp"=>"xss",
204
- "param"=>"dirty",
205
- "remote_addr"=>"remote_address",
206
- "m"=>"get",
207
- "pattern"=>"pattern_id",
208
- "meta"=>{"l"=>"cookie"},
209
- "rid"=>"route_id"
210
- }
211
- )
212
-
213
- @injections_reporter.check(@appsensor_meta)
131
+ context "with one event with payload and full payload" do
132
+ it "should send and log the event" do
133
+ events = [{
134
+ "pattern" => "1",
135
+ "method" => "request_method",
136
+ "uri" => "abosolute_uri",
137
+ "parameter" => "avatar",
138
+ "meta" => {"l" => "body"},
139
+ "session_id" => "session_id",
140
+ "route_id" => "route_id",
141
+ "detection_point" => "xss",
142
+ "user_id" => "user_id",
143
+ "payload" => "payload",
144
+ "full_payload" => "full_payload"
145
+ }]
146
+
147
+ logger = double("logger")
148
+
149
+ expect(TCellAgent).to receive(:logger).and_return(logger)
150
+ expect(logger).to receive(:info).with(/"payload":"full_payload"/)
151
+
152
+ expect(TCellAgent).to receive(:send_event).with({
153
+ "event_type" => "as",
154
+ "dp" => "xss",
155
+ "param" => "avatar",
156
+ "m" => "request_method",
157
+ "pattern" => "1",
158
+ "meta" => {"l" => "body"},
159
+ "rid" => "route_id",
160
+ "uri" => "abosolute_uri",
161
+ "uid" => "user_id",
162
+ "sid" => "session_id",
163
+ "payload" => "payload"
164
+ })
165
+
166
+ InjectionsReporter.report_and_log(events)
214
167
  end
215
168
  end
216
-
217
169
  end
218
-
219
170
  end
220
-
221
171
  end
222
172
  end
@@ -0,0 +1,67 @@
1
+ require 'spec_helper'
2
+
3
+ module TCellAgent
4
+ module AppSensor
5
+
6
+ describe MetaData do
7
+ describe "#set_headers_dict" do
8
+ it "should set all headers that start with http and skip cookies" do
9
+ method = remote_address = route_id = session_id = user_id = transaction_id = nil
10
+
11
+ meta = MetaData.new(method, remote_address, route_id, session_id, user_id, transaction_id)
12
+ meta.set_headers_dict({
13
+ "rack.version" => [1, 2],
14
+ "REQUEST_METHOD" => "POST",
15
+ "SERVER_NAME" => "www.example.com",
16
+ "HTTP_USER_AGENT" => "Mozilla",
17
+ "HTTP_MY_CUSTOM_HTTP_HEADER" => "my value"
18
+ })
19
+
20
+
21
+ expect(meta.headers_dict).to eq({
22
+ "user-agent" => "Mozilla",
23
+ "my-custom-http-header" => "my value"
24
+ })
25
+ end
26
+
27
+ it "should set all headers that start with http and include content_length and content_type" do
28
+ method = remote_address = route_id = session_id = user_id = transaction_id = nil
29
+
30
+ meta = MetaData.new(method, remote_address, route_id, session_id, user_id, transaction_id)
31
+ meta.set_headers_dict({
32
+ "REQUEST_METHOD" => "POST",
33
+ "HTTP_VERSION" => "HTTP/1.1",
34
+ "HTTP_CONNECTION" => "keep-alive",
35
+ "CONTENT_LENGTH" => "85",
36
+ "HTTP_CACHE_CONTROL" => "max-age=0",
37
+ "HTTP_ORIGIN" => "http://192.168.99.100:3000",
38
+ "HTTP_UPGRADE_INSECURE_REQUESTS" => "1",
39
+ "HTTP_USER_AGENT" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5)",
40
+ "CONTENT_TYPE" => "application/x-www-form-urlencoded",
41
+ "HTTP_ACCEPT" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
42
+ "HTTP_ACCEPT_ENCODING" => "gzip, deflate",
43
+ "HTTP_ACCEPT_LANGUAGE" => "en-US,en;q=0.8",
44
+ "HTTP_MY_CUSTOM_HTTP_HEADER" => "my value"
45
+ })
46
+
47
+
48
+ expect(meta.headers_dict).to eq({
49
+ "version" => "HTTP/1.1",
50
+ "connection" => "keep-alive",
51
+ "content-length" => "85",
52
+ "cache-control" => "max-age=0",
53
+ "origin" => "http://192.168.99.100:3000",
54
+ "upgrade-insecure-requests" => "1",
55
+ "user-agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5)",
56
+ "content-type" => "application/x-www-form-urlencoded",
57
+ "accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
58
+ "accept-encoding" => "gzip, deflate",
59
+ "accept-language" => "en-US,en;q=0.8",
60
+ "my-custom-http-header" => "my value"
61
+ })
62
+ end
63
+ end
64
+ end
65
+
66
+ end
67
+ end
@@ -7,16 +7,6 @@ module TCellAgent
7
7
  # since rule manager is a singleton, load default rules so rest of the specs work properly
8
8
  AppSensorRuleManager.instance.load_default_rules_file
9
9
  end
10
- describe "#initialize" do
11
- context "loading default baserules" do
12
- it "should initialize all the sensors" do
13
- rule_manager = AppSensorRuleManager.instance
14
- rule_manager.load_rules_file(get_test_resource_path("baserules.json"))
15
-
16
- expect(rule_manager.rule_info.empty?).to eq(false)
17
- end
18
- end
19
- end
20
10
 
21
11
  describe "#load_rules_file" do
22
12
  context "with nonexistent file" do