contrast-agent 6.4.0 → 6.6.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.
- checksums.yaml +4 -4
- data/ext/cs__contrast_patch/cs__contrast_patch.c +14 -1
- data/lib/contrast/agent/assess/finalizers/hash.rb +1 -0
- data/lib/contrast/agent/assess/policy/propagation_method.rb +5 -1
- data/lib/contrast/agent/assess/policy/propagator/custom.rb +4 -0
- data/lib/contrast/agent/assess/policy/propagator/database_write.rb +5 -0
- data/lib/contrast/agent/assess/policy/propagator/split.rb +3 -0
- data/lib/contrast/agent/assess/policy/source_method.rb +5 -0
- data/lib/contrast/agent/assess/policy/trigger_method.rb +8 -2
- data/lib/contrast/agent/assess/tracker.rb +12 -0
- data/lib/contrast/agent/inventory/database_config.rb +2 -1
- data/lib/contrast/agent/inventory/dependency_analysis.rb +2 -2
- data/lib/contrast/agent/inventory/dependency_usage_analysis.rb +1 -1
- data/lib/contrast/agent/inventory/policy/datastores.rb +1 -1
- data/lib/contrast/agent/inventory/policy/policy.rb +1 -1
- data/lib/contrast/agent/patching/policy/method_policy.rb +3 -3
- data/lib/contrast/agent/protect/rule/base.rb +1 -1
- data/lib/contrast/agent/reporting/reporter_heartbeat.rb +1 -3
- data/lib/contrast/agent/reporting/reporting_events/application_defend_activity.rb +17 -21
- data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_sample.rb +1 -1
- data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_sample_activity.rb +26 -3
- data/lib/contrast/agent/reporting/reporting_utilities/audit.rb +5 -5
- data/lib/contrast/agent/reporting/reporting_utilities/headers.rb +1 -1
- data/lib/contrast/agent/reporting/reporting_utilities/reporter_client.rb +1 -1
- data/lib/contrast/agent/reporting/reporting_utilities/response_handler_utils.rb +1 -1
- data/lib/contrast/agent/request_context.rb +8 -0
- data/lib/contrast/agent/service_heartbeat.rb +2 -3
- data/lib/contrast/agent/static_analysis.rb +1 -1
- data/lib/contrast/agent/version.rb +1 -1
- data/lib/contrast/agent/worker_thread.rb +10 -0
- data/lib/contrast/api/communication/response_processor.rb +1 -1
- data/lib/contrast/components/agent.rb +52 -14
- data/lib/contrast/components/api.rb +60 -23
- data/lib/contrast/components/assess.rb +16 -0
- data/lib/contrast/components/contrast_service.rb +1 -1
- data/lib/contrast/components/heap_dump.rb +51 -1
- data/lib/contrast/components/inventory.rb +19 -13
- data/lib/contrast/components/logger.rb +18 -0
- data/lib/contrast/components/protect.rb +41 -1
- data/lib/contrast/components/sampling.rb +29 -0
- data/lib/contrast/config/assess_configuration.rb +33 -3
- data/lib/contrast/config/base_configuration.rb +8 -2
- data/lib/contrast/config/root_configuration.rb +19 -16
- data/lib/contrast/config/service_configuration.rb +4 -4
- data/lib/contrast/config.rb +0 -9
- data/lib/contrast/extension/object.rb +19 -0
- data/lib/contrast/framework/rails/support.rb +7 -3
- data/lib/contrast/logger/log.rb +2 -1
- data/lib/contrast/utils/assess/event_limit_utils.rb +96 -0
- data/lib/contrast/utils/assess/propagation_method_utils.rb +27 -7
- data/lib/contrast/utils/log_utils.rb +2 -2
- data/lib/contrast/utils/net_http_base.rb +2 -2
- data/lib/contrast/utils/patching/policy/patch_utils.rb +1 -1
- data/lib/contrast.rb +6 -21
- data/resources/assess/policy.json +15 -12
- data/resources/deadzone/policy.json +139 -19
- data/ruby-agent.gemspec +2 -0
- data/service_executables/VERSION +1 -1
- data/service_executables/linux/contrast-service +0 -0
- data/service_executables/mac/contrast-service +0 -0
- metadata +43 -20
- data/lib/contrast/config/agent_configuration.rb +0 -63
- data/lib/contrast/config/api_configuration.rb +0 -56
- data/lib/contrast/config/heap_dump_configuration.rb +0 -59
- data/lib/contrast/config/inventory_configuration.rb +0 -33
- data/lib/contrast/config/logger_configuration.rb +0 -26
- data/lib/contrast/config/protect_configuration.rb +0 -33
- data/lib/contrast/config/sampling_configuration.rb +0 -35
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"deadzones":[
|
3
3
|
{
|
4
|
-
"class_name":"
|
4
|
+
"class_name":"RSpec::Core::Example",
|
5
5
|
"instance_method":true,
|
6
6
|
"method_visibility": "private",
|
7
7
|
"method_name":"finish"
|
@@ -49,19 +49,20 @@
|
|
49
49
|
"class_name":"Rack::Session::Cookie",
|
50
50
|
"instance_method":true,
|
51
51
|
"method_visibility": "public",
|
52
|
-
"method_name":"
|
52
|
+
"method_name":"set_session"
|
53
53
|
}, {
|
54
54
|
"class_name":"Rack::Session::Abstract::Persisted",
|
55
55
|
"instance_method":true,
|
56
56
|
"method_visibility": "private",
|
57
57
|
"method_name":"session_exists?",
|
58
|
-
"code": "https://github.com/rack/rack/blob/
|
58
|
+
"code": "https://github.com/rack/rack-session/blob/main/lib/rack/session/abstract/id.rb#L339"
|
59
59
|
}, {
|
60
60
|
"class_name":"ActionDispatch::FileHandler",
|
61
61
|
"instance_method":true,
|
62
62
|
"method_visibility": "public",
|
63
63
|
"method_name":"match?",
|
64
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/static.rb#L30"
|
64
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/static.rb#L30",
|
65
|
+
"note": "Removable once Rails 6.0 is no longer supported"
|
65
66
|
}, {
|
66
67
|
"class_name":"ActionDispatch::Http::MimeNegotiation",
|
67
68
|
"instance_method":true,
|
@@ -109,97 +110,216 @@
|
|
109
110
|
"instance_method":true,
|
110
111
|
"method_visibility": "public",
|
111
112
|
"method_name":"cookie_jar",
|
112
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L11"
|
113
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L11",
|
114
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
115
|
+
}, {
|
116
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
117
|
+
"instance_method":true,
|
118
|
+
"method_visibility": "public",
|
119
|
+
"method_name":"cookie_jar",
|
120
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L11"
|
113
121
|
}, {
|
114
122
|
"class_name":"ActionDispatch::Request",
|
115
123
|
"instance_method":true,
|
116
124
|
"method_visibility": "public",
|
117
125
|
"method_name":"have_cookie_jar?",
|
118
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L24"
|
126
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L24",
|
127
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
128
|
+
}, {
|
129
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
130
|
+
"instance_method":true,
|
131
|
+
"method_visibility": "public",
|
132
|
+
"method_name":"have_cookie_jar?",
|
133
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L24"
|
119
134
|
}, {
|
120
135
|
"class_name":"ActionDispatch::Request",
|
121
136
|
"instance_method":true,
|
122
137
|
"method_visibility": "public",
|
123
138
|
"method_name":"key_generator",
|
124
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L32"
|
139
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L32",
|
140
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
141
|
+
}, {
|
142
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
143
|
+
"instance_method":true,
|
144
|
+
"method_visibility": "public",
|
145
|
+
"method_name":"key_generator",
|
146
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L32"
|
125
147
|
}, {
|
126
148
|
"class_name":"ActionDispatch::Request",
|
127
149
|
"instance_method":true,
|
128
150
|
"method_visibility": "public",
|
129
151
|
"method_name":"signed_cookie_salt",
|
130
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L36"
|
152
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L36",
|
153
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
154
|
+
}, {
|
155
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
156
|
+
"instance_method":true,
|
157
|
+
"method_visibility": "public",
|
158
|
+
"method_name":"signed_cookie_salt",
|
159
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L36"
|
131
160
|
}, {
|
132
161
|
"class_name":"ActionDispatch::Request",
|
133
162
|
"instance_method":true,
|
134
163
|
"method_visibility": "public",
|
135
164
|
"method_name":"encrypted_cookie_salt",
|
136
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L40"
|
165
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L40",
|
166
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
167
|
+
}, {
|
168
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
169
|
+
"instance_method":true,
|
170
|
+
"method_visibility": "public",
|
171
|
+
"method_name":"encrypted_cookie_salt",
|
172
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L40"
|
137
173
|
}, {
|
138
174
|
"class_name":"ActionDispatch::Request",
|
139
175
|
"instance_method":true,
|
140
176
|
"method_visibility": "public",
|
141
177
|
"method_name":"encrypted_signed_cookie_salt",
|
142
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L44"
|
178
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L44",
|
179
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
180
|
+
}, {
|
181
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
182
|
+
"instance_method":true,
|
183
|
+
"method_visibility": "public",
|
184
|
+
"method_name":"encrypted_signed_cookie_salt",
|
185
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L44"
|
143
186
|
}, {
|
144
187
|
"class_name":"ActionDispatch::Request",
|
145
188
|
"instance_method":true,
|
146
189
|
"method_visibility": "public",
|
147
190
|
"method_name":"authenticated_encrypted_cookie_salt",
|
148
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L48"
|
191
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L48",
|
192
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
193
|
+
}, {
|
194
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
195
|
+
"instance_method":true,
|
196
|
+
"method_visibility": "public",
|
197
|
+
"method_name":"authenticated_encrypted_cookie_salt",
|
198
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L48"
|
149
199
|
}, {
|
150
200
|
"class_name":"ActionDispatch::Request",
|
151
201
|
"instance_method":true,
|
152
202
|
"method_visibility": "public",
|
153
203
|
"method_name":"use_authenticated_cookie_encryption",
|
154
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L52"
|
204
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L52",
|
205
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
206
|
+
}, {
|
207
|
+
"new": true,
|
208
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
209
|
+
"instance_method": true,
|
210
|
+
"method_visibility": "public",
|
211
|
+
"method_name": "use_authenticated_cookie_encryption",
|
212
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L52"
|
155
213
|
}, {
|
156
214
|
"class_name":"ActionDispatch::Request",
|
157
215
|
"instance_method":true,
|
158
216
|
"method_visibility": "public",
|
159
217
|
"method_name":"encrypted_cookie_cipher",
|
160
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L56"
|
218
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L56",
|
219
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
220
|
+
}, {
|
221
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
222
|
+
"instance_method":true,
|
223
|
+
"method_visibility": "public",
|
224
|
+
"method_name":"encrypted_cookie_cipher",
|
225
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L56"
|
161
226
|
}, {
|
162
227
|
"class_name":"ActionDispatch::Request",
|
163
228
|
"instance_method":true,
|
164
229
|
"method_visibility": "public",
|
165
230
|
"method_name":"signed_cookie_digest",
|
166
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L60"
|
231
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L60",
|
232
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
233
|
+
}, {
|
234
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
235
|
+
"instance_method":true,
|
236
|
+
"method_visibility": "public",
|
237
|
+
"method_name":"signed_cookie_digest",
|
238
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L60"
|
167
239
|
}, {
|
168
240
|
"class_name":"ActionDispatch::Request",
|
169
241
|
"instance_method":true,
|
170
242
|
"method_visibility": "public",
|
171
243
|
"method_name":"secret_key_base",
|
172
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L64"
|
244
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L64",
|
245
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
246
|
+
}, {
|
247
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
248
|
+
"instance_method":true,
|
249
|
+
"method_visibility": "public",
|
250
|
+
"method_name":"secret_key_base",
|
251
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L64"
|
173
252
|
}, {
|
174
253
|
"class_name":"ActionDispatch::Request",
|
175
254
|
"instance_method":true,
|
176
255
|
"method_visibility": "public",
|
177
256
|
"method_name":"cookies_serializer",
|
178
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L68"
|
257
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L68",
|
258
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
259
|
+
}, {
|
260
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
261
|
+
"instance_method":true,
|
262
|
+
"method_visibility": "public",
|
263
|
+
"method_name":"cookies_serializer",
|
264
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L68"
|
179
265
|
}, {
|
180
266
|
"class_name":"ActionDispatch::Request",
|
181
267
|
"instance_method":true,
|
182
268
|
"method_visibility": "public",
|
183
269
|
"method_name":"cookies_digest",
|
184
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L72"
|
270
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L72",
|
271
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
272
|
+
}, {
|
273
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
274
|
+
"instance_method":true,
|
275
|
+
"method_visibility": "public",
|
276
|
+
"method_name":"cookies_digest",
|
277
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L76"
|
278
|
+
}, {
|
279
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
280
|
+
"instance_method":true,
|
281
|
+
"method_visibility": "public",
|
282
|
+
"method_name":"cookies_same_site_protection",
|
283
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L72"
|
185
284
|
}, {
|
186
285
|
"class_name":"ActionDispatch::Request",
|
187
286
|
"instance_method":true,
|
188
287
|
"method_visibility": "public",
|
189
288
|
"method_name":"cookies_rotations",
|
190
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L76"
|
289
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L76",
|
290
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
291
|
+
}, {
|
292
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
293
|
+
"instance_method":true,
|
294
|
+
"method_visibility": "public",
|
295
|
+
"method_name":"cookies_rotations",
|
296
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L80"
|
191
297
|
}, {
|
192
298
|
"class_name":"ActionDispatch::Request",
|
193
299
|
"instance_method":true,
|
194
300
|
"method_visibility": "public",
|
195
301
|
"method_name":"use_cookies_with_metadata",
|
196
|
-
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L80"
|
302
|
+
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L80",
|
303
|
+
"note": "Removable once Rails 6.1 is no longer supported"
|
304
|
+
}, {
|
305
|
+
"class_name":"ActionDispatch::RequestCookieMethods",
|
306
|
+
"instance_method":true,
|
307
|
+
"method_visibility": "public",
|
308
|
+
"method_name":"use_cookies_with_metadata",
|
309
|
+
"code": "https://github.com/rails/rails/blob/v7.0.3/actionpack/lib/action_dispatch/middleware/cookies.rb#L84"
|
197
310
|
}, {
|
198
311
|
"class_name":"ActionDispatch::Request::Session",
|
199
312
|
"instance_method":true,
|
200
313
|
"method_visibility": "public",
|
201
314
|
"method_name":"exists?",
|
202
315
|
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/request/session.rb#L201"
|
316
|
+
}, {
|
317
|
+
"class_name":"OmniAuth::Strategies::OAuth2",
|
318
|
+
"instance_method":true,
|
319
|
+
"method_visibility": "public",
|
320
|
+
"method_name":"request_phase",
|
321
|
+
"code": "https://github.com/omniauth/omniauth-oauth2/blob/v1.7.2/lib/omniauth/strategies/oauth2.rb#L58",
|
322
|
+
"note": "Prevent XSS False Positive from redirect as Omniauth handles security of URL & params"
|
203
323
|
}
|
204
324
|
]
|
205
325
|
}
|
data/ruby-agent.gemspec
CHANGED
@@ -82,6 +82,8 @@ def self.add_specs spec
|
|
82
82
|
spec.add_development_dependency 'rspec-rails', '5.0'
|
83
83
|
spec.add_development_dependency 'tzinfo-data' # Alpine rspec-rails requirement.
|
84
84
|
spec.add_development_dependency 'warning'
|
85
|
+
spec.add_development_dependency 'typhoeus', '~> 1.4'
|
86
|
+
spec.add_development_dependency 'excon', '~> 0.92.3'
|
85
87
|
end
|
86
88
|
|
87
89
|
def self.add_coverage spec
|
data/service_executables/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.28.
|
1
|
+
2.28.22
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contrast-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- galen.palmer@contrastsecurity.com
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: exe
|
15
15
|
cert_chain: []
|
16
|
-
date: 2022-
|
16
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: bundler
|
@@ -567,6 +567,34 @@ dependencies:
|
|
567
567
|
- - ">="
|
568
568
|
- !ruby/object:Gem::Version
|
569
569
|
version: '0'
|
570
|
+
- !ruby/object:Gem::Dependency
|
571
|
+
name: typhoeus
|
572
|
+
requirement: !ruby/object:Gem::Requirement
|
573
|
+
requirements:
|
574
|
+
- - "~>"
|
575
|
+
- !ruby/object:Gem::Version
|
576
|
+
version: '1.4'
|
577
|
+
type: :development
|
578
|
+
prerelease: false
|
579
|
+
version_requirements: !ruby/object:Gem::Requirement
|
580
|
+
requirements:
|
581
|
+
- - "~>"
|
582
|
+
- !ruby/object:Gem::Version
|
583
|
+
version: '1.4'
|
584
|
+
- !ruby/object:Gem::Dependency
|
585
|
+
name: excon
|
586
|
+
requirement: !ruby/object:Gem::Requirement
|
587
|
+
requirements:
|
588
|
+
- - "~>"
|
589
|
+
- !ruby/object:Gem::Version
|
590
|
+
version: 0.92.3
|
591
|
+
type: :development
|
592
|
+
prerelease: false
|
593
|
+
version_requirements: !ruby/object:Gem::Requirement
|
594
|
+
requirements:
|
595
|
+
- - "~>"
|
596
|
+
- !ruby/object:Gem::Version
|
597
|
+
version: 0.92.3
|
570
598
|
- !ruby/object:Gem::Dependency
|
571
599
|
name: zlib
|
572
600
|
requirement: !ruby/object:Gem::Requirement
|
@@ -637,22 +665,22 @@ executables:
|
|
637
665
|
- contrast_service
|
638
666
|
extensions:
|
639
667
|
- ext/cs__common/extconf.rb
|
640
|
-
- ext/cs__assess_regexp/extconf.rb
|
641
|
-
- ext/cs__assess_basic_object/extconf.rb
|
642
|
-
- ext/cs__assess_hash/extconf.rb
|
643
668
|
- ext/cs__assess_fiber_track/extconf.rb
|
644
|
-
- ext/
|
669
|
+
- ext/cs__assess_string/extconf.rb
|
670
|
+
- ext/cs__assess_module/extconf.rb
|
671
|
+
- ext/cs__assess_test/extconf.rb
|
645
672
|
- ext/cs__assess_kernel/extconf.rb
|
646
|
-
- ext/
|
647
|
-
- ext/
|
673
|
+
- ext/cs__assess_yield_track/extconf.rb
|
674
|
+
- ext/cs__assess_hash/extconf.rb
|
648
675
|
- ext/cs__os_information/extconf.rb
|
676
|
+
- ext/cs__contrast_patch/extconf.rb
|
677
|
+
- ext/cs__assess_marshal_module/extconf.rb
|
678
|
+
- ext/cs__assess_regexp/extconf.rb
|
649
679
|
- ext/cs__assess_array/extconf.rb
|
650
|
-
- ext/cs__tests/extconf.rb
|
651
|
-
- ext/cs__assess_module/extconf.rb
|
652
|
-
- ext/cs__assess_yield_track/extconf.rb
|
653
|
-
- ext/cs__assess_string/extconf.rb
|
654
680
|
- ext/cs__scope/extconf.rb
|
655
|
-
- ext/
|
681
|
+
- ext/cs__assess_basic_object/extconf.rb
|
682
|
+
- ext/cs__tests/extconf.rb
|
683
|
+
- ext/cs__assess_string_interpolation/extconf.rb
|
656
684
|
extra_rdoc_files: []
|
657
685
|
files:
|
658
686
|
- ".clang-format"
|
@@ -1164,8 +1192,6 @@ files:
|
|
1164
1192
|
- lib/contrast/components/scope.rb
|
1165
1193
|
- lib/contrast/components/settings.rb
|
1166
1194
|
- lib/contrast/config.rb
|
1167
|
-
- lib/contrast/config/agent_configuration.rb
|
1168
|
-
- lib/contrast/config/api_configuration.rb
|
1169
1195
|
- lib/contrast/config/api_proxy_configuration.rb
|
1170
1196
|
- lib/contrast/config/application_configuration.rb
|
1171
1197
|
- lib/contrast/config/assess_configuration.rb
|
@@ -1174,16 +1200,11 @@ files:
|
|
1174
1200
|
- lib/contrast/config/certification_configuration.rb
|
1175
1201
|
- lib/contrast/config/env_variables.rb
|
1176
1202
|
- lib/contrast/config/exception_configuration.rb
|
1177
|
-
- lib/contrast/config/heap_dump_configuration.rb
|
1178
|
-
- lib/contrast/config/inventory_configuration.rb
|
1179
|
-
- lib/contrast/config/logger_configuration.rb
|
1180
|
-
- lib/contrast/config/protect_configuration.rb
|
1181
1203
|
- lib/contrast/config/protect_rule_configuration.rb
|
1182
1204
|
- lib/contrast/config/protect_rules_configuration.rb
|
1183
1205
|
- lib/contrast/config/request_audit_configuration.rb
|
1184
1206
|
- lib/contrast/config/root_configuration.rb
|
1185
1207
|
- lib/contrast/config/ruby_configuration.rb
|
1186
|
-
- lib/contrast/config/sampling_configuration.rb
|
1187
1208
|
- lib/contrast/config/server_configuration.rb
|
1188
1209
|
- lib/contrast/config/service_configuration.rb
|
1189
1210
|
- lib/contrast/configuration.rb
|
@@ -1202,6 +1223,7 @@ files:
|
|
1202
1223
|
- lib/contrast/extension/extension.rb
|
1203
1224
|
- lib/contrast/extension/inventory.rb
|
1204
1225
|
- lib/contrast/extension/module.rb
|
1226
|
+
- lib/contrast/extension/object.rb
|
1205
1227
|
- lib/contrast/extension/protect.rb
|
1206
1228
|
- lib/contrast/extension/protect/psych.rb
|
1207
1229
|
- lib/contrast/extension/thread.rb
|
@@ -1230,6 +1252,7 @@ files:
|
|
1230
1252
|
- lib/contrast/security_exception.rb
|
1231
1253
|
- lib/contrast/tasks/config.rb
|
1232
1254
|
- lib/contrast/tasks/service.rb
|
1255
|
+
- lib/contrast/utils/assess/event_limit_utils.rb
|
1233
1256
|
- lib/contrast/utils/assess/object_store.rb
|
1234
1257
|
- lib/contrast/utils/assess/propagation_method_utils.rb
|
1235
1258
|
- lib/contrast/utils/assess/property/tagged_utils.rb
|
@@ -1,63 +0,0 @@
|
|
1
|
-
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'contrast/config/service_configuration'
|
5
|
-
require 'contrast/config/logger_configuration'
|
6
|
-
require 'contrast/config/ruby_configuration'
|
7
|
-
require 'contrast/config/heap_dump_configuration'
|
8
|
-
require 'contrast/config/api_configuration'
|
9
|
-
|
10
|
-
module Contrast
|
11
|
-
module Config
|
12
|
-
# Common Configuration settings. Those in this section pertain to the core functionality of the Agent.
|
13
|
-
class AgentConfiguration
|
14
|
-
include Contrast::Config::BaseConfiguration
|
15
|
-
|
16
|
-
# @return [Boolean, nil]
|
17
|
-
attr_accessor :enable
|
18
|
-
# @return [Boolean, nil]
|
19
|
-
attr_accessor :omit_body
|
20
|
-
# @return [Contrast::Config::RubyConfiguration]
|
21
|
-
attr_writer :ruby
|
22
|
-
# @return [Contrast::Config::ServiceConfiguration]
|
23
|
-
attr_writer :service
|
24
|
-
# @return [ Contrast::Config::LoggerConfiguration]
|
25
|
-
attr_writer :logger
|
26
|
-
# @return [Contrast::Config::HeapDumpConfiguration]
|
27
|
-
attr_writer :heap_dump
|
28
|
-
|
29
|
-
def initialize hsh = {}
|
30
|
-
return unless hsh
|
31
|
-
|
32
|
-
@enable = hsh[:enable]
|
33
|
-
@start_bundled_service = hsh[:start_bundled_service]
|
34
|
-
@omit_body = hsh[:omit_body]
|
35
|
-
@service = Contrast::Config::ServiceConfiguration.new(hsh[:service])
|
36
|
-
@logger = Contrast::Config::LoggerConfiguration.new(hsh[:logger])
|
37
|
-
@ruby = Contrast::Config::RubyConfiguration.new(hsh[:ruby])
|
38
|
-
@heap_dump = Contrast::Config::HeapDumpConfiguration.new(hsh[:heap_dump])
|
39
|
-
end
|
40
|
-
|
41
|
-
# @return [Boolean, true]
|
42
|
-
def start_bundled_service
|
43
|
-
@start_bundled_service.nil? ? true : @start_bundled_service
|
44
|
-
end
|
45
|
-
|
46
|
-
def service
|
47
|
-
@service ||= Contrast::Config::ServiceConfiguration.new
|
48
|
-
end
|
49
|
-
|
50
|
-
def logger
|
51
|
-
@logger ||= Contrast::Config::LoggerConfiguration.new
|
52
|
-
end
|
53
|
-
|
54
|
-
def ruby
|
55
|
-
@ruby ||= Contrast::Config::RubyConfiguration.new
|
56
|
-
end
|
57
|
-
|
58
|
-
def heap_dump
|
59
|
-
@heap_dump ||= Contrast::Config::HeapDumpConfiguration.new
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'contrast/config/api_proxy_configuration'
|
5
|
-
require 'contrast/config/certification_configuration'
|
6
|
-
require 'contrast/config/request_audit_configuration'
|
7
|
-
|
8
|
-
module Contrast
|
9
|
-
module Config
|
10
|
-
# Api keys configuration
|
11
|
-
class ApiConfiguration
|
12
|
-
include Contrast::Config::BaseConfiguration
|
13
|
-
|
14
|
-
# @return [String]
|
15
|
-
attr_accessor :api_key
|
16
|
-
# @return [String]
|
17
|
-
attr_accessor :user_name
|
18
|
-
# @return [String]
|
19
|
-
attr_accessor :service_key
|
20
|
-
attr_writer :url, :proxy, :request_audit, :certificate
|
21
|
-
|
22
|
-
DEFAULT_URL = 'https://app.contrastsecurity.com/Contrast'
|
23
|
-
|
24
|
-
def initialize hsh = {}
|
25
|
-
return unless hsh
|
26
|
-
|
27
|
-
@api_key = hsh[:api_key]
|
28
|
-
@url = hsh[:url]
|
29
|
-
@user_name = hsh[:user_name]
|
30
|
-
@service_key = hsh[:service_key]
|
31
|
-
@proxy = Contrast::Config::ApiProxyConfiguration.new(hsh[:proxy])
|
32
|
-
@request_audit = Contrast::Config::RequestAuditConfiguration.new(hsh[:request_audit])
|
33
|
-
@certificate = Contrast::Config::CertificationConfiguration.new(hsh[:certificate])
|
34
|
-
end
|
35
|
-
|
36
|
-
def url
|
37
|
-
@url.nil? ? DEFAULT_URL : @url
|
38
|
-
end
|
39
|
-
|
40
|
-
# @return [Contrast::Config::ApiProxyConfiguration]
|
41
|
-
def proxy
|
42
|
-
@proxy ||= Contrast::Config::ApiProxyConfiguration.new
|
43
|
-
end
|
44
|
-
|
45
|
-
# @return [Contrast::Config::RequestAuditConfiguration]
|
46
|
-
def request_audit
|
47
|
-
@request_audit ||= Contrast::Config::RequestAuditConfiguration.new
|
48
|
-
end
|
49
|
-
|
50
|
-
# @return [Contrast::Config::CertificationConfiguration]
|
51
|
-
def certificate
|
52
|
-
@certificate ||= Contrast::Config::CertificationConfiguration.new
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Contrast
|
5
|
-
module Config
|
6
|
-
# Common Configuration settings. Those in this section pertain to the Heap Dump collection functionality of the
|
7
|
-
# Agent.
|
8
|
-
class HeapDumpConfiguration
|
9
|
-
include Contrast::Config::BaseConfiguration
|
10
|
-
|
11
|
-
DEFAULT_PATH = 'contrast_heap_dumps' # saved
|
12
|
-
DEFAULT_MS = 10_000
|
13
|
-
DEFAULT_COUNT = 5
|
14
|
-
|
15
|
-
attr_writer :enable, :path, :delay_ms, :window_ms, :count, :clean
|
16
|
-
|
17
|
-
def initialize hsh = {}
|
18
|
-
return unless hsh
|
19
|
-
|
20
|
-
@enable = hsh[:enable]
|
21
|
-
@path = hsh[:path]
|
22
|
-
@delay_ms = hsh[:delay_ms]
|
23
|
-
@window_ms = hsh[:window_ms]
|
24
|
-
@count = hsh[:count]
|
25
|
-
@clean = hsh[:clean]
|
26
|
-
end
|
27
|
-
|
28
|
-
# @return [Boolean, Contrast::Utils::ObjectShare::FALSE] should dumps be taken
|
29
|
-
def enable
|
30
|
-
@enable.nil? ? Contrast::Utils::ObjectShare::FALSE : @enable
|
31
|
-
end
|
32
|
-
|
33
|
-
# @return [String, DEFAULT_PATH] dir to which dumps should be
|
34
|
-
def path
|
35
|
-
@path ||= DEFAULT_PATH
|
36
|
-
end
|
37
|
-
|
38
|
-
# @return [Integer, DEFAULT_MS] time, in ms, after initialization
|
39
|
-
def delay_ms
|
40
|
-
@delay_ms ||= DEFAULT_MS
|
41
|
-
end
|
42
|
-
|
43
|
-
# @return [Integer, DEFAULT_MS] ms between each dump
|
44
|
-
def window_ms
|
45
|
-
@window_ms ||= DEFAULT_MS
|
46
|
-
end
|
47
|
-
|
48
|
-
# @return [Integer, DEFAULT_MS] number of dumps to take
|
49
|
-
def count
|
50
|
-
@count ||= DEFAULT_COUNT
|
51
|
-
end
|
52
|
-
|
53
|
-
# @return [Boolean, Contrast::Utils::ObjectShare::FALSE] remove temporary objects or not
|
54
|
-
def clean
|
55
|
-
@clean.nil? ? Contrast::Utils::ObjectShare::FALSE : @clean
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Contrast
|
5
|
-
module Config
|
6
|
-
# Common Configuration settings. Those in this section pertain to the inventory functionality of the Agent.
|
7
|
-
class InventoryConfiguration
|
8
|
-
include Contrast::Config::BaseConfiguration
|
9
|
-
|
10
|
-
# @return [Array, nil] tags
|
11
|
-
attr_accessor :tags
|
12
|
-
attr_writer :enable, :analyze_libraries
|
13
|
-
|
14
|
-
def initialize hsh = {}
|
15
|
-
return unless hsh
|
16
|
-
|
17
|
-
@enable = hsh[:enable]
|
18
|
-
@analyze_libraries = hsh[:analyze_libraries]
|
19
|
-
@tags = hsh[:tags]
|
20
|
-
end
|
21
|
-
|
22
|
-
# @return [Boolean, true]
|
23
|
-
def enable
|
24
|
-
@enable.nil? ? true : @enable
|
25
|
-
end
|
26
|
-
|
27
|
-
# @return [Boolean, true]
|
28
|
-
def analyze_libraries
|
29
|
-
@analyze_libraries.nil? ? true : @analyze_libraries
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Contrast
|
5
|
-
module Config
|
6
|
-
# Common Configuration settings. Those in this section pertain to the logging in the Agent.
|
7
|
-
class LoggerConfiguration
|
8
|
-
include Contrast::Config::BaseConfiguration
|
9
|
-
|
10
|
-
# @return [String, nil]
|
11
|
-
attr_accessor :path
|
12
|
-
# @return [String, nil]
|
13
|
-
attr_accessor :level
|
14
|
-
# @return [String, nil]
|
15
|
-
attr_accessor :progname
|
16
|
-
|
17
|
-
def initialize hsh = {}
|
18
|
-
return unless hsh
|
19
|
-
|
20
|
-
@path = hsh[:path]
|
21
|
-
@level = hsh[:level]
|
22
|
-
@progname = hsh[:progname]
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|