contrast-agent 3.15.0 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -0
  3. data/ext/cs__assess_marshal_module/cs__assess_marshal_module.c +22 -10
  4. data/ext/cs__assess_marshal_module/cs__assess_marshal_module.h +4 -3
  5. data/lib/contrast/agent.rb +4 -12
  6. data/lib/contrast/agent/assess/contrast_event.rb +121 -130
  7. data/lib/contrast/agent/assess/contrast_object.rb +51 -0
  8. data/lib/contrast/agent/assess/events/source_event.rb +5 -10
  9. data/lib/contrast/agent/assess/policy/dynamic_source_factory.rb +10 -3
  10. data/lib/contrast/agent/assess/policy/patcher.rb +4 -3
  11. data/lib/contrast/agent/assess/policy/policy_node.rb +46 -69
  12. data/lib/contrast/agent/assess/policy/policy_scanner.rb +19 -2
  13. data/lib/contrast/agent/assess/policy/preshift.rb +3 -3
  14. data/lib/contrast/agent/assess/policy/propagation_method.rb +13 -19
  15. data/lib/contrast/agent/assess/policy/propagation_node.rb +12 -24
  16. data/lib/contrast/agent/assess/policy/propagator/append.rb +1 -2
  17. data/lib/contrast/agent/assess/policy/propagator/center.rb +1 -2
  18. data/lib/contrast/agent/assess/policy/propagator/custom.rb +1 -1
  19. data/lib/contrast/agent/assess/policy/propagator/database_write.rb +1 -3
  20. data/lib/contrast/agent/assess/policy/propagator/insert.rb +2 -3
  21. data/lib/contrast/agent/assess/policy/propagator/keep.rb +1 -2
  22. data/lib/contrast/agent/assess/policy/propagator/match_data.rb +3 -5
  23. data/lib/contrast/agent/assess/policy/propagator/next.rb +1 -2
  24. data/lib/contrast/agent/assess/policy/propagator/prepend.rb +1 -2
  25. data/lib/contrast/agent/assess/policy/propagator/remove.rb +2 -4
  26. data/lib/contrast/agent/assess/policy/propagator/replace.rb +1 -2
  27. data/lib/contrast/agent/assess/policy/propagator/reverse.rb +1 -2
  28. data/lib/contrast/agent/assess/policy/propagator/select.rb +4 -7
  29. data/lib/contrast/agent/assess/policy/propagator/splat.rb +2 -9
  30. data/lib/contrast/agent/assess/policy/propagator/split.rb +77 -122
  31. data/lib/contrast/agent/assess/policy/propagator/substitution.rb +32 -25
  32. data/lib/contrast/agent/assess/policy/propagator/trim.rb +3 -7
  33. data/lib/contrast/agent/assess/policy/source_method.rb +2 -14
  34. data/lib/contrast/agent/assess/policy/trigger/reflected_xss.rb +9 -13
  35. data/lib/contrast/agent/assess/policy/trigger/xpath.rb +1 -1
  36. data/lib/contrast/agent/assess/policy/trigger_method.rb +39 -14
  37. data/lib/contrast/agent/assess/policy/trigger_node.rb +31 -37
  38. data/lib/contrast/agent/assess/policy/trigger_validation/ssrf_validator.rb +1 -1
  39. data/lib/contrast/agent/assess/property/evented.rb +5 -18
  40. data/lib/contrast/agent/assess/property/tagged.rb +28 -16
  41. data/lib/contrast/agent/assess/property/updated.rb +0 -5
  42. data/lib/contrast/agent/assess/rule/provider/hardcoded_key.rb +58 -5
  43. data/lib/contrast/agent/assess/rule/provider/hardcoded_password.rb +23 -8
  44. data/lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb +83 -14
  45. data/lib/contrast/agent/assess/rule/redos.rb +1 -1
  46. data/lib/contrast/agent/assess/tag.rb +1 -1
  47. data/lib/contrast/agent/assess/tracker.rb +16 -18
  48. data/lib/contrast/agent/at_exit_hook.rb +5 -5
  49. data/lib/contrast/agent/deadzone/policy/deadzone_node.rb +7 -0
  50. data/lib/contrast/agent/inventory.rb +15 -0
  51. data/lib/contrast/agent/inventory/dependencies.rb +50 -0
  52. data/lib/contrast/agent/inventory/dependency_analysis.rb +37 -0
  53. data/lib/contrast/agent/inventory/dependency_usage_analysis.rb +104 -0
  54. data/lib/contrast/agent/inventory/gemfile_digest_cache.rb +38 -0
  55. data/lib/contrast/agent/middleware.rb +51 -3
  56. data/lib/contrast/agent/patching/policy/after_load_patch.rb +5 -5
  57. data/lib/contrast/agent/patching/policy/after_load_patcher.rb +20 -20
  58. data/lib/contrast/agent/patching/policy/method_policy.rb +1 -1
  59. data/lib/contrast/agent/patching/policy/module_policy.rb +10 -10
  60. data/lib/contrast/agent/patching/policy/patch.rb +6 -0
  61. data/lib/contrast/agent/patching/policy/policy.rb +16 -2
  62. data/lib/contrast/agent/protect/policy/applies_command_injection_rule.rb +3 -5
  63. data/lib/contrast/agent/protect/policy/applies_deserialization_rule.rb +47 -1
  64. data/lib/contrast/agent/protect/policy/applies_path_traversal_rule.rb +4 -3
  65. data/lib/contrast/agent/protect/policy/applies_xxe_rule.rb +1 -1
  66. data/lib/contrast/agent/protect/policy/rule_applicator.rb +53 -0
  67. data/lib/contrast/agent/protect/rule/base.rb +63 -14
  68. data/lib/contrast/agent/protect/rule/cmd_injection.rb +12 -28
  69. data/lib/contrast/agent/protect/rule/default_scanner.rb +1 -4
  70. data/lib/contrast/agent/protect/rule/deserialization.rb +4 -1
  71. data/lib/contrast/agent/protect/rule/no_sqli.rb +3 -3
  72. data/lib/contrast/agent/protect/rule/no_sqli/mongo_no_sql_scanner.rb +1 -0
  73. data/lib/contrast/agent/protect/rule/sqli.rb +3 -3
  74. data/lib/contrast/agent/protect/rule/xxe.rb +32 -11
  75. data/lib/contrast/agent/protect/rule/xxe/entity_wrapper.rb +10 -6
  76. data/lib/contrast/agent/reaction_processor.rb +1 -1
  77. data/lib/contrast/agent/request.rb +34 -34
  78. data/lib/contrast/agent/request_handler.rb +1 -1
  79. data/lib/contrast/agent/response.rb +5 -5
  80. data/lib/contrast/agent/rewriter.rb +3 -3
  81. data/lib/contrast/agent/scope.rb +81 -55
  82. data/lib/contrast/agent/static_analysis.rb +15 -9
  83. data/lib/contrast/agent/tracepoint_hook.rb +1 -1
  84. data/lib/contrast/agent/version.rb +1 -1
  85. data/lib/contrast/api/communication/socket_client.rb +36 -1
  86. data/lib/contrast/api/decorators.rb +3 -0
  87. data/lib/contrast/api/decorators/address.rb +13 -14
  88. data/lib/contrast/api/decorators/application_update.rb +1 -1
  89. data/lib/contrast/api/decorators/library.rb +54 -0
  90. data/lib/contrast/api/decorators/library_usage_update.rb +31 -0
  91. data/lib/contrast/api/decorators/message.rb +1 -0
  92. data/lib/contrast/api/decorators/trace_event.rb +31 -41
  93. data/lib/contrast/api/decorators/trace_event_object.rb +11 -3
  94. data/lib/contrast/api/decorators/trace_event_signature.rb +27 -5
  95. data/lib/contrast/api/decorators/user_input.rb +2 -1
  96. data/lib/contrast/common_agent_configuration.rb +2 -1
  97. data/lib/contrast/components/agent.rb +6 -5
  98. data/lib/contrast/components/app_context.rb +39 -30
  99. data/lib/contrast/components/assess.rb +36 -0
  100. data/lib/contrast/components/config.rb +29 -37
  101. data/lib/contrast/components/contrast_service.rb +9 -9
  102. data/lib/contrast/components/interface.rb +30 -6
  103. data/lib/contrast/components/inventory.rb +6 -1
  104. data/lib/contrast/components/scope.rb +72 -6
  105. data/lib/contrast/components/settings.rb +23 -23
  106. data/lib/contrast/config/assess_configuration.rb +2 -1
  107. data/lib/contrast/config/inventory_configuration.rb +2 -2
  108. data/lib/contrast/config/service_configuration.rb +4 -2
  109. data/lib/contrast/configuration.rb +1 -1
  110. data/lib/contrast/extension/assess/array.rb +9 -6
  111. data/lib/contrast/extension/assess/erb.rb +6 -3
  112. data/lib/contrast/extension/assess/eval_trigger.rb +6 -6
  113. data/lib/contrast/extension/assess/exec_trigger.rb +0 -3
  114. data/lib/contrast/extension/assess/fiber.rb +5 -6
  115. data/lib/contrast/extension/assess/hash.rb +7 -5
  116. data/lib/contrast/extension/assess/kernel.rb +19 -22
  117. data/lib/contrast/extension/assess/marshal.rb +40 -28
  118. data/lib/contrast/extension/assess/regexp.rb +6 -11
  119. data/lib/contrast/extension/assess/string.rb +14 -13
  120. data/lib/contrast/extension/protect/kernel.rb +3 -3
  121. data/lib/contrast/framework/base_support.rb +51 -53
  122. data/lib/contrast/framework/manager.rb +6 -5
  123. data/lib/contrast/framework/rack/patch/session_cookie.rb +10 -10
  124. data/lib/contrast/framework/rack/support.rb +2 -1
  125. data/lib/contrast/framework/rails/patch/action_controller_live_buffer.rb +14 -14
  126. data/lib/contrast/framework/rails/patch/assess_configuration.rb +1 -1
  127. data/lib/contrast/framework/rails/patch/rails_application_configuration.rb +11 -11
  128. data/lib/contrast/framework/rails/patch/support.rb +1 -1
  129. data/lib/contrast/framework/rails/rewrite/action_controller_railties_helper_inherited.rb +12 -12
  130. data/lib/contrast/framework/rails/rewrite/active_record_attribute_methods_read.rb +13 -13
  131. data/lib/contrast/framework/rails/rewrite/active_record_named.rb +3 -3
  132. data/lib/contrast/framework/rails/rewrite/active_record_time_zone_inherited.rb +13 -13
  133. data/lib/contrast/framework/rails/support.rb +5 -1
  134. data/lib/contrast/framework/sinatra/patch/base.rb +11 -11
  135. data/lib/contrast/framework/sinatra/support.rb +7 -6
  136. data/lib/contrast/logger/application.rb +1 -4
  137. data/lib/contrast/logger/log.rb +7 -2
  138. data/lib/contrast/utils/duck_utils.rb +1 -1
  139. data/lib/contrast/utils/heap_dump_util.rb +1 -1
  140. data/lib/contrast/utils/invalid_configuration_util.rb +2 -5
  141. data/lib/contrast/utils/inventory_util.rb +0 -7
  142. data/lib/contrast/utils/object_share.rb +3 -3
  143. data/lib/contrast/utils/preflight_util.rb +1 -1
  144. data/lib/contrast/utils/prevent_serialization.rb +1 -1
  145. data/lib/contrast/utils/resource_loader.rb +1 -1
  146. data/lib/contrast/utils/sha256_builder.rb +2 -14
  147. data/lib/contrast/utils/string_utils.rb +1 -1
  148. data/lib/contrast/utils/tag_util.rb +9 -13
  149. data/resources/assess/policy.json +31 -12
  150. data/resources/deadzone/policy.json +156 -0
  151. data/resources/protect/policy.json +12 -0
  152. data/ruby-agent.gemspec +11 -6
  153. data/service_executables/VERSION +1 -1
  154. data/service_executables/linux/contrast-service +0 -0
  155. data/service_executables/mac/contrast-service +0 -0
  156. metadata +91 -28
  157. data/lib/contrast/utils/boolean_util.rb +0 -30
  158. data/lib/contrast/utils/gemfile_reader.rb +0 -193
