tcell_agent 0.2.28 → 0.2.29.rc1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 181cef7acfc3208cd9d1af45984aa9d23e0b1e0e
4
- data.tar.gz: 78925684e4816c2ff9c1851581ed3e7eeedab2d7
3
+ metadata.gz: 7187e43ef14d4d44c243350059f6ad1f35ee6250
4
+ data.tar.gz: 88c22c716397a69145bfc37451fe166af979fa5d
5
5
  SHA512:
6
- metadata.gz: 59c4b7ab789fd0444906ff922561d7faa60ab7d6c224c292ed84123db5e065ea31786f662a25021b1ba9bd980bb38156072bcc5f15b3eec0f0a1222f8a2d339a
7
- data.tar.gz: c4e7c7d069401d297bb0e17d03c3ae998f69149302e65d699cc47c512be8275d421e25c4cc059b815c76c9cb74710f7c075d59ac1f00fb873f2245fc968bf3fc
6
+ metadata.gz: 5693216de6e554dde2dde7605c705b82d7568458fa030604fc67479f22be29c85bb3e317c2b121893fa7c6b701250b6ecefec8153550f6ce4094e98cc68f54e2
7
+ data.tar.gz: b5e8b9af7495ffc68addd549f7b858170bbea42e46ee6c928bb54c4e0324fa326dadc23931c61de6585237d64795c6b8e69d91a6c7da6448407c96c30168de24
@@ -129,13 +129,16 @@ module TCellAgent
129
129
  self.send_dispatch_events(tapi)
130
130
  end
131
131
  end
132
- rescue ThreadError
132
+ rescue ThreadError => thread_error
133
+ TCellAgent.logger.error("Thread error while processing events: #{thread_error.message}")
134
+ TCellAgent.logger.debug(thread_error.backtrace)
133
135
  last_run_time = Time.now
134
136
  @event_dispatch_monitor.synchronize {
135
137
  @dispatchEvents = []
136
138
  }
137
139
  end
138
140
  rescue TCellAgent::ConfigurationException
141
+ TCellAgent.logger.error("Exiting event processor. App is not configured properly.")
139
142
  Thread.exit
140
143
  rescue Exception => e
141
144
  last_run_time = Time.now
@@ -8,6 +8,7 @@ require 'tcell_agent/configuration'
8
8
 
9
9
  require 'tcell_agent/rails/routes'
10
10
  require 'tcell_agent/rails/dlp/process_request'
11
+ require 'tcell_agent/rails/tracing'
11
12
 
12
13
  TCellAgent::Instrumentation::Rails.send_language_info
13
14
  TCellAgent::Instrumentation::Rails.send_framework_info
@@ -0,0 +1,22 @@
1
+ module TCellAgent
2
+ module Instrumentation
3
+
4
+ module Rails
5
+
6
+ ActiveSupport.on_load(:action_controller) do
7
+ ActionController::Base.class_eval do
8
+ if (::Rails::VERSION::MAJOR == 5)
9
+ before_action :require_rbtrace
10
+ elsif (::Rails::VERSION::MAJOR < 5)
11
+ before_filter :require_rbtrace
12
+ end
13
+ def require_rbtrace
14
+ require 'rbtrace'
15
+ end
16
+ end
17
+ end
18
+
19
+ end
20
+
21
+ end
22
+ end
@@ -1,5 +1,5 @@
1
1
  # See the file "LICENSE" for the full license governing this code.
2
2
 
3
3
  module TCellAgent
4
- VERSION = "0.2.28"
4
+ VERSION = "0.2.29.rc1"
5
5
  end
data/tcell_agent.gemspec CHANGED
@@ -39,6 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_runtime_dependency "rest-client",">= 1.6"
40
40
  spec.add_runtime_dependency "json",">=1.8"
41
41
  spec.add_runtime_dependency "pbkdf2",">=0.1"
42
+ spec.add_runtime_dependency "rbtrace",">=0.4"
42
43
  spec.add_development_dependency "rspec-core"
43
44
  spec.add_development_dependency "bundler", ">= 1.7"
44
45
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,125 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tcell_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.28
4
+ version: 0.2.29.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garrett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-20 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pbkdf2
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rbtrace
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0.4'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0.4'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rspec-core
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - '>='
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
75
  version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - '>='
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - '>='
87
+ - - ">="
74
88
  - !ruby/object:Gem::Version
75
89
  version: '1.7'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - '>='
94
+ - - ">="
81
95
  - !ruby/object:Gem::Version
82
96
  version: '1.7'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rake
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ~>
101
+ - - "~>"
88
102
  - !ruby/object:Gem::Version
