contrast-agent 6.3.0 → 6.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -3
  3. data/.simplecov +1 -0
  4. data/Rakefile +0 -27
  5. data/ext/cs__contrast_patch/cs__contrast_patch.c +14 -1
  6. data/lib/contrast/agent/assess/finalizers/hash.rb +1 -0
  7. data/lib/contrast/agent/assess/policy/propagation_method.rb +5 -3
  8. data/lib/contrast/agent/assess/policy/propagator/custom.rb +4 -0
  9. data/lib/contrast/agent/assess/policy/propagator/database_write.rb +5 -0
  10. data/lib/contrast/agent/assess/policy/propagator/split.rb +3 -0
  11. data/lib/contrast/agent/assess/policy/source_method.rb +5 -0
  12. data/lib/contrast/agent/assess/policy/trigger_method.rb +9 -3
  13. data/lib/contrast/agent/assess/tracker.rb +12 -0
  14. data/lib/contrast/agent/inventory/dependency_analysis.rb +2 -2
  15. data/lib/contrast/agent/inventory/dependency_usage_analysis.rb +1 -1
  16. data/lib/contrast/agent/inventory/policy/datastores.rb +1 -1
  17. data/lib/contrast/agent/inventory/policy/policy.rb +1 -1
  18. data/lib/contrast/agent/patching/policy/method_policy.rb +3 -3
  19. data/lib/contrast/agent/protect/rule/base.rb +1 -1
  20. data/lib/contrast/agent/reporting/reporter_heartbeat.rb +1 -3
  21. data/lib/contrast/agent/reporting/reporting_events/application_defend_activity.rb +17 -21
  22. data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_sample.rb +1 -1
  23. data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_sample_activity.rb +26 -3
  24. data/lib/contrast/agent/reporting/reporting_utilities/audit.rb +5 -5
  25. data/lib/contrast/agent/reporting/reporting_utilities/headers.rb +1 -1
  26. data/lib/contrast/agent/reporting/reporting_utilities/reporter_client.rb +1 -1
  27. data/lib/contrast/agent/reporting/reporting_utilities/response_handler_utils.rb +1 -1
  28. data/lib/contrast/agent/request_context.rb +8 -0
  29. data/lib/contrast/agent/service_heartbeat.rb +2 -3
  30. data/lib/contrast/agent/static_analysis.rb +1 -1
  31. data/lib/contrast/agent/version.rb +1 -1
  32. data/lib/contrast/agent/worker_thread.rb +10 -0
  33. data/lib/contrast/api/communication/response_processor.rb +1 -1
  34. data/lib/contrast/api/dtm.pb.rb +1 -1
  35. data/lib/contrast/api/settings.pb.rb +1 -1
  36. data/lib/contrast/components/agent.rb +52 -14
  37. data/lib/contrast/components/api.rb +60 -23
  38. data/lib/contrast/components/assess.rb +16 -0
  39. data/lib/contrast/components/contrast_service.rb +1 -1
  40. data/lib/contrast/components/heap_dump.rb +51 -1
  41. data/lib/contrast/components/inventory.rb +19 -13
  42. data/lib/contrast/components/logger.rb +18 -0
  43. data/lib/contrast/components/protect.rb +41 -1
  44. data/lib/contrast/components/sampling.rb +29 -0
  45. data/lib/contrast/config/assess_configuration.rb +33 -3
  46. data/lib/contrast/config/base_configuration.rb +8 -2
  47. data/lib/contrast/config/root_configuration.rb +19 -16
  48. data/lib/contrast/config/service_configuration.rb +4 -4
  49. data/lib/contrast/config.rb +0 -9
  50. data/lib/contrast/extension/object.rb +19 -0
  51. data/lib/contrast/framework/rails/support.rb +4 -1
  52. data/lib/contrast/logger/log.rb +2 -1
  53. data/lib/contrast/utils/assess/event_limit_utils.rb +96 -0
  54. data/lib/contrast/utils/assess/propagation_method_utils.rb +27 -7
  55. data/lib/contrast/utils/log_utils.rb +2 -2
  56. data/lib/contrast/utils/net_http_base.rb +2 -2
  57. data/lib/contrast/utils/patching/policy/patch_utils.rb +6 -23
  58. data/lib/contrast.rb +39 -20
  59. data/lib/protobuf/code_generator.rb +129 -0
  60. data/lib/protobuf/decoder.rb +28 -0
  61. data/lib/protobuf/deprecation.rb +117 -0
  62. data/lib/protobuf/descriptors/google/protobuf/compiler/plugin.pb.rb +79 -0
  63. data/lib/protobuf/descriptors/google/protobuf/descriptor.pb.rb +360 -0
  64. data/lib/protobuf/descriptors.rb +3 -0
  65. data/lib/protobuf/encoder.rb +11 -0
  66. data/lib/protobuf/enum.rb +365 -0
  67. data/lib/protobuf/exceptions.rb +9 -0
  68. data/lib/protobuf/field/base_field.rb +380 -0
  69. data/lib/protobuf/field/base_field_object_definitions.rb +504 -0
  70. data/lib/protobuf/field/bool_field.rb +64 -0
  71. data/lib/protobuf/field/bytes_field.rb +67 -0
  72. data/lib/protobuf/field/double_field.rb +25 -0
  73. data/lib/protobuf/field/enum_field.rb +56 -0
  74. data/lib/protobuf/field/field_array.rb +102 -0
  75. data/lib/protobuf/field/field_hash.rb +122 -0
  76. data/lib/protobuf/field/fixed32_field.rb +25 -0
  77. data/lib/protobuf/field/fixed64_field.rb +28 -0
  78. data/lib/protobuf/field/float_field.rb +43 -0
  79. data/lib/protobuf/field/int32_field.rb +21 -0
  80. data/lib/protobuf/field/int64_field.rb +34 -0
  81. data/lib/protobuf/field/integer_field.rb +23 -0
  82. data/lib/protobuf/field/message_field.rb +51 -0
  83. data/lib/protobuf/field/sfixed32_field.rb +27 -0
  84. data/lib/protobuf/field/sfixed64_field.rb +28 -0
  85. data/lib/protobuf/field/signed_integer_field.rb +29 -0
  86. data/lib/protobuf/field/sint32_field.rb +21 -0
  87. data/lib/protobuf/field/sint64_field.rb +21 -0
  88. data/lib/protobuf/field/string_field.rb +51 -0
  89. data/lib/protobuf/field/uint32_field.rb +21 -0
  90. data/lib/protobuf/field/uint64_field.rb +21 -0
  91. data/lib/protobuf/field/varint_field.rb +77 -0
  92. data/lib/protobuf/field.rb +74 -0
  93. data/lib/protobuf/generators/base.rb +85 -0
  94. data/lib/protobuf/generators/enum_generator.rb +39 -0
  95. data/lib/protobuf/generators/extension_generator.rb +27 -0
  96. data/lib/protobuf/generators/field_generator.rb +193 -0
  97. data/lib/protobuf/generators/file_generator.rb +262 -0
  98. data/lib/protobuf/generators/group_generator.rb +122 -0
  99. data/lib/protobuf/generators/message_generator.rb +104 -0
  100. data/lib/protobuf/generators/option_generator.rb +17 -0
  101. data/lib/protobuf/generators/printable.rb +160 -0
  102. data/lib/protobuf/generators/service_generator.rb +50 -0
  103. data/lib/protobuf/lifecycle.rb +33 -0
  104. data/lib/protobuf/logging.rb +39 -0
  105. data/lib/protobuf/message/fields.rb +233 -0
  106. data/lib/protobuf/message/serialization.rb +85 -0
  107. data/lib/protobuf/message.rb +241 -0
  108. data/lib/protobuf/optionable.rb +72 -0
  109. data/lib/protobuf/tasks/compile.rake +80 -0
  110. data/lib/protobuf/tasks.rb +1 -0
  111. data/lib/protobuf/varint.rb +20 -0
  112. data/lib/protobuf/varint_pure.rb +31 -0
  113. data/lib/protobuf/version.rb +3 -0
  114. data/lib/protobuf/wire_type.rb +10 -0
  115. data/lib/protobuf.rb +91 -0
  116. data/proto/dynamic_discovery.proto +46 -0
  117. data/proto/google/protobuf/compiler/plugin.proto +183 -0
  118. data/proto/google/protobuf/descriptor.proto +911 -0
  119. data/proto/rpc.proto +71 -0
  120. data/resources/assess/policy.json +15 -12
  121. data/resources/deadzone/policy.json +132 -19
  122. data/ruby-agent.gemspec +3 -1
  123. metadata +112 -28
  124. data/lib/contrast/config/agent_configuration.rb +0 -63
  125. data/lib/contrast/config/api_configuration.rb +0 -56
  126. data/lib/contrast/config/heap_dump_configuration.rb +0 -59
  127. data/lib/contrast/config/inventory_configuration.rb +0 -33
  128. data/lib/contrast/config/logger_configuration.rb +0 -26
  129. data/lib/contrast/config/protect_configuration.rb +0 -33
  130. data/lib/contrast/config/sampling_configuration.rb +0 -35