@@ -55,6 +55,162 @@
55
55
  "instance_method":true,
56
56
  "method_visibility": "public",
57
57
  "method_name":"commit_session"
58
+ }, {
59
+ "class_name":"Rack::Session::Abstract::Persisted",
60
+ "instance_method":true,
61
+ "method_visibility": "private",
62
+ "method_name":"session_exists?",
63
+ "code": "https://github.com/rack/rack/blob/master/lib/rack/session/abstract/id.rb#L334"
64
+ }, {
65
+ "class_name":"ActionDispatch::Http::MimeNegotiation",
66
+ "instance_method":true,
67
+ "method_visibility": "public",
68
+ "method_name":"formats",
69
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/http/mime_negotiation.rb#L63"
70
+ }, {
71
+ "class_name":"ActionDispatch::FileHandler",
72
+ "instance_method":true,
73
+ "method_visibility": "public",
74
+ "method_name":"match?",
75
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/static.rb#L30"
76
+ }, {
77
+ "class_name":"ActionDispatch::Journey::Router",
78
+ "instance_method":true,
79
+ "method_visibility": "private",
80
+ "method_name":"find_routes",
81
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/journey/router.rb#L107"
82
+ }, {
83
+ "class_name":"ActionDispatch::Request",
84
+ "instance_method":true,
85
+ "method_visibility": "public",
86
+ "method_name":"controler_class_for",
87
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/http/request.rb#L84"
88
+ }, {
89
+ "class_name":"ActionDispatch::Request",
90
+ "instance_method":true,
91
+ "method_visibility": "public",
92
+ "method_name":"engine_script_name=",
93
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/http/request.rb#L158"
94
+ }, {
95
+ "class_name":"ActionDispatch::Request",
96
+ "instance_method":true,
97
+ "method_visibility": "public",
98
+ "method_name":"remote_ip",
99
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/http/request.rb#L286"
100
+ }, {
101
+ "class_name":"ActionDispatch::Request",
102
+ "instance_method":true,
103
+ "method_visibility": "public",
104
+ "method_name":"request_id",
105
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/http/request.rb#L302"
106
+ }, {
107
+ "class_name":"ActionDispatch::Request",
108
+ "instance_method":true,
109
+ "method_visibility": "public",
110
+ "method_name":"local?",
111
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/http/request.rb#L409"
112
+ }, {
113
+ "class_name":"ActionDispatch::Request",
114
+ "instance_method":true,
115
+ "method_visibility": "public",
116
+ "method_name":"cookie_jar",
117
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L11"
118
+ }, {
119
+ "class_name":"ActionDispatch::Request",
120
+ "instance_method":true,
121
+ "method_visibility": "public",
122
+ "method_name":"have_cookie_jar?",
123
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L24"
124
+ }, {
125
+ "class_name":"ActionDispatch::Request",
126
+ "instance_method":true,
127
+ "method_visibility": "public",
128
+ "method_name":"key_generator",
129
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L32"
130
+ }, {
131
+ "class_name":"ActionDispatch::Request",
132
+ "instance_method":true,
133
+ "method_visibility": "public",
134
+ "method_name":"signed_cookie_salt",
135
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L36"
136
+ }, {
137
+ "class_name":"ActionDispatch::Request",
138
+ "instance_method":true,
139
+ "method_visibility": "public",
140
+ "method_name":"encrypted_cookie_salt",
141
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L40"
142
+ }, {
143
+ "class_name":"ActionDispatch::Request",
144
+ "instance_method":true,
145
+ "method_visibility": "public",
146
+ "method_name":"encrypted_signed_cookie_salt",
147
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L44"
148
+ }, {
149
+ "class_name":"ActionDispatch::Request",
150
+ "instance_method":true,
151
+ "method_visibility": "public",
152
+ "method_name":"authenticated_encrypted_cookie_salt",
153
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L48"
154
+ }, {
155
+ "class_name":"ActionDispatch::Request",
156
+ "instance_method":true,
157
+ "method_visibility": "public",
158
+ "method_name":"use_authenticated_cookie_encryption",
159
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L52"
160
+ }, {
161
+ "class_name":"ActionDispatch::Request",
162
+ "instance_method":true,
163
+ "method_visibility": "public",
164
+ "method_name":"encrypted_cookie_cipher",
165
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L56"
166
+ }, {
167
+ "class_name":"ActionDispatch::Request",
168
+ "instance_method":true,
169
+ "method_visibility": "public",
170
+ "method_name":"signed_cookie_digest",
171
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L60"
172
+ }, {
173
+ "class_name":"ActionDispatch::Request",
174
+ "instance_method":true,
175
+ "method_visibility": "public",
176
+ "method_name":"secret_key_base",
177
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L64"
178
+ }, {
179
+ "class_name":"ActionDispatch::Request",
180
+ "instance_method":true,
181
+ "method_visibility": "public",
182
+ "method_name":"cookies_serializer",
183
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L68"
184
+ }, {
185
+ "class_name":"ActionDispatch::Request",
186
+ "instance_method":true,
187
+ "method_visibility": "public",
188
+ "method_name":"cookies_digest",
189
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L72"
190
+ }, {
191
+ "class_name":"ActionDispatch::Request",
192
+ "instance_method":true,
193
+ "method_visibility": "public",
194
+ "method_name":"cookies_rotations",
195
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L76"
196
+ }, {
197
+ "class_name":"ActionDispatch::Request",
198
+ "instance_method":true,
199
+ "method_visibility": "public",
200
+ "method_name":"use_cookies_with_metadata",
201
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/middleware/cookies.rb#L80"
202
+ }, {
203
+ "class_name":"ActionDispatch::Request::Session",
204
+ "instance_method":true,
205
+ "method_visibility": "public",
206
+ "method_name":"exists?",
207
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/request/session.rb#L201"
208
+ }, {
209
+ "class_name":"ActionView::Template",
210
+ "instance_method":true,
211
+ "method_visibility": "private",
212
+ "method_name":"method_name",
213
+ "code": "https://github.com/rails/rails/blob/v6.0.3.4/actionview/lib/action_view/template.rb#L368"
58
214
  }