89
103
  version: '10.0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ~>
108
+ - - "~>"
95
109
  - !ruby/object:Gem::Version
96
110
  version: '10.0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rspec
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - ~>
115
+ - - "~>"
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0.9'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - ~>
122
+ - - "~>"
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0.9'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rake-compiler
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
- - - '>='
129
+ - - ">="
116
130
  - !ruby/object:Gem::Version
117
131
  version: '0'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
- - - '>='
136
+ - - ">="
123
137
  - !ruby/object:Gem::Version
124
138
  version: '0'
125
139
  description: This agent allows users to use the tCell.io service with their Rails
@@ -132,15 +146,29 @@ extensions:
132
146
  - ext/libinjection/extconf.rb
133
147
  extra_rdoc_files: []
134
148
  files:
149
+ - LICENSE
150
+ - LICENSE_libinjection
151
+ - README.md
135
152
  - Rakefile
153
+ - bin/tcell_agent
154
+ - ext/libinjection/extconf.rb
155
+ - ext/libinjection/libinjection.h
156
+ - ext/libinjection/libinjection_html5.c
157
+ - ext/libinjection/libinjection_html5.h
158
+ - ext/libinjection/libinjection_sqli.c
159
+ - ext/libinjection/libinjection_sqli.h
160
+ - ext/libinjection/libinjection_sqli_data.h
161
+ - ext/libinjection/libinjection_wrap.c
162
+ - ext/libinjection/libinjection_xss.c
163
+ - ext/libinjection/libinjection_xss.h
136
164
  - lib/tcell_agent.rb
165
+ - lib/tcell_agent/agent.rb
137
166
  - lib/tcell_agent/agent/event_processor.rb
138
167
  - lib/tcell_agent/agent/fork_pipe_manager.rb
139
168
  - lib/tcell_agent/agent/policy_manager.rb
140
169
  - lib/tcell_agent/agent/policy_types.rb
141
170
  - lib/tcell_agent/agent/route_manager.rb
142
171
  - lib/tcell_agent/agent/static_agent.rb
143
- - lib/tcell_agent/agent.rb
144
172
  - lib/tcell_agent/api.rb
145
173
  - lib/tcell_agent/appsensor/injections_matcher.rb
146
174
  - lib/tcell_agent/appsensor/injections_reporter.rb
@@ -154,10 +182,10 @@ files:
154
182
  - lib/tcell_agent/devise.rb
155
183
  - lib/tcell_agent/instrumentation.rb
156
184
  - lib/tcell_agent/logger.rb
185
+ - lib/tcell_agent/patches.rb
157
186
  - lib/tcell_agent/patches/block_rule.rb
158
187
  - lib/tcell_agent/patches/meta_data.rb
159
188
  - lib/tcell_agent/patches/sensors_matcher.rb
160
- - lib/tcell_agent/patches.rb
161
189
  - lib/tcell_agent/policies/appsensor/cmdi_sensor.rb
162
190
  - lib/tcell_agent/policies/appsensor/database_sensor.rb
163
191
  - lib/tcell_agent/policies/appsensor/fpt_sensor.rb
@@ -183,14 +211,15 @@ files:
183
211
  - lib/tcell_agent/policies/login_fraud_policy.rb
184
212
  - lib/tcell_agent/policies/patches_policy.rb
185
213
  - lib/tcell_agent/policies/secure_headers_policy.rb
214
+ - lib/tcell_agent/rails.rb
186
215
  - lib/tcell_agent/rails/auth/authlogic.rb
187
216
  - lib/tcell_agent/rails/auth/devise.rb
188
217
  - lib/tcell_agent/rails/auth/doorkeeper.rb
189
218
  - lib/tcell_agent/rails/auth/hooks.rb
190
219
  - lib/tcell_agent/rails/better_ip.rb
191
220
  - lib/tcell_agent/rails/csrf_exception.rb
192
- - lib/tcell_agent/rails/dlp/process_request.rb
193
221
  - lib/tcell_agent/rails/dlp.rb
222
+ - lib/tcell_agent/rails/dlp/process_request.rb
194
223
  - lib/tcell_agent/rails/dlp_handler.rb
195
224
  - lib/tcell_agent/rails/js_agent_insert.rb
196
225
  - lib/tcell_agent/rails/middleware/body_filter_middleware.rb
@@ -199,12 +228,12 @@ files:
199
228
  - lib/tcell_agent/rails/middleware/headers_middleware.rb
200
229
  - lib/tcell_agent/rails/on_start.rb