data/proto/rpc.proto ADDED
@@ -0,0 +1,71 @@
1
+ // Copyright (c) 2009 Shardul Deo
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ // of this software and associated documentation files (the "Software"), to deal
5
+ // in the Software without restriction, including without limitation the rights
6
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ // copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+
21
+ // Authors: Shardul Deo, BJ Neilsen
22
+ //
23
+ // Protobufs needed for socket rpcs.
24
+
25
+ syntax = "proto2";
26
+
27
+ package protobuf.socketrpc;
28
+
29
+ message Request
30
+ {
31
+ required string service_name = 1; // Fully- qualified Service class name
32
+ required string method_name = 2; // Service method to invoke
33
+ optional bytes request_proto = 3; // Serialized request bytes
34
+ optional string caller = 4; // Calling hostname or address
35
+ repeated Header headers = 5; // General purpose request headers
36
+ }
37
+
38
+ message Response
39
+ {
40
+ optional bytes response_proto = 1; // Serialized response
41
+ optional string error = 2; // Error message, if any
42
+ optional bool callback = 3 [default = false]; // Was callback invoked (not sure what this is for)
43
+ optional ErrorReason error_reason = 4; // Error Reason
44
+ optional string server = 5; // Server hostname or address
45
+ }
46
+
47
+ message Header {
48
+ required string key = 1;
49
+ optional string value = 2;
50
+ }
51
+
52
+ // Possible error reasons
53
+ // The server-side errors are returned in the response from the server.
54
+ // The client-side errors are returned by the client-side code when it doesn't
55
+ // have a response from the server.
56
+ enum ErrorReason
57
+ {
58
+ // Server-side errors
59
+ BAD_REQUEST_DATA = 0; // Server received bad request data
60
+ BAD_REQUEST_PROTO = 1; // Server received bad request proto
61
+ SERVICE_NOT_FOUND = 2; // Service not found on server
62
+ METHOD_NOT_FOUND = 3; // Method not found on server
63
+ RPC_ERROR = 4; // Rpc threw exception on server
64
+ RPC_FAILED = 5; // Rpc failed on server
65
+
66
+ // Client-side errors (these are returned by the client-side code)
67
+ INVALID_REQUEST_PROTO = 6; // Rpc was called with invalid request proto
68
+ BAD_RESPONSE_PROTO = 7; // Server returned a bad response proto
69
+ UNKNOWN_HOST = 8; // Could not find supplied host
70
+ IO_ERROR = 9; // I/O error while communicating with server
71
+ }
@@ -692,15 +692,7 @@
692
692
  "action":"CUSTOM",