59
215
  ]
60
216
  }
@@ -379,6 +379,18 @@
379
379
  "method_visibility": "public",
380
380
  "applicator_method": "apply_rule__io",
381
381
  "properties": {}
382
+ },{
383
+ "class_name": "Nokogiri::XML::Document",
384
+ "method_name": "parse",
385
+ "instance_method": false,
386
+ "method_visibility": "public",
387
+ "properties": {}
388
+ }, {
389
+ "class_name": "Nokogiri::XML::SAX::Parser",
390
+ "method_name": "parse",
391
+ "instance_method": true,
392
+ "method_visibility": "public",
393
+ "properties": {}
382
394
  },{
383
395
  "class_name": "Nokogiri::XML::SAX::Parser",
384
396
  "method_name": "parse_memory",
@@ -14,12 +14,14 @@ def self.add_authors spec
14
14
  donald.propst@contrastsecurity.com
15
15
  alex.macdonald@contrastsecurity.com
16
16
  mark.petersen@contrastsecurity.com
17
+ joshua.reed@contrastsecurity.com
17
18
  ]
18
19
  end
19
20
 
20
21
  # Add those dependencies required to develop or test the Agent
21
22
  def self.add_dev_dependencies spec
22
23
  spec.add_development_dependency 'amazing_print'
