contrast-agent 4.11.0 → 4.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.simplecov +1 -0
- data/ext/cs__assess_module/cs__assess_module.c +48 -0
- data/ext/cs__assess_module/cs__assess_module.h +7 -0
- data/ext/cs__common/cs__common.c +24 -7
- data/ext/cs__common/cs__common.h +12 -2
- data/ext/cs__contrast_patch/cs__contrast_patch.c +48 -11
- data/ext/cs__contrast_patch/cs__contrast_patch.h +5 -2
- data/ext/cs__os_information/cs__os_information.c +31 -0
- data/ext/cs__os_information/cs__os_information.h +7 -0
- data/ext/{cs__protect_kernel → cs__os_information}/extconf.rb +0 -0
- data/lib/contrast/agent/assess/contrast_event.rb +1 -1
- data/lib/contrast/agent/assess/contrast_object.rb +1 -1
- data/lib/contrast/agent/assess/policy/dynamic_source_factory.rb +2 -0
- data/lib/contrast/agent/assess/policy/policy_node.rb +6 -6
- data/lib/contrast/agent/assess/policy/policy_scanner.rb +5 -0
- data/lib/contrast/agent/assess/policy/preshift.rb +19 -6
- data/lib/contrast/agent/assess/policy/propagation_method.rb +2 -116
- data/lib/contrast/agent/assess/policy/propagation_node.rb +4 -4
- data/lib/contrast/agent/assess/policy/propagator/center.rb +1 -1
- data/lib/contrast/agent/assess/policy/propagator/database_write.rb +2 -0
- data/lib/contrast/agent/assess/policy/propagator/substitution.rb +2 -154
- data/lib/contrast/agent/assess/policy/source_method.rb +2 -71
- data/lib/contrast/agent/assess/policy/trigger_method.rb +45 -110
- data/lib/contrast/agent/assess/policy/trigger_node.rb +62 -21
- data/lib/contrast/agent/assess/policy/trigger_validation/xss_validator.rb +1 -1
- data/lib/contrast/agent/assess/property/tagged.rb +66 -189
- data/lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb +40 -6
- data/lib/contrast/agent/deadzone/policy/policy.rb +6 -0
- data/lib/contrast/agent/inventory/dependency_usage_analysis.rb +1 -0
- data/lib/contrast/agent/metric_telemetry_event.rb +26 -0
- data/lib/contrast/agent/middleware.rb +14 -62
- data/lib/contrast/agent/patching/policy/after_load_patcher.rb +0 -1
- data/lib/contrast/agent/patching/policy/method_policy.rb +3 -44
- data/lib/contrast/agent/patching/policy/method_policy_extend.rb +111 -0
- data/lib/contrast/agent/patching/policy/patch.rb +37 -238
- data/lib/contrast/agent/patching/policy/patcher.rb +15 -50
- data/lib/contrast/agent/reporting/report.rb +21 -0
- data/lib/contrast/agent/reporting/reporter.rb +142 -0
- data/lib/contrast/agent/reporting/reporting_events/finding.rb +90 -0
- data/lib/contrast/agent/reporting/reporting_events/preflight.rb +25 -0
- data/lib/contrast/agent/reporting/reporting_events/preflight_message.rb +56 -0
- data/lib/contrast/agent/reporting/reporting_events/reporting_event.rb +37 -0
- data/lib/contrast/agent/reporting/reporting_utilities/audit.rb +127 -0
- data/lib/contrast/agent/reporting/reporting_utilities/reporter_client.rb +168 -0
- data/lib/contrast/agent/reporting/reporting_utilities/reporting_storage.rb +66 -0
- data/lib/contrast/agent/request.rb +2 -81
- data/lib/contrast/agent/request_context.rb +18 -126
- data/lib/contrast/agent/request_context_extend.rb +138 -0
- data/lib/contrast/agent/request_handler.rb +7 -3
- data/lib/contrast/agent/response.rb +2 -73
- data/lib/contrast/agent/rule_set.rb +2 -4
- data/lib/contrast/agent/startup_metrics_telemetry_event.rb +94 -0
- data/lib/contrast/agent/static_analysis.rb +5 -3
- data/lib/contrast/agent/telemetry.rb +137 -0
- data/lib/contrast/agent/telemetry_event.rb +33 -0
- data/lib/contrast/agent/thread_watcher.rb +66 -11
- data/lib/contrast/agent/version.rb +1 -1
- data/lib/contrast/agent.rb +21 -1
- data/lib/contrast/api/communication/connection_status.rb +10 -7
- data/lib/contrast/api/communication/messaging_queue.rb +37 -3
- data/lib/contrast/api/communication/response_processor.rb +15 -8
- data/lib/contrast/api/communication/service_lifecycle.rb +13 -3
- data/lib/contrast/api/communication/socket.rb +6 -8
- data/lib/contrast/api/communication/socket_client.rb +29 -12
- data/lib/contrast/api/communication/speedracer.rb +37 -1
- data/lib/contrast/api/communication/tcp_socket.rb +4 -3
- data/lib/contrast/api/communication/unix_socket.rb +1 -0
- data/lib/contrast/api/decorators/finding.rb +45 -0
- data/lib/contrast/components/api.rb +90 -0
- data/lib/contrast/components/app_context.rb +10 -41
- data/lib/contrast/components/app_context_extend.rb +78 -0
- data/lib/contrast/components/assess.rb +7 -0
- data/lib/contrast/components/base.rb +23 -0
- data/lib/contrast/components/config.rb +92 -13
- data/lib/contrast/components/contrast_service.rb +11 -0
- data/lib/contrast/components/sampling.rb +2 -2
- data/lib/contrast/config/agent_configuration.rb +1 -1
- data/lib/contrast/config/api_configuration.rb +27 -0
- data/lib/contrast/config/api_proxy_configuration.rb +14 -0
- data/lib/contrast/config/application_configuration.rb +2 -3
- data/lib/contrast/config/assess_configuration.rb +3 -2
- data/lib/contrast/config/base_configuration.rb +17 -28
- data/lib/contrast/config/certification_configuration.rb +15 -0
- data/lib/contrast/config/env_variables.rb +18 -0
- data/lib/contrast/config/heap_dump_configuration.rb +6 -6
- data/lib/contrast/config/inventory_configuration.rb +1 -5
- data/lib/contrast/config/protect_rule_configuration.rb +1 -1
- data/lib/contrast/config/request_audit_configuration.rb +18 -0
- data/lib/contrast/config/root_configuration.rb +1 -0
- data/lib/contrast/config/ruby_configuration.rb +6 -6
- data/lib/contrast/config/service_configuration.rb +2 -2
- data/lib/contrast/config.rb +1 -1
- data/lib/contrast/configuration.rb +4 -2
- data/lib/contrast/extension/assess/array.rb +5 -7
- data/lib/contrast/framework/manager.rb +22 -44
- data/lib/contrast/framework/manager_extend.rb +50 -0
- data/lib/contrast/framework/rails/patch/action_controller_live_buffer.rb +9 -6
- data/lib/contrast/framework/rails/patch/support.rb +31 -29
- data/lib/contrast/framework/rails/railtie.rb +1 -1
- data/lib/contrast/framework/sinatra/support.rb +2 -1
- data/lib/contrast/logger/application.rb +4 -0
- data/lib/contrast/logger/log.rb +8 -103
- data/lib/contrast/utils/assess/propagation_method_utils.rb +129 -0
- data/lib/contrast/utils/assess/property/tagged_utils.rb +165 -0
- data/lib/contrast/utils/assess/source_method_utils.rb +83 -0
- data/lib/contrast/utils/assess/tracking_util.rb +20 -15
- data/lib/contrast/utils/assess/trigger_method_utils.rb +138 -0
- data/lib/contrast/utils/class_util.rb +65 -54
- data/lib/contrast/utils/exclude_key.rb +20 -0
- data/lib/contrast/utils/findings.rb +62 -0
- data/lib/contrast/utils/hash_digest.rb +10 -73
- data/lib/contrast/utils/hash_digest_extend.rb +86 -0
- data/lib/contrast/utils/head_dump_utils_extend.rb +74 -0
- data/lib/contrast/utils/heap_dump_util.rb +2 -65
- data/lib/contrast/utils/invalid_configuration_util.rb +29 -0
- data/lib/contrast/utils/io_util.rb +1 -1
- data/lib/contrast/utils/log_utils.rb +108 -0
- data/lib/contrast/utils/lru_cache.rb +4 -2
- data/lib/contrast/utils/metrics_hash.rb +59 -0
- data/lib/contrast/utils/middleware_utils.rb +87 -0
- data/lib/contrast/utils/net_http_base.rb +158 -0
- data/lib/contrast/utils/object_share.rb +1 -0
- data/lib/contrast/utils/os.rb +23 -0
- data/lib/contrast/utils/patching/policy/patch_utils.rb +232 -0
- data/lib/contrast/utils/patching/policy/patcher_utils.rb +54 -0
- data/lib/contrast/utils/request_utils.rb +88 -0
- data/lib/contrast/utils/response_utils.rb +97 -0
- data/lib/contrast/utils/substitution_utils.rb +167 -0
- data/lib/contrast/utils/tag_util.rb +9 -9
- data/lib/contrast/utils/telemetry.rb +79 -0
- data/lib/contrast/utils/telemetry_client.rb +90 -0
- data/lib/contrast/utils/telemetry_identifier.rb +130 -0
- data/lib/contrast.rb +19 -1
- data/resources/assess/policy.json +12 -6
- data/resources/deadzone/policy.json +86 -5
- data/ruby-agent.gemspec +7 -6
- data/service_executables/VERSION +1 -1
- data/service_executables/linux/contrast-service +0 -0
- data/service_executables/mac/contrast-service +0 -0
- metadata +68 -26
- data/ext/cs__protect_kernel/cs__protect_kernel.c +0 -47
- data/ext/cs__protect_kernel/cs__protect_kernel.h +0 -12
- data/lib/contrast/config/default_value.rb +0 -17
- data/lib/contrast/extension/protect/kernel.rb +0 -29
@@ -1,11 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"deadzones":[
|
3
3
|
{
|
4
|
-
"class_name":"Rspec::Core::BacktraceFormatter",
|
5
|
-
"instance_method":true,
|
6
|
-
"method_visibility": "private",
|
7
|
-
"method_name":"matches?"
|
8
|
-
},{
|
9
4
|
"class_name":"Rspec::Core::Example",
|
10
5
|
"instance_method":true,
|
11
6
|
"method_visibility": "private",
|
@@ -205,6 +200,92 @@
|
|
205
200
|
"method_visibility": "public",
|
206
201
|
"method_name":"exists?",
|
207
202
|
"code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/request/session.rb#L201"
|
203
|
+
},{
|
204
|
+
"class_name": "RSpec::Matchers::BuiltIn::BaseMatcher"
|
205
|
+
},{
|
206
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeAKindOf"
|
207
|
+
},{
|
208
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeAnInstanceOf"
|
209
|
+
},{
|
210
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeBetween"
|
211
|
+
},{
|
212
|
+
"class_name": "RSpec::Matchers::BuiltIn::Be"
|
213
|
+
},{
|
214
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeComparedTo"
|
215
|
+
},{
|
216
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeFalsey"
|
217
|
+
},{
|
218
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeHelpers"
|
219
|
+
},{
|
220
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeNil"
|
221
|
+
},{
|
222
|
+
"class_name": "RSpec::Matchers::BuiltIn::BePredicate"
|
223
|
+
},{
|
224
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeTruthy"
|
225
|
+
},{
|
226
|
+
"class_name": "RSpec::Matchers::BuiltIn::BeWithin"
|
227
|
+
},{
|
228
|
+
"class_name": "RSpec::Matchers::BuiltIn::Change"
|
229
|
+
},{
|
230
|
+
"class_name": "RSpec::Matchers::BuiltIn::ChangeRelatively"
|
231
|
+
},{
|
232
|
+
"class_name": "RSpec::Matchers::BuiltIn::SpecificValuesChange"
|
233
|
+
},{
|
234
|
+
"class_name": "RSpec::Matchers::BuiltIn::Compound"
|
235
|
+
},{
|
236
|
+
"class_name": "RSpec::Matchers::BuiltIn::Compound::And"
|
237
|
+
}, {
|
238
|
+
"class_name": "RSpec::Matchers::BuiltIn::Compound::Or"
|
239
|
+
},{
|
240
|
+
"class_name": "RSpec::Matchers::BuiltIn::ContainExactly"
|
241
|
+
},{
|
242
|
+
"class_name": "RSpec::Matchers::BuiltIn::Cover"
|
243
|
+
},{
|
244
|
+
"class_name": "RSpec::Matchers::BuiltIn::EndWith"
|
245
|
+
},{
|
246
|
+
"class_name": "RSpec::Matchers::BuiltIn::Eq"
|
247
|
+
},{
|
248
|
+
"class_name": "RSpec::Matchers::BuiltIn::Eql"
|
249
|
+
},{
|
250
|
+
"class_name": "RSpec::Matchers::BuiltIn::Equal"
|
251
|
+
},{
|
252
|
+
"class_name": "RSpec::Matchers::BuiltIn::Exist"
|
253
|
+
},{
|
254
|
+
"class_name": "RSpec::Matchers::BuiltIn::Has"
|
255
|
+
},{
|
256
|
+
"class_name": "RSpec::Matchers::BuiltIn::HaveAttributes"
|
257
|
+
},{
|
258
|
+
"class_name": "RSpec::Matchers::BuiltIn::All"
|
259
|
+
},{
|
260
|
+
"class_name": "RSpec::Matchers::BuiltIn::Match"
|
261
|
+
},{
|
262
|
+
"class_name": "RSpec::Matchers::BuiltIn::NegativeOperatorMatcher"
|
263
|
+
},{
|
264
|
+
"class_name": "RSpec::Matchers::BuiltIn::OperatorMatcher"
|
265
|
+
},{
|
266
|
+
"class_name": "RSpec::Matchers::BuiltIn::Output"
|
267
|
+
},{
|
268
|
+
"class_name": "RSpec::Matchers::BuiltIn::PositiveOperatorMatcher"
|
269
|
+
},{
|
270
|
+
"class_name": "RSpec::Matchers::BuiltIn::RaiseError"
|
271
|
+
},{
|
272
|
+
"class_name": "RSpec::Matchers::BuiltIn::RespondTo"
|
273
|
+
},{
|
274
|
+
"class_name": "RSpec::Matchers::BuiltIn::Satisfy"
|
275
|
+
},{
|
276
|
+
"class_name": "RSpec::Matchers::BuiltIn::StartWith"
|
277
|
+
},{
|
278
|
+
"class_name": "RSpec::Matchers::BuiltIn::ThrowSymbol"
|
279
|
+
},{
|
280
|
+
"class_name": "RSpec::Matchers::BuiltIn::YieldControl"
|
281
|
+
},{
|
282
|
+
"class_name": "RSpec::Matchers::BuiltIn::YieldSuccessiveArgs"
|
283
|
+
},{
|
284
|
+
"class_name": "RSpec::Matchers::BuiltIn::YieldWithArgs"
|
285
|
+
},{
|
286
|
+
"class_name": "RSpec::Matchers::BuiltIn::YieldWithNoArgs"
|
287
|
+
},{
|
288
|
+
"class_name": "SimpleCov"
|
208
289
|
}
|
209
290
|
]
|
210
291
|
}
|
data/ruby-agent.gemspec
CHANGED
@@ -89,11 +89,11 @@ end
|
|
89
89
|
|
90
90
|
# Dependencies used to run all of our Rubocop during the linting phase.
|
91
91
|
def self.add_rubocop spec
|
92
|
-
spec.add_development_dependency 'rubocop', '1.
|
93
|
-
spec.add_development_dependency 'rubocop-performance', '1.
|
94
|
-
spec.add_development_dependency 'rubocop-rails', '2.
|
95
|
-
spec.add_development_dependency 'rubocop-rake', '0.
|
96
|
-
spec.add_development_dependency 'rubocop-rspec', '2.
|
92
|
+
spec.add_development_dependency 'rubocop', '1.22.3'
|
93
|
+
spec.add_development_dependency 'rubocop-performance', '1.12.0'
|
94
|
+
spec.add_development_dependency 'rubocop-rails', '2.12.4'
|
95
|
+
spec.add_development_dependency 'rubocop-rake', '0.6.0'
|
96
|
+
spec.add_development_dependency 'rubocop-rspec', '2.6.0'
|
97
97
|
end
|
98
98
|
|
99
99
|
# Dependencies not mocked out during RSpec that we test real code of, beyond just frameworks.
|
@@ -150,7 +150,8 @@ def self.add_files spec
|
|
150
150
|
'shared_libraries/libfunchook.so',
|
151
151
|
'shared_libraries/funchook.h',
|
152
152
|
'funchook/src/libfunchook.dylib',
|
153
|
-
'funchook/src/libfunchook.so'
|
153
|
+
'funchook/src/libfunchook.so',
|
154
|
+
'.secrets.baseline')
|
154
155
|
end
|
155
156
|
end
|
156
157
|
|
data/service_executables/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.27.3
|
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: 4.
|
4
|
+
version: 4.14.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: 2021-
|
16
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: bundler
|
@@ -147,70 +147,70 @@ dependencies:
|
|
147
147
|
requirements:
|
148
148
|
- - '='
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: 1.
|
150
|
+
version: 1.22.3
|
151
151
|
type: :development
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
155
|
- - '='
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: 1.
|
157
|
+
version: 1.22.3
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: rubocop-performance
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
162
|
- - '='
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: 1.
|
164
|
+
version: 1.12.0
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
169
|
- - '='
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version: 1.
|
171
|
+
version: 1.12.0
|
172
172
|
- !ruby/object:Gem::Dependency
|
173
173
|
name: rubocop-rails
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
176
|
- - '='
|
177
177
|
- !ruby/object:Gem::Version
|
178
|
-
version: 2.
|
178
|
+
version: 2.12.4
|
179
179
|
type: :development
|
180
180
|
prerelease: false
|
181
181
|
version_requirements: !ruby/object:Gem::Requirement
|
182
182
|
requirements:
|
183
183
|
- - '='
|
184
184
|
- !ruby/object:Gem::Version
|
185
|
-
version: 2.
|
185
|
+
version: 2.12.4
|
186
186
|
- !ruby/object:Gem::Dependency
|
187
187
|
name: rubocop-rake
|
188
188
|
requirement: !ruby/object:Gem::Requirement
|
189
189
|
requirements:
|
190
190
|
- - '='
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
version: 0.
|
192
|
+
version: 0.6.0
|
193
193
|
type: :development
|
194
194
|
prerelease: false
|
195
195
|
version_requirements: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
197
|
- - '='
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version: 0.
|
199
|
+
version: 0.6.0
|
200
200
|
- !ruby/object:Gem::Dependency
|
201
201
|
name: rubocop-rspec
|
202
202
|
requirement: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
204
|
- - '='
|
205
205
|
- !ruby/object:Gem::Version
|
206
|
-
version: 2.
|
206
|
+
version: 2.6.0
|
207
207
|
type: :development
|
208
208
|
prerelease: false
|
209
209
|
version_requirements: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
211
|
- - '='
|
212
212
|
- !ruby/object:Gem::Version
|
213
|
-
version: 2.
|
213
|
+
version: 2.6.0
|
214
214
|
- !ruby/object:Gem::Dependency
|
215
215
|
name: simplecov
|
216
216
|
requirement: !ruby/object:Gem::Requirement
|
@@ -617,20 +617,20 @@ executables:
|
|
617
617
|
- contrast_service
|
618
618
|
extensions:
|
619
619
|
- ext/cs__common/extconf.rb
|
620
|
-
- ext/
|
621
|
-
- ext/cs__assess_regexp/extconf.rb
|
622
|
-
- ext/cs__protect_kernel/extconf.rb
|
623
|
-
- ext/cs__assess_marshal_module/extconf.rb
|
624
|
-
- ext/cs__assess_yield_track/extconf.rb
|
625
|
-
- ext/cs__assess_string_interpolation26/extconf.rb
|
626
|
-
- ext/cs__assess_fiber_track/extconf.rb
|
620
|
+
- ext/cs__assess_basic_object/extconf.rb
|
627
621
|
- ext/cs__assess_string/extconf.rb
|
628
622
|
- ext/cs__assess_hash/extconf.rb
|
623
|
+
- ext/cs__assess_module/extconf.rb
|
629
624
|
- ext/cs__assess_kernel/extconf.rb
|
625
|
+
- ext/cs__assess_array/extconf.rb
|
630
626
|
- ext/cs__contrast_patch/extconf.rb
|
631
|
-
- ext/
|
632
|
-
- ext/
|
627
|
+
- ext/cs__os_information/extconf.rb
|
628
|
+
- ext/cs__assess_marshal_module/extconf.rb
|
629
|
+
- ext/cs__assess_fiber_track/extconf.rb
|
630
|
+
- ext/cs__assess_string_interpolation26/extconf.rb
|
633
631
|
- ext/cs__assess_active_record_named/extconf.rb
|
632
|
+
- ext/cs__assess_regexp/extconf.rb
|
633
|
+
- ext/cs__assess_yield_track/extconf.rb
|
634
634
|
extra_rdoc_files: []
|
635
635
|
files:
|
636
636
|
- ".clang-format"
|
@@ -688,9 +688,9 @@ files:
|
|
688
688
|
- ext/cs__contrast_patch/cs__contrast_patch.c
|
689
689
|
- ext/cs__contrast_patch/cs__contrast_patch.h
|
690
690
|
- ext/cs__contrast_patch/extconf.rb
|
691
|
-
- ext/
|
692
|
-
- ext/
|
693
|
-
- ext/
|
691
|
+
- ext/cs__os_information/cs__os_information.c
|
692
|
+
- ext/cs__os_information/cs__os_information.h
|
693
|
+
- ext/cs__os_information/extconf.rb
|
694
694
|
- ext/extconf_common.rb
|
695
695
|
- funchook/LICENSE
|
696
696
|
- funchook/Makefile.in
|
@@ -898,11 +898,13 @@ files:
|
|
898
898
|
- lib/contrast/agent/inventory/policy/datastores.rb
|
899
899
|
- lib/contrast/agent/inventory/policy/policy.rb
|
900
900
|
- lib/contrast/agent/inventory/policy/trigger_node.rb
|
901
|
+
- lib/contrast/agent/metric_telemetry_event.rb
|
901
902
|
- lib/contrast/agent/middleware.rb
|
902
903
|
- lib/contrast/agent/module_data.rb
|
903
904
|
- lib/contrast/agent/patching/policy/after_load_patch.rb
|
904
905
|
- lib/contrast/agent/patching/policy/after_load_patcher.rb
|
905
906
|
- lib/contrast/agent/patching/policy/method_policy.rb
|
907
|
+
- lib/contrast/agent/patching/policy/method_policy_extend.rb
|
906
908
|
- lib/contrast/agent/patching/policy/module_policy.rb
|
907
909
|
- lib/contrast/agent/patching/policy/patch.rb
|
908
910
|
- lib/contrast/agent/patching/policy/patch_status.rb
|
@@ -940,15 +942,28 @@ files:
|
|
940
942
|
- lib/contrast/agent/protect/rule/xxe.rb
|
941
943
|
- lib/contrast/agent/protect/rule/xxe/entity_wrapper.rb
|
942
944
|
- lib/contrast/agent/reaction_processor.rb
|
945
|
+
- lib/contrast/agent/reporting/report.rb
|
946
|
+
- lib/contrast/agent/reporting/reporter.rb
|
947
|
+
- lib/contrast/agent/reporting/reporting_events/finding.rb
|
948
|
+
- lib/contrast/agent/reporting/reporting_events/preflight.rb
|
949
|
+
- lib/contrast/agent/reporting/reporting_events/preflight_message.rb
|
950
|
+
- lib/contrast/agent/reporting/reporting_events/reporting_event.rb
|
951
|
+
- lib/contrast/agent/reporting/reporting_utilities/audit.rb
|
952
|
+
- lib/contrast/agent/reporting/reporting_utilities/reporter_client.rb
|
953
|
+
- lib/contrast/agent/reporting/reporting_utilities/reporting_storage.rb
|
943
954
|
- lib/contrast/agent/request.rb
|
944
955
|
- lib/contrast/agent/request_context.rb
|
956
|
+
- lib/contrast/agent/request_context_extend.rb
|
945
957
|
- lib/contrast/agent/request_handler.rb
|
946
958
|
- lib/contrast/agent/response.rb
|
947
959
|
- lib/contrast/agent/rewriter.rb
|
948
960
|
- lib/contrast/agent/rule_set.rb
|
949
961
|
- lib/contrast/agent/scope.rb
|
950
962
|
- lib/contrast/agent/service_heartbeat.rb
|
963
|
+
- lib/contrast/agent/startup_metrics_telemetry_event.rb
|
951
964
|
- lib/contrast/agent/static_analysis.rb
|
965
|
+
- lib/contrast/agent/telemetry.rb
|
966
|
+
- lib/contrast/agent/telemetry_event.rb
|
952
967
|
- lib/contrast/agent/thread.rb
|
953
968
|
- lib/contrast/agent/thread_watcher.rb
|
954
969
|
- lib/contrast/agent/tracepoint_hook.rb
|
@@ -972,6 +987,7 @@ files:
|
|
972
987
|
- lib/contrast/api/decorators/application_settings.rb
|
973
988
|
- lib/contrast/api/decorators/application_startup.rb
|
974
989
|
- lib/contrast/api/decorators/application_update.rb
|
990
|
+
- lib/contrast/api/decorators/finding.rb
|
975
991
|
- lib/contrast/api/decorators/http_request.rb
|
976
992
|
- lib/contrast/api/decorators/input_analysis.rb
|
977
993
|
- lib/contrast/api/decorators/instrumentation_mode.rb
|
@@ -990,7 +1006,9 @@ files:
|
|
990
1006
|
- lib/contrast/api/dtm.pb.rb
|
991
1007
|
- lib/contrast/api/settings.pb.rb
|
992
1008
|
- lib/contrast/components/agent.rb
|
1009
|
+
- lib/contrast/components/api.rb
|
993
1010
|
- lib/contrast/components/app_context.rb
|
1011
|
+
- lib/contrast/components/app_context_extend.rb
|
994
1012
|
- lib/contrast/components/assess.rb
|
995
1013
|
- lib/contrast/components/base.rb
|
996
1014
|
- lib/contrast/components/config.rb
|
@@ -1004,11 +1022,14 @@ files:
|
|
1004
1022
|
- lib/contrast/components/settings.rb
|
1005
1023
|
- lib/contrast/config.rb
|
1006
1024
|
- lib/contrast/config/agent_configuration.rb
|
1025
|
+
- lib/contrast/config/api_configuration.rb
|
1026
|
+
- lib/contrast/config/api_proxy_configuration.rb
|
1007
1027
|
- lib/contrast/config/application_configuration.rb
|
1008
1028
|
- lib/contrast/config/assess_configuration.rb
|
1009
1029
|
- lib/contrast/config/assess_rules_configuration.rb
|
1010
1030
|
- lib/contrast/config/base_configuration.rb
|
1011
|
-
- lib/contrast/config/
|
1031
|
+
- lib/contrast/config/certification_configuration.rb
|
1032
|
+
- lib/contrast/config/env_variables.rb
|
1012
1033
|
- lib/contrast/config/exception_configuration.rb
|
1013
1034
|
- lib/contrast/config/heap_dump_configuration.rb
|
1014
1035
|
- lib/contrast/config/inventory_configuration.rb
|
@@ -1016,6 +1037,7 @@ files:
|
|
1016
1037
|
- lib/contrast/config/protect_configuration.rb
|
1017
1038
|
- lib/contrast/config/protect_rule_configuration.rb
|
1018
1039
|
- lib/contrast/config/protect_rules_configuration.rb
|
1040
|
+
- lib/contrast/config/request_audit_configuration.rb
|
1019
1041
|
- lib/contrast/config/root_configuration.rb
|
1020
1042
|
- lib/contrast/config/ruby_configuration.rb
|
1021
1043
|
- lib/contrast/config/sampling_configuration.rb
|
@@ -1039,12 +1061,12 @@ files:
|
|
1039
1061
|
- lib/contrast/extension/kernel.rb
|
1040
1062
|
- lib/contrast/extension/module.rb
|
1041
1063
|
- lib/contrast/extension/protect.rb
|
1042
|
-
- lib/contrast/extension/protect/kernel.rb
|
1043
1064
|
- lib/contrast/extension/protect/psych.rb
|
1044
1065
|
- lib/contrast/extension/thread.rb
|
1045
1066
|
- lib/contrast/framework/base_support.rb
|
1046
1067
|
- lib/contrast/framework/grape/support.rb
|
1047
1068
|
- lib/contrast/framework/manager.rb
|
1069
|
+
- lib/contrast/framework/manager_extend.rb
|
1048
1070
|
- lib/contrast/framework/platform_version.rb
|
1049
1071
|
- lib/contrast/framework/rack/patch/session_cookie.rb
|
1050
1072
|
- lib/contrast/framework/rack/patch/support.rb
|
@@ -1069,26 +1091,46 @@ files:
|
|
1069
1091
|
- lib/contrast/security_exception.rb
|
1070
1092
|
- lib/contrast/tasks/config.rb
|
1071
1093
|
- lib/contrast/tasks/service.rb
|
1094
|
+
- lib/contrast/utils/assess/propagation_method_utils.rb
|
1095
|
+
- lib/contrast/utils/assess/property/tagged_utils.rb
|
1072
1096
|
- lib/contrast/utils/assess/sampling_util.rb
|
1097
|
+
- lib/contrast/utils/assess/source_method_utils.rb
|
1073
1098
|
- lib/contrast/utils/assess/tracking_util.rb
|
1099
|
+
- lib/contrast/utils/assess/trigger_method_utils.rb
|
1074
1100
|
- lib/contrast/utils/class_util.rb
|
1075
1101
|
- lib/contrast/utils/duck_utils.rb
|
1076
1102
|
- lib/contrast/utils/env_configuration_item.rb
|
1103
|
+
- lib/contrast/utils/exclude_key.rb
|
1104
|
+
- lib/contrast/utils/findings.rb
|
1077
1105
|
- lib/contrast/utils/hash_digest.rb
|
1106
|
+
- lib/contrast/utils/hash_digest_extend.rb
|
1107
|
+
- lib/contrast/utils/head_dump_utils_extend.rb
|
1078
1108
|
- lib/contrast/utils/heap_dump_util.rb
|
1079
1109
|
- lib/contrast/utils/invalid_configuration_util.rb
|
1080
1110
|
- lib/contrast/utils/io_util.rb
|
1081
1111
|
- lib/contrast/utils/job_servers_running.rb
|
1112
|
+
- lib/contrast/utils/log_utils.rb
|
1082
1113
|
- lib/contrast/utils/lru_cache.rb
|
1114
|
+
- lib/contrast/utils/metrics_hash.rb
|
1115
|
+
- lib/contrast/utils/middleware_utils.rb
|
1116
|
+
- lib/contrast/utils/net_http_base.rb
|
1083
1117
|
- lib/contrast/utils/object_share.rb
|
1084
1118
|
- lib/contrast/utils/os.rb
|
1119
|
+
- lib/contrast/utils/patching/policy/patch_utils.rb
|
1120
|
+
- lib/contrast/utils/patching/policy/patcher_utils.rb
|
1085
1121
|
- lib/contrast/utils/preflight_util.rb
|
1122
|
+
- lib/contrast/utils/request_utils.rb
|
1086
1123
|
- lib/contrast/utils/resource_loader.rb
|
1124
|
+
- lib/contrast/utils/response_utils.rb
|
1087
1125
|
- lib/contrast/utils/ruby_ast_rewriter.rb
|
1088
1126
|
- lib/contrast/utils/sha256_builder.rb
|
1089
1127
|
- lib/contrast/utils/stack_trace_utils.rb
|
1090
1128
|
- lib/contrast/utils/string_utils.rb
|
1129
|
+
- lib/contrast/utils/substitution_utils.rb
|
1091
1130
|
- lib/contrast/utils/tag_util.rb
|
1131
|
+
- lib/contrast/utils/telemetry.rb
|
1132
|
+
- lib/contrast/utils/telemetry_client.rb
|
1133
|
+
- lib/contrast/utils/telemetry_identifier.rb
|
1092
1134
|
- lib/contrast/utils/thread_tracker.rb
|
1093
1135
|
- lib/contrast/utils/timer.rb
|
1094
1136
|
- resources/assess/policy.json
|
@@ -1,47 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2021 Contrast Security, Inc. See
|
2
|
-
* https://www.contrastsecurity.com/enduser-terms-0317a for more details. */
|
3
|
-
|
4
|
-
#include "cs__protect_kernel.h"
|
5
|
-
#include "../cs__common/cs__common.h"
|
6
|
-
#include <ruby.h>
|
7
|
-
|
8
|
-
static VALUE contrast_protect_fork(const int argc, const VALUE *argv,
|
9
|
-
const VALUE self) {
|
10
|
-
VALUE ret;
|
11
|
-
if (rb_block_given_p()) {
|
12
|
-
/* We call our hook, but it's a little complicated.
|
13
|
-
* We wrap the fork block with our own lambda in
|
14
|
-
* order to instrument it. There are no public
|
15
|
-
* methods in the Ruby C API to set the prevailing
|
16
|
-
* block, so we have to use rb_funcall_with_block.
|
17
|
-
* Also, rb_funcall_with_block does a public call,
|
18
|
-
* and our method is private.
|
19
|
-
* So we (as a hack) temporarily set it to public.
|
20
|
-
*/
|
21
|
-
VALUE wrapper;
|
22
|
-
wrapper =
|
23
|
-
rb_funcall_with_block(kernel_protect, rb_sym_protect_kernel_wrapper,
|
24
|
-
0, NULL, rb_block_proc());
|
25
|
-
rb_funcall(rb_mKernel, rb_intern("public"), 1,
|
26
|
-
ID2SYM(rb_sym_protect_kernel_fork));
|
27
|
-
ret = rb_funcall_with_block(self, rb_sym_protect_kernel_fork, argc,
|
28
|
-
argv, wrapper);
|
29
|
-
rb_funcall(rb_mKernel, rb_intern("private"), 1,
|
30
|
-
ID2SYM(rb_sym_protect_kernel_fork));
|
31
|
-
} else {
|
32
|
-
ret = rb_funcall2(self, rb_sym_protect_kernel_fork, argc, argv);
|
33
|
-
}
|
34
|
-
return ret;
|
35
|
-
}
|
36
|
-
|
37
|
-
void Init_cs__protect_kernel(void) {
|
38
|
-
VALUE core_protect = rb_define_module_under(core_extensions, "Protect");
|
39
|
-
kernel_protect = rb_define_module_under(core_protect, "Kernel");
|
40
|
-
rb_sym_protect_kernel_wrapper = rb_intern("build_wrapper");
|
41
|
-
|
42
|
-
rb_sym_protect_kernel_fork =
|
43
|
-
contrast_register_patch("Kernel", "fork", &contrast_protect_fork);
|
44
|
-
|
45
|
-
rb_sym_protect_kernel_fork = contrast_register_singleton_patch(
|
46
|
-
"Kernel", "fork", &contrast_protect_fork);
|
47
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#include <ruby.h>
|
2
|
-
|
3
|
-
extern VALUE rb_vm_top_self(void);
|
4
|
-
|
5
|
-
static VALUE kernel_protect;
|
6
|
-
static VALUE rb_sym_protect_kernel_fork;
|
7
|
-
static VALUE rb_sym_protect_kernel_wrapper;
|
8
|
-
|
9
|
-
static VALUE contrast_protect_fork(const int argc, const VALUE *argv,
|
10
|
-
const VALUE self);
|
11
|
-
|
12
|
-
void Init_cs__protect_kernel(void);
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# Copyright (c) 2021 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
|
-
# This is the wrapper for the default values in the configurations, used to
|
7
|
-
# differentiate between nil or false defaults and things being set
|
8
|
-
# explicitly to false.
|
9
|
-
class DefaultValue
|
10
|
-
attr_reader :value
|
11
|
-
|
12
|
-
def initialize value
|
13
|
-
@value = value
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# Copyright (c) 2021 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 Extension
|
6
|
-
module Protect
|
7
|
-
# This Module functions as our patch into the Kernel class for Protect,
|
8
|
-
# allowing us to track activity as it crosses spawned processes.
|
9
|
-
module Kernel
|
10
|
-
class << self
|
11
|
-
def build_wrapper
|
12
|
-
lambda {
|
13
|
-
proc_start
|
14
|
-
yield
|
15
|
-
# AtExitHook handles sending any messages generated in the new forked process
|
16
|
-
}
|
17
|
-
end
|
18
|
-
|
19
|
-
def proc_start
|
20
|
-
context = Contrast::Agent::REQUEST_TRACKER.current
|
21
|
-
return unless context
|
22
|
-
|
23
|
-
context.reset_activity
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|