693
693
  "patch_class": "Contrast::Agent::Assess::Policy::Propagator::MatchData",
694
694
  "patch_method": "values_at_tagger"
695
- }, {
696
- "class_name":"String",
697
- "instance_method": true,
698
- "method_visibility": "public",
699
- "method_name":"to_sym",
700
- "source":"O",
701
- "target":"R",
702
- "action":"KEEP"
703
- }, {
695
+ },{
704
696
  "class_name": "String",
705
697
  "instance_method": true,
706
698
  "method_visibility": "public",
@@ -1104,6 +1096,17 @@
1104
1096
  "tags":["SQL_ENCODED"],
1105
1097
  "untags":["SQL_DECODED"]
1106
1098
  },
1099
+ {
1100
+ "class_name":"ActiveRecord::ConnectionAdapters::Quoting",
1101
+ "instance_method": true,
1102
+ "method_visibility": "public",
1103
+ "method_name":"quote",
1104
+ "source": "P0",
1105
+ "target": "R",
1106
+ "action": "SPLAT",
1107
+ "tags":["SQL_ENCODED"],
1108
+ "untags":["SQL_DECODED"]
1109
+ },
1107
1110
  {
1108
1111
  "class_name":"IO",
1109
1112
  "method_name":"initialize",
@@ -1860,9 +1863,9 @@
1860
1863
  "source": "P0"
1861
1864
  },{
1862
1865
  "class_name": "Excon",
1863
- "instance_method": true,
1864
- "method_visibility": "private",
1865
- "method_name": "initialize",
1866
+ "instance_method": false,
1867
+ "method_visibility": "public",
1868
+ "method_name": "new",
1866
1869
  "source": "P0"
1867
1870
  },