24
+ spec.add_development_dependency 'benchmark-ips'
23
25
  spec.add_development_dependency 'bundler'
24
26
  spec.add_development_dependency 'climate_control' # mock ENV
25
27
  spec.add_development_dependency 'debase'
@@ -28,20 +30,23 @@ def self.add_dev_dependencies spec
28
30
  spec.add_development_dependency 'factory_bot'
29
31
  spec.add_development_dependency 'fake_ftp'
30
32
  spec.add_development_dependency 'fasterer'
33
+ spec.add_development_dependency 'flay'
31
34
  spec.add_development_dependency 'openssl'
32
35
  spec.add_development_dependency 'parser', '~> 2.6'
33
36
  spec.add_development_dependency 'pry'
34
37
  spec.add_development_dependency 'rails', '>= 3'
35
- spec.add_development_dependency 'rake', '~> 10.0'
38
+ spec.add_development_dependency 'rake', '>= 12.3.3'
36
39
  spec.add_development_dependency 'rake-compiler', '~> 0'
37
40
  spec.add_development_dependency 'rspec', '~> 3.0'
38
41
  spec.add_development_dependency 'rspec-benchmark'
39
42
  spec.add_development_dependency 'rspec_junit_formatter', '0.3.0'
40
- spec.add_development_dependency 'rubocop', '0.89.1'
41
- spec.add_development_dependency 'rubocop-performance', '1.7.1'
42
- spec.add_development_dependency 'rubocop-rspec', '1.42.0'
43
+ spec.add_development_dependency 'rubocop', '1.6.1'
44
+ spec.add_development_dependency 'rubocop-performance', '1.9.1'
45
+ spec.add_development_dependency 'rubocop-rails', '2.9.1'
46
+ spec.add_development_dependency 'rubocop-rake', '0.5.1'
47
+ spec.add_development_dependency 'rubocop-rspec', '2.1.0'
43
48
  spec.add_development_dependency 'ruby-debug-ide'