201
230
  - lib/tcell_agent/rails/responses.rb
231
+ - lib/tcell_agent/rails/routes.rb
202
232
  - lib/tcell_agent/rails/routes/grape.rb
203
233
  - lib/tcell_agent/rails/routes/route_id.rb
204
- - lib/tcell_agent/rails/routes.rb
205
234
  - lib/tcell_agent/rails/settings_reporter.rb
206
235
  - lib/tcell_agent/rails/tcell_body_proxy.rb
207
- - lib/tcell_agent/rails.rb
236
+ - lib/tcell_agent/rails/tracing.rb
208
237
  - lib/tcell_agent/routes/table.rb
209
238
  - lib/tcell_agent/sensor_events/app_config.rb
210
239
  - lib/tcell_agent/sensor_events/appsensor_event.rb
@@ -234,6 +263,9 @@ files:
234
263
  - lib/tcell_agent/utils/queue_with_timeout.rb
235
264
  - lib/tcell_agent/utils/strings.rb
236
265
  - lib/tcell_agent/version.rb
266
+ - spec/apps/rails-3.2/Gemfile
267
+ - spec/apps/rails-3.2/Gemfile.lock
268
+ - spec/apps/rails-3.2/Rakefile
237
269
  - spec/apps/rails-3.2/app/assets/images/rails.png
238
270
  - spec/apps/rails-3.2/app/assets/javascripts/application.js
239
271
  - spec/apps/rails-3.2/app/assets/stylesheets/application.css
@@ -242,15 +274,15 @@ files:
242
274
  - spec/apps/rails-3.2/app/helpers/application_helper.rb
243
275
  - spec/apps/rails-3.2/app/views/layouts/application.html.erb
244
276
  - spec/apps/rails-3.2/app/views/t_cell_app/index.html.erb
277
+ - spec/apps/rails-3.2/config.ru
245
278
  - spec/apps/rails-3.2/config/application.rb
246
279
  - spec/apps/rails-3.2/config/boot.rb
247
280
  - spec/apps/rails-3.2/config/environment.rb
248
281
  - spec/apps/rails-3.2/config/environments/test.rb
249
282
  - spec/apps/rails-3.2/config/routes.rb
250
- - spec/apps/rails-3.2/config.ru
251
- - spec/apps/rails-3.2/Gemfile
252
- - spec/apps/rails-3.2/Gemfile.lock
253
- - spec/apps/rails-3.2/Rakefile
283
+ - spec/apps/rails-4.1/Gemfile
284
+ - spec/apps/rails-4.1/Gemfile.lock
285
+ - spec/apps/rails-4.1/Rakefile
254
286
  - spec/apps/rails-4.1/app/assets/javascripts/application.js
255
287
  - spec/apps/rails-4.1/app/assets/stylesheets/application.css
256
288
  - spec/apps/rails-4.1/app/controllers/application_controller.rb
@@ -258,6 +290,7 @@ files:
258
290
  - spec/apps/rails-4.1/app/helpers/application_helper.rb
259
291
  - spec/apps/rails-4.1/app/views/layouts/application.html.erb
260
292
  - spec/apps/rails-4.1/app/views/t_cell_app/index.html.erb
293
+ - spec/apps/rails-4.1/config.ru
261
294
  - spec/apps/rails-4.1/config/application.rb
262
295
  - spec/apps/rails-4.1/config/boot.rb
263
296
  - spec/apps/rails-4.1/config/environment.rb
@@ -273,10 +306,6 @@ files:
273
306
  - spec/apps/rails-4.1/config/locales/en.yml
274
307
  - spec/apps/rails-4.1/config/routes.rb
275
308
  - spec/apps/rails-4.1/config/secrets.yml
276
- - spec/apps/rails-4.1/config.ru
277
- - spec/apps/rails-4.1/Gemfile
278
- - spec/apps/rails-4.1/Gemfile.lock
279
- - spec/apps/rails-4.1/Rakefile
280
309
  - spec/controllers/application_controller.rb
281
310
  - spec/integration/puma.rb
282
311
  - spec/lib/tcell_agent/agent/fork_pipe_manager_spec.rb
@@ -344,21 +373,7 @@ files:
344
373
  - spec/support/resources/baserules.json
345
374
  - spec/support/resources/normal_config.json
346
375
  - spec/support/static_agent_overrides.rb
347
- - README.md
348
- - LICENSE
349
- - LICENSE_libinjection
350
376
  - tcell_agent.gemspec