1868
1871
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "deadzones":[
3
3
  {
4
- "class_name":"Rspec::Core::Example",
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":"commit_session"
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/master/lib/rack/session/abstract/id.rb#L334"
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,91 +110,203 @@
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,
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
@@ -114,8 +116,8 @@ end
114
116
  # corresponding update to the fake gem server data in TeamServer.
115
117
  def self.add_dependencies spec
116
118
  spec.add_dependency 'ougai', '>= 1.8', '< 3.0.0'
117
- spec.add_dependency 'protobuf', '~> 3.10'
118
119
  spec.add_dependency 'rack', '~> 2.0'
120
+ spec.add_dependency 'activesupport', '>= 3.2' # TODO: RUBY-1438 remove w/ protobuf code
119
121
  end
120
122
 
121
123
  # Enumerate the files required to build the Agent.
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.3.0
4
+ version: 6.5.1
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-06-06 00:00:00.000000000 Z
16
+ date: 2022-07-01 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
@@ -602,33 +630,33 @@ dependencies:
602
630
  - !ruby/object:Gem::Version
603
631
  version: 3.0.0
604
632
  - !ruby/object:Gem::Dependency
605
- name: protobuf
633
+ name: rack
606
634
  requirement: !ruby/object:Gem::Requirement
607
635
  requirements:
608
636
  - - "~>"
609
637
  - !ruby/object:Gem::Version
610
- version: '3.10'
638
+ version: '2.0'
611
639
  type: :runtime
612
640
  prerelease: false
613
641
  version_requirements: !ruby/object:Gem::Requirement
614
642
  requirements:
615
643
  - - "~>"
616
644
  - !ruby/object:Gem::Version
617
- version: '3.10'
645
+ version: '2.0'
618
646
  - !ruby/object:Gem::Dependency
619
- name: rack
647
+ name: activesupport
620
648
  requirement: !ruby/object:Gem::Requirement
621
649
  requirements:
622
- - - "~>"
650
+ - - ">="
623
651
  - !ruby/object:Gem::Version
624
- version: '2.0'
652
+ version: '3.2'
625
653
  type: :runtime
626
654
  prerelease: false
627
655
  version_requirements: !ruby/object:Gem::Requirement
628
656
  requirements:
629
- - - "~>"
657
+ - - ">="
630
658
  - !ruby/object:Gem::Version
631
- version: '2.0'
659
+ version: '3.2'
632
660
  description: This gem instantiates a Rack middleware for rack-based web applications
633
661
  in order to provide Interactive Application Security Testing and Protection.
634
662
  email:
@@ -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
- - ext/cs__assess_fiber_track/extconf.rb
644
- - ext/cs__assess_string_interpolation/extconf.rb
645
- - ext/cs__assess_kernel/extconf.rb
646
- - ext/cs__assess_marshal_module/extconf.rb
647
- - ext/cs__contrast_patch/extconf.rb
668
+ - ext/cs__assess_yield_track/extconf.rb
648
669
  - ext/cs__os_information/extconf.rb
670
+ - ext/cs__contrast_patch/extconf.rb
649
671
  - ext/cs__assess_array/extconf.rb
672
+ - ext/cs__assess_test/extconf.rb
673
+ - ext/cs__assess_string_interpolation/extconf.rb
674
+ - ext/cs__assess_fiber_track/extconf.rb
675
+ - ext/cs__assess_marshal_module/extconf.rb
676
+ - ext/cs__assess_basic_object/extconf.rb
677
+ - ext/cs__assess_regexp/extconf.rb
678
+ - ext/cs__assess_string/extconf.rb
650
679
  - ext/cs__tests/extconf.rb
651
680
  - ext/cs__assess_module/extconf.rb
652
- - ext/cs__assess_yield_track/extconf.rb
653
- - ext/cs__assess_string/extconf.rb
681
+ - ext/cs__assess_hash/extconf.rb
682
+ - ext/cs__assess_kernel/extconf.rb
654
683
  - ext/cs__scope/extconf.rb
655
- - ext/cs__assess_test/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
@@ -1273,6 +1296,67 @@ files:
1273
1296
  - lib/contrast/utils/telemetry_identifier.rb
1274
1297
  - lib/contrast/utils/thread_tracker.rb
1275
1298
  - lib/contrast/utils/timer.rb
1299
+ - lib/protobuf.rb
1300
+ - lib/protobuf/code_generator.rb
1301
+ - lib/protobuf/decoder.rb
1302
+ - lib/protobuf/deprecation.rb
1303
+ - lib/protobuf/descriptors.rb
1304
+ - lib/protobuf/descriptors/google/protobuf/compiler/plugin.pb.rb
1305
+ - lib/protobuf/descriptors/google/protobuf/descriptor.pb.rb
1306
+ - lib/protobuf/encoder.rb
1307
+ - lib/protobuf/enum.rb
1308
+ - lib/protobuf/exceptions.rb
1309
+ - lib/protobuf/field.rb
1310
+ - lib/protobuf/field/base_field.rb
1311
+ - lib/protobuf/field/base_field_object_definitions.rb
1312
+ - lib/protobuf/field/bool_field.rb
1313
+ - lib/protobuf/field/bytes_field.rb
1314
+ - lib/protobuf/field/double_field.rb
1315
+ - lib/protobuf/field/enum_field.rb
1316
+ - lib/protobuf/field/field_array.rb
1317
+ - lib/protobuf/field/field_hash.rb
1318
+ - lib/protobuf/field/fixed32_field.rb
1319
+ - lib/protobuf/field/fixed64_field.rb
1320
+ - lib/protobuf/field/float_field.rb
1321
+ - lib/protobuf/field/int32_field.rb
1322
+ - lib/protobuf/field/int64_field.rb
1323
+ - lib/protobuf/field/integer_field.rb
1324
+ - lib/protobuf/field/message_field.rb
1325
+ - lib/protobuf/field/sfixed32_field.rb
1326
+ - lib/protobuf/field/sfixed64_field.rb
1327
+ - lib/protobuf/field/signed_integer_field.rb
1328
+ - lib/protobuf/field/sint32_field.rb
1329
+ - lib/protobuf/field/sint64_field.rb
1330
+ - lib/protobuf/field/string_field.rb
1331
+ - lib/protobuf/field/uint32_field.rb
1332
+ - lib/protobuf/field/uint64_field.rb
1333
+ - lib/protobuf/field/varint_field.rb
1334
+ - lib/protobuf/generators/base.rb
1335
+ - lib/protobuf/generators/enum_generator.rb
1336
+ - lib/protobuf/generators/extension_generator.rb
1337
+ - lib/protobuf/generators/field_generator.rb
1338
+ - lib/protobuf/generators/file_generator.rb
1339
+ - lib/protobuf/generators/group_generator.rb
1340
+ - lib/protobuf/generators/message_generator.rb
1341
+ - lib/protobuf/generators/option_generator.rb
1342
+ - lib/protobuf/generators/printable.rb
1343
+ - lib/protobuf/generators/service_generator.rb
1344
+ - lib/protobuf/lifecycle.rb
1345
+ - lib/protobuf/logging.rb
1346
+ - lib/protobuf/message.rb
1347
+ - lib/protobuf/message/fields.rb
1348
+ - lib/protobuf/message/serialization.rb
1349
+ - lib/protobuf/optionable.rb
1350
+ - lib/protobuf/tasks.rb
1351
+ - lib/protobuf/tasks/compile.rake
1352
+ - lib/protobuf/varint.rb
1353
+ - lib/protobuf/varint_pure.rb
1354
+ - lib/protobuf/version.rb
1355
+ - lib/protobuf/wire_type.rb
1356
+ - proto/dynamic_discovery.proto
1357
+ - proto/google/protobuf/compiler/plugin.proto
1358
+ - proto/google/protobuf/descriptor.proto
1359
+ - proto/rpc.proto
1276
1360
  - resources/assess/policy.json
1277
1361
  - resources/deadzone/policy.json
1278
1362
  - resources/inventory/policy.json