44
- spec.add_development_dependency 'simplecov', '~> 0.18'
49
+ spec.add_development_dependency 'simplecov', '0.20.0'
45
50
  spec.add_development_dependency 'sinatra', '>= 2'
46
51
  spec.add_development_dependency 'sqlite3', '1.3.9'
47
52
  spec.add_development_dependency 'therubyracer'
@@ -57,7 +62,7 @@ end
57
62
  # corresponding update to the fake gem server data in TeamServer.
58
63
  def self.add_dependencies spec
59
64
  spec.add_dependency 'ougai', '~> 1.8'
60
- spec.add_dependency 'parser', '~> 2.6'
65
+ spec.add_dependency 'parser', '~> 2.6' # TODO: RUBY-714 remove w/ EOL of 2.5
61
66
  spec.add_dependency 'protobuf', '~> 3.10'
62
67
  spec.add_dependency 'rack', '~> 2.0'
63
68
  end
@@ -1 +1 @@
1
- 2.12.0
1
+ 2.17.2
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: 3.15.0
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - galen.palmer@contrastsecurity.com
@@ -9,10 +9,11 @@ authors:
9
9
  - donald.propst@contrastsecurity.com
10
10
  - alex.macdonald@contrastsecurity.com
11
11
  - mark.petersen@contrastsecurity.com