351
- - ext/libinjection/libinjection.h
352
- - ext/libinjection/libinjection_html5.c
353
- - ext/libinjection/libinjection_html5.h
354
- - ext/libinjection/libinjection_sqli.c
355
- - ext/libinjection/libinjection_sqli.h
356
- - ext/libinjection/libinjection_sqli_data.h
357
- - ext/libinjection/libinjection_wrap.c
358
- - ext/libinjection/libinjection_xss.c
359
- - ext/libinjection/libinjection_xss.h
360
- - bin/tcell_agent
361
- - ext/libinjection/extconf.rb
362
377
  homepage: https://www.tcell.io
363
378
  licenses:
364
379
  - Copyright (c) 2015 tCell.io (see LICENSE file)
@@ -371,21 +386,24 @@ require_paths:
371
386
  - spec
372
387
  required_ruby_version: !ruby/object:Gem::Requirement
373
388
  requirements:
374
- - - '>='
389
+ - - ">="
375
390
  - !ruby/object:Gem::Version
376
391
  version: '0'
377
392
  required_rubygems_version: !ruby/object:Gem::Requirement
378
393
  requirements:
379
- - - '>='
394
+ - - ">"
380
395
  - !ruby/object:Gem::Version
381
- version: '0'
396
+ version: 1.3.1
382
397
  requirements: []
383
398
  rubyforge_project:
384
- rubygems_version: 2.0.14.1
399
+ rubygems_version: 2.6.11
385
400
  signing_key:
386
401
  specification_version: 4
387
402
  summary: tCell.io Agent for Rails & Sinatra
388
403
  test_files:
404
+ - spec/apps/rails-3.2/Gemfile
405
+ - spec/apps/rails-3.2/Gemfile.lock
406
+ - spec/apps/rails-3.2/Rakefile
389
407
  - spec/apps/rails-3.2/app/assets/images/rails.png
390
408
  - spec/apps/rails-3.2/app/assets/javascripts/application.js
391
409
  - spec/apps/rails-3.2/app/assets/stylesheets/application.css
@@ -394,15 +412,15 @@ test_files:
394
412
  - spec/apps/rails-3.2/app/helpers/application_helper.rb
395
413
  - spec/apps/rails-3.2/app/views/layouts/application.html.erb
396
414
  - spec/apps/rails-3.2/app/views/t_cell_app/index.html.erb
415
+ - spec/apps/rails-3.2/config.ru
397
416
  - spec/apps/rails-3.2/config/application.rb
398
417
  - spec/apps/rails-3.2/config/boot.rb
399
418
  - spec/apps/rails-3.2/config/environment.rb
400
419
  - spec/apps/rails-3.2/config/environments/test.rb
401
420
  - spec/apps/rails-3.2/config/routes.rb
402
- - spec/apps/rails-3.2/config.ru
403
- - spec/apps/rails-3.2/Gemfile
404
- - spec/apps/rails-3.2/Gemfile.lock
405
- - spec/apps/rails-3.2/Rakefile
421
+ - spec/apps/rails-4.1/Gemfile
422
+ - spec/apps/rails-4.1/Gemfile.lock
423
+ - spec/apps/rails-4.1/Rakefile
406
424
  - spec/apps/rails-4.1/app/assets/javascripts/application.js
407
425
  - spec/apps/rails-4.1/app/assets/stylesheets/application.css
408
426
  - spec/apps/rails-4.1/app/controllers/application_controller.rb
@@ -410,6 +428,7 @@ test_files:
410
428
  - spec/apps/rails-4.1/app/helpers/application_helper.rb
411
429
  - spec/apps/rails-4.1/app/views/layouts/application.html.erb
412
430
  - spec/apps/rails-4.1/app/views/t_cell_app/index.html.erb
431
+ - spec/apps/rails-4.1/config.ru
413
432
  - spec/apps/rails-4.1/config/application.rb
414
433
  - spec/apps/rails-4.1/config/boot.rb
415
434
  - spec/apps/rails-4.1/config/environment.rb
@@ -425,10 +444,6 @@ test_files:
425
444
  - spec/apps/rails-4.1/config/locales/en.yml
426
445
  - spec/apps/rails-4.1/config/routes.rb
427
446
  - spec/apps/rails-4.1/config/secrets.yml
428
- - spec/apps/rails-4.1/config.ru
429
- - spec/apps/rails-4.1/Gemfile
430
- - spec/apps/rails-4.1/Gemfile.lock
431
- - spec/apps/rails-4.1/Rakefile
432
447
  - spec/controllers/application_controller.rb
433
448
  - spec/integration/puma.rb
434
449
  - spec/lib/tcell_agent/agent/fork_pipe_manager_spec.rb