12
+ - joshua.reed@contrastsecurity.com
12
13
  autorequire:
13
14
  bindir: exe
14
15
  cert_chain: []
15
- date: 2020-09-18 00:00:00.000000000 Z
16
+ date: 2021-01-29 00:00:00.000000000 Z
16
17
  dependencies:
17
18
  - !ruby/object:Gem::Dependency
18
19
  name: amazing_print
@@ -28,6 +29,20 @@ dependencies:
28
29
  - - ">="
29
30
  - !ruby/object:Gem::Version
30
31
  version: '0'
32
+ - !ruby/object:Gem::Dependency
33
+ name: benchmark-ips
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :development
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
31
46
  - !ruby/object:Gem::Dependency
32
47
  name: bundler
33
48
  requirement: !ruby/object:Gem::Requirement
@@ -140,6 +155,20 @@ dependencies:
140
155
  - - ">="
141
156
  - !ruby/object:Gem::Version
142
157
  version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: flay
160
+ requirement: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ type: :development
166
+ prerelease: false
167
+ version_requirements: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
143
172
  - !ruby/object:Gem::Dependency
144
173
  name: openssl
145
174
  requirement: !ruby/object:Gem::Requirement
@@ -200,16 +229,16 @@ dependencies:
200
229
  name: rake
201
230
  requirement: !ruby/object:Gem::Requirement
202
231
  requirements:
203
- - - "~>"
232
+ - - ">="
204
233
  - !ruby/object:Gem::Version
205
- version: '10.0'
234
+ version: 12.3.3
206
235
  type: :development
207
236
  prerelease: false
208
237
  version_requirements: !ruby/object:Gem::Requirement
209
238
  requirements:
210
- - - "~>"
239
+ - - ">="
211
240
  - !ruby/object:Gem::Version
212
- version: '10.0'
241
+ version: 12.3.3
213
242
  - !ruby/object:Gem::Dependency
214
243
  name: rake-compiler
215
244
  requirement: !ruby/object:Gem::Requirement
@@ -272,42 +301,70 @@ dependencies:
272
301
  requirements:
273
302
  - - '='
274
303
  - !ruby/object:Gem::Version
275
- version: 0.89.1
304
+ version: 1.6.1
276
305
  type: :development
277
306
  prerelease: false
278
307
  version_requirements: !ruby/object:Gem::Requirement
279
308
  requirements:
280
309
  - - '='
281
310
  - !ruby/object:Gem::Version
282
- version: 0.89.1
311
+ version: 1.6.1
283
312
  - !ruby/object:Gem::Dependency
284
313
  name: rubocop-performance
285
314
  requirement: !ruby/object:Gem::Requirement
286
315
  requirements:
287
316
  - - '='
288
317
  - !ruby/object:Gem::Version
289
- version: 1.7.1
318
+ version: 1.9.1
319
+ type: :development
320
+ prerelease: false
321
+ version_requirements: !ruby/object:Gem::Requirement
322
+ requirements:
323
+ - - '='
324
+ - !ruby/object:Gem::Version
325
+ version: 1.9.1
326
+ - !ruby/object:Gem::Dependency
327
+ name: rubocop-rails
328
+ requirement: !ruby/object:Gem::Requirement
329
+ requirements:
330
+ - - '='
331
+ - !ruby/object:Gem::Version
332
+ version: 2.9.1
290
333
  type: :development
291
334
  prerelease: false
292
335
  version_requirements: !ruby/object:Gem::Requirement
293
336
  requirements:
294
337
  - - '='
295
338
  - !ruby/object:Gem::Version
296
- version: 1.7.1
339
+ version: 2.9.1
340
+ - !ruby/object:Gem::Dependency
341
+ name: rubocop-rake
342
+ requirement: !ruby/object:Gem::Requirement
343
+ requirements:
344
+ - - '='
345
+ - !ruby/object:Gem::Version
346
+ version: 0.5.1
347
+ type: :development
348
+ prerelease: false
349
+ version_requirements: !ruby/object:Gem::Requirement
350
+ requirements:
351
+ - - '='
352
+ - !ruby/object:Gem::Version
353
+ version: 0.5.1
297
354
  - !ruby/object:Gem::Dependency
298
355
  name: rubocop-rspec
299
356
  requirement: !ruby/object:Gem::Requirement
300
357
  requirements:
301
358
  - - '='
302
359
  - !ruby/object:Gem::Version
303
- version: 1.42.0
360
+ version: 2.1.0
304
361
  type: :development
305
362
  prerelease: false
306
363
  version_requirements: !ruby/object:Gem::Requirement
307
364
  requirements:
308
365
  - - '='
309
366
  - !ruby/object:Gem::Version
310
- version: 1.42.0
367
+ version: 2.1.0
311
368
  - !ruby/object:Gem::Dependency
312
369
  name: ruby-debug-ide
313
370
  requirement: !ruby/object:Gem::Requirement
@@ -326,16 +383,16 @@ dependencies:
326
383
  name: simplecov
327
384
  requirement: !ruby/object:Gem::Requirement
328
385
  requirements:
329
- - - "~>"
386
+ - - '='
330
387
  - !ruby/object:Gem::Version
331
- version: '0.18'
388
+ version: 0.20.0
332
389
  type: :development
333
390
  prerelease: false
334
391
  version_requirements: !ruby/object:Gem::Requirement
335
392
  requirements:
336
- - - "~>"
393
+ - - '='
337
394
  - !ruby/object:Gem::Version
338
- version: '0.18'
395
+ version: 0.20.0
339
396
  - !ruby/object:Gem::Dependency
340
397
  name: sinatra
341
398
  requirement: !ruby/object:Gem::Requirement
@@ -484,20 +541,20 @@ executables:
484
541
  - contrast_service
485
542
  extensions:
486
543
  - ext/cs__common/extconf.rb
487
- - ext/cs__assess_yield_track/extconf.rb
488
- - ext/cs__assess_module/extconf.rb
489
- - ext/cs__assess_active_record_named/extconf.rb
544
+ - ext/cs__assess_string_interpolation26/extconf.rb
490
545
  - ext/cs__contrast_patch/extconf.rb
491
- - ext/cs__assess_string/extconf.rb
492
- - ext/cs__assess_fiber_track/extconf.rb
493
- - ext/cs__assess_regexp/extconf.rb
494
- - ext/cs__assess_kernel/extconf.rb
495
- - ext/cs__assess_hash/extconf.rb
546
+ - ext/cs__assess_module/extconf.rb
496
547
  - ext/cs__assess_marshal_module/extconf.rb
548
+ - ext/cs__assess_hash/extconf.rb
497
549
  - ext/cs__assess_array/extconf.rb
498
- - ext/cs__protect_kernel/extconf.rb
499
550
  - ext/cs__assess_basic_object/extconf.rb
500
- - ext/cs__assess_string_interpolation26/extconf.rb
551
+ - ext/cs__protect_kernel/extconf.rb
552
+ - ext/cs__assess_string/extconf.rb
553
+ - ext/cs__assess_active_record_named/extconf.rb
554
+ - ext/cs__assess_regexp/extconf.rb
555
+ - ext/cs__assess_yield_track/extconf.rb
556
+ - ext/cs__assess_fiber_track/extconf.rb
557
+ - ext/cs__assess_kernel/extconf.rb
501
558
  extra_rdoc_files: []
502
559
  files:
503
560
  - ".clang-format"
@@ -694,6 +751,7 @@ files:
694
751
  - lib/contrast/agent.rb
695
752
  - lib/contrast/agent/assess.rb
696
753
  - lib/contrast/agent/assess/contrast_event.rb
754
+ - lib/contrast/agent/assess/contrast_object.rb
697
755
  - lib/contrast/agent/assess/events/event_factory.rb
698
756
  - lib/contrast/agent/assess/events/source_event.rb
699
757
  - lib/contrast/agent/assess/finalizers/freeze.rb
@@ -756,6 +814,11 @@ files:
756
814
  - lib/contrast/agent/deadzone/policy/policy.rb
757
815
  - lib/contrast/agent/disable_reaction.rb
758
816
  - lib/contrast/agent/exclusion_matcher.rb
817
+ - lib/contrast/agent/inventory.rb
818
+ - lib/contrast/agent/inventory/dependencies.rb
819
+ - lib/contrast/agent/inventory/dependency_analysis.rb
820
+ - lib/contrast/agent/inventory/dependency_usage_analysis.rb
821
+ - lib/contrast/agent/inventory/gemfile_digest_cache.rb
759
822
  - lib/contrast/agent/inventory/policy/datastores.rb
760
823
  - lib/contrast/agent/inventory/policy/policy.rb
761
824
  - lib/contrast/agent/inventory/policy/trigger_node.rb
@@ -833,6 +896,8 @@ files:
833
896
  - lib/contrast/api/decorators/application_update.rb
834
897
  - lib/contrast/api/decorators/http_request.rb
835
898
  - lib/contrast/api/decorators/input_analysis.rb
899
+ - lib/contrast/api/decorators/library.rb
900
+ - lib/contrast/api/decorators/library_usage_update.rb
836
901
  - lib/contrast/api/decorators/message.rb
837
902
  - lib/contrast/api/decorators/rasp_rule_sample.rb
838
903
  - lib/contrast/api/decorators/route_coverage.rb
@@ -927,11 +992,9 @@ files:
927
992
  - lib/contrast/tasks/service.rb
928
993
  - lib/contrast/utils/assess/sampling_util.rb
929
994
  - lib/contrast/utils/assess/tracking_util.rb
930
- - lib/contrast/utils/boolean_util.rb
931
995
  - lib/contrast/utils/class_util.rb
932
996
  - lib/contrast/utils/duck_utils.rb
933
997
  - lib/contrast/utils/env_configuration_item.rb
934
- - lib/contrast/utils/gemfile_reader.rb
935
998
  - lib/contrast/utils/hash_digest.rb
936
999
  - lib/contrast/utils/heap_dump_util.rb
937
1000
  - lib/contrast/utils/invalid_configuration_util.rb