contrast-agent 4.8.0 → 4.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -1
  3. data/.rspec +0 -1
  4. data/.rspec_parallel +6 -0
  5. data/.simplecov +1 -0
  6. data/ext/cs__contrast_patch/cs__contrast_patch.c +0 -1
  7. data/ext/cs__contrast_patch/cs__contrast_patch.h +0 -2
  8. data/lib/contrast/agent/assess/contrast_event.rb +1 -5
  9. data/lib/contrast/agent/assess/contrast_object.rb +0 -3
  10. data/lib/contrast/agent/assess/finalizers/hash.rb +2 -5
  11. data/lib/contrast/agent/assess/policy/patcher.rb +5 -4
  12. data/lib/contrast/agent/assess/policy/policy.rb +1 -1
  13. data/lib/contrast/agent/assess/policy/policy_scanner.rb +2 -6
  14. data/lib/contrast/agent/assess/policy/preshift.rb +16 -12
  15. data/lib/contrast/agent/assess/policy/propagation_method.rb +102 -59
  16. data/lib/contrast/agent/assess/policy/propagator/database_write.rb +2 -7
  17. data/lib/contrast/agent/assess/policy/propagator/match_data.rb +31 -11
  18. data/lib/contrast/agent/assess/policy/propagator/remove.rb +4 -9
  19. data/lib/contrast/agent/assess/policy/propagator/split.rb +10 -6
  20. data/lib/contrast/agent/assess/policy/propagator/substitution.rb +3 -3
  21. data/lib/contrast/agent/assess/policy/rewriter_patch.rb +6 -7
  22. data/lib/contrast/agent/assess/policy/source_method.rb +18 -22
  23. data/lib/contrast/agent/assess/policy/trigger/xpath.rb +0 -4
  24. data/lib/contrast/agent/assess/policy/trigger_method.rb +62 -88
  25. data/lib/contrast/agent/assess/policy/trigger_node.rb +1 -1
  26. data/lib/contrast/agent/assess/property/evented.rb +2 -1
  27. data/lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb +3 -4
  28. data/lib/contrast/agent/at_exit_hook.rb +3 -3
  29. data/lib/contrast/agent/class_reopener.rb +6 -5
  30. data/lib/contrast/agent/disable_reaction.rb +4 -5
  31. data/lib/contrast/agent/exclusion_matcher.rb +2 -7
  32. data/lib/contrast/agent/inventory/database_config.rb +117 -0
  33. data/lib/contrast/agent/inventory/dependency_analysis.rb +2 -6
  34. data/lib/contrast/agent/inventory/dependency_usage_analysis.rb +9 -10
  35. data/lib/contrast/agent/inventory/policy/datastores.rb +5 -6
  36. data/lib/contrast/agent/inventory/policy/policy.rb +1 -1
  37. data/lib/contrast/agent/middleware.rb +15 -13
  38. data/lib/contrast/agent/patching/policy/after_load_patch.rb +6 -3
  39. data/lib/contrast/agent/patching/policy/after_load_patcher.rb +21 -16
  40. data/lib/contrast/agent/patching/policy/module_policy.rb +2 -4
  41. data/lib/contrast/agent/patching/policy/patch.rb +13 -8
  42. data/lib/contrast/agent/patching/policy/patch_status.rb +3 -7
  43. data/lib/contrast/agent/patching/policy/patcher.rb +14 -14
  44. data/lib/contrast/agent/patching/policy/policy.rb +2 -4
  45. data/lib/contrast/agent/patching/policy/policy_node.rb +2 -3
  46. data/lib/contrast/agent/protect/policy/applies_no_sqli_rule.rb +1 -1
  47. data/lib/contrast/agent/protect/policy/policy.rb +1 -1
  48. data/lib/contrast/agent/protect/policy/rule_applicator.rb +3 -5
  49. data/lib/contrast/agent/protect/rule/base.rb +10 -10
  50. data/lib/contrast/agent/protect/rule/cmd_injection.rb +4 -5
  51. data/lib/contrast/agent/protect/rule/no_sqli.rb +7 -53
  52. data/lib/contrast/agent/protect/rule/path_traversal.rb +1 -5
  53. data/lib/contrast/agent/protect/rule/sql_sample_builder.rb +137 -0
  54. data/lib/contrast/agent/protect/rule/sqli.rb +7 -70
  55. data/lib/contrast/agent/reaction_processor.rb +3 -4
  56. data/lib/contrast/agent/request.rb +13 -7
  57. data/lib/contrast/agent/request_context.rb +36 -34
  58. data/lib/contrast/agent/request_handler.rb +5 -3
  59. data/lib/contrast/agent/response.rb +2 -3
  60. data/lib/contrast/agent/rewriter.rb +4 -3
  61. data/lib/contrast/agent/rule_set.rb +5 -4
  62. data/lib/contrast/agent/scope.rb +32 -20
  63. data/lib/contrast/agent/service_heartbeat.rb +2 -3
  64. data/lib/contrast/agent/static_analysis.rb +7 -6
  65. data/lib/contrast/agent/thread.rb +2 -4
  66. data/lib/contrast/agent/thread_watcher.rb +3 -4
  67. data/lib/contrast/agent/tracepoint_hook.rb +20 -7
  68. data/lib/contrast/agent/version.rb +1 -1
  69. data/lib/contrast/api/communication/messaging_queue.rb +16 -11
  70. data/lib/contrast/api/communication/response_processor.rb +11 -11
  71. data/lib/contrast/api/communication/service_lifecycle.rb +9 -5
  72. data/lib/contrast/api/communication/socket_client.rb +18 -14
  73. data/lib/contrast/api/communication/speedracer.rb +5 -6
  74. data/lib/contrast/api/decorators/address.rb +2 -3
  75. data/lib/contrast/api/decorators/agent_startup.rb +7 -9
  76. data/lib/contrast/api/decorators/application_startup.rb +9 -10
  77. data/lib/contrast/api/decorators/application_update.rb +0 -4
  78. data/lib/contrast/api/decorators/http_request.rb +3 -7
  79. data/lib/contrast/api/decorators/instrumentation_mode.rb +3 -5
  80. data/lib/contrast/api/decorators/message.rb +7 -7
  81. data/lib/contrast/api/decorators/route_coverage.rb +24 -1
  82. data/lib/contrast/api/decorators/trace_event_object.rb +2 -3
  83. data/lib/contrast/components/agent.rb +13 -15
  84. data/lib/contrast/components/app_context.rb +7 -11
  85. data/lib/contrast/components/assess.rb +19 -16
  86. data/lib/contrast/components/base.rb +40 -0
  87. data/lib/contrast/components/config.rb +1 -2
  88. data/lib/contrast/components/contrast_service.rb +8 -11
  89. data/lib/contrast/components/heap_dump.rb +5 -4
  90. data/lib/contrast/components/inventory.rb +2 -7
  91. data/lib/contrast/components/logger.rb +14 -10
  92. data/lib/contrast/components/protect.rb +10 -13
  93. data/lib/contrast/components/sampling.rb +5 -5
  94. data/lib/contrast/components/scope.rb +9 -32
  95. data/lib/contrast/components/settings.rb +1 -5
  96. data/lib/contrast/config/base_configuration.rb +14 -6
  97. data/lib/contrast/configuration.rb +22 -19
  98. data/lib/contrast/extension/assess/array.rb +3 -15
  99. data/lib/contrast/extension/assess/eval_trigger.rb +2 -23
  100. data/lib/contrast/extension/assess/fiber.rb +6 -16
  101. data/lib/contrast/extension/assess/hash.rb +3 -13
  102. data/lib/contrast/extension/assess/kernel.rb +3 -14
  103. data/lib/contrast/extension/assess/marshal.rb +6 -14
  104. data/lib/contrast/extension/assess/regexp.rb +5 -15
  105. data/lib/contrast/extension/assess/string.rb +6 -31
  106. data/lib/contrast/extension/extension.rb +61 -0
  107. data/lib/contrast/extension/kernel.rb +2 -4
  108. data/lib/contrast/extension/protect/kernel.rb +0 -15
  109. data/lib/contrast/framework/grape/support.rb +174 -0
  110. data/lib/contrast/framework/manager.rb +44 -9
  111. data/lib/contrast/framework/rack/patch/session_cookie.rb +6 -6
  112. data/lib/contrast/framework/rack/support.rb +1 -1
  113. data/lib/contrast/framework/rails/patch/assess_configuration.rb +5 -8
  114. data/lib/contrast/framework/rails/patch/support.rb +43 -36
  115. data/lib/contrast/framework/rails/railtie.rb +8 -6
  116. data/lib/contrast/framework/rails/rewrite/active_record_named.rb +4 -4
  117. data/lib/contrast/framework/rails/support.rb +60 -13
  118. data/lib/contrast/framework/sinatra/support.rb +1 -1
  119. data/lib/contrast/funchook/funchook.rb +4 -3
  120. data/lib/contrast/logger/application.rb +1 -6
  121. data/lib/contrast/logger/log.rb +103 -13
  122. data/lib/contrast/logger/request.rb +0 -4
  123. data/lib/contrast/tasks/config.rb +0 -1
  124. data/lib/contrast/tasks/service.rb +1 -6
  125. data/lib/contrast/utils/assess/sampling_util.rb +2 -3
  126. data/lib/contrast/utils/assess/tracking_util.rb +2 -4
  127. data/lib/contrast/utils/class_util.rb +26 -19
  128. data/lib/contrast/utils/heap_dump_util.rb +5 -3
  129. data/lib/contrast/utils/invalid_configuration_util.rb +4 -3
  130. data/lib/contrast/utils/io_util.rb +46 -40
  131. data/lib/contrast/utils/job_servers_running.rb +4 -3
  132. data/lib/contrast/utils/lru_cache.rb +43 -0
  133. data/lib/contrast/utils/os.rb +2 -3
  134. data/lib/contrast/utils/ruby_ast_rewriter.rb +16 -13
  135. data/lib/contrast/utils/string_utils.rb +2 -3
  136. data/lib/contrast/utils/tag_util.rb +26 -19
  137. data/lib/contrast.rb +24 -14
  138. data/resources/assess/policy.json +197 -2
  139. data/resources/deadzone/policy.json +10 -0
  140. data/ruby-agent.gemspec +13 -3
  141. data/service_executables/VERSION +1 -1
  142. data/service_executables/linux/contrast-service +0 -0
  143. data/service_executables/mac/contrast-service +0 -0
  144. metadata +91 -25
  145. data/lib/contrast/components/interface.rb +0 -196
  146. data/lib/contrast/delegators/input_analysis.rb +0 -12
  147. data/lib/contrast/utils/inventory_util.rb +0 -114
@@ -7,8 +7,10 @@ module Contrast
7
7
  class TagUtil
8
8
  class << self
9
9
  # Determine if the given array of tags is covered by the other
10
- # remaining_ranges: the tags left that haven't been covered by those given
11
- # ranges: the tags that are covering the first
10
+ #
11
+ # @param remaining_ranges [Array<Contrast::Agent::Assess::Tag>] the tags left that haven't been covered by
12
+ # those given
13
+ # @param ranges Array<Contrast::Agent::Assess::Tag> the tags that are covering the first
12
14
  def covered? remaining_ranges, ranges
13
15
  return true unless remaining_ranges&.any?
14
16
 
@@ -74,14 +76,14 @@ module Contrast
74
76
 
75
77
  # Given a collection of tags, merge any tags that are continuous
76
78
  #
77
- # If tags is a hash, it should be in the format label => [tags]
78
- # The array of tags will each be merged
79
+ # If tags is a hash, it should be in the format label => [tags]. The array of tags will each be merged
80
+ # If tags is an array in the format [tags], the array will be merged
79
81
  #
80
- # If tags is an array in the format [tags], the array will be
81
- # merged
82
+ # The original object is returned, although setters should not be necessary since tags is a collection in
83
+ # either case
82
84
  #
83
- # The original object is returned, although setters should not be
84
- # necessary since tags is a collection in either case
85
+ # @param tags [Hash{String => Array<Contrast::Agent::Assess::Tag>}, Array<Contrast::Agent::Assess::Tag>]
86
+ # @return [Hash{String => Array<Contrast::Agent::Assess::Tag>}, Array<Contrast::Agent::Assess::Tag>]
85
87
  def merge_tags tags
86
88
  if tags.is_a?(Hash)
87
89
  tags.each_value { |value| smallerize(value) }
@@ -90,6 +92,12 @@ module Contrast
90
92
  end
91
93
  end
92
94
 
95
+ # Merge the given set of tags such that any overlap combines. For any tag which extends beyond the size of the
96
+ # target_object, the end will be updated to the target_object's length.
97
+ #
98
+ # @param target_object [Object] the thing to which the tags apply
99
+ # @param tags [Hash{String => Array<Contrast::Agent::Assess::Tag>}, Array<Contrast::Agent::Assess::Tag>]
100
+ # @return [Hash{String => Array<Contrast::Agent::Assess::Tag>}, Array<Contrast::Agent::Assess::Tag>]
93
101
  def size_aware_merge target_object, tags
94
102
  max_size = target_object.to_s.length
95
103
  tags = merge_tags(tags)
@@ -100,14 +108,12 @@ module Contrast
100
108
 
101
109
  private
102
110
 
103
- # Add one new element to the given array
111
+ # Add one new element to the given array. The addition is done such that the new entry is inserted so that the
112
+ # range they cover is in order. Any overlapping ranges are merged before returning.
104
113
  #
105
- # The addition is done such that the new entry(ies)
106
- # are inserted so that the range they cover is in order
107
- # Any overlapping ranges are merged before returning
108
- #
109
- # arr: the array to which the element is added
110
- # new_element: the element to be added to the array
114
+ # @param arr [Array<Contrast::Agent::Assess::Tag>]
115
+ # @param new_element []Contrast::Agent::Assess::Tag]
116
+ # @return [Array<Contrast::Agent::Assess::Tag>]
111
117
  def single_ordered_merge arr, new_element
112
118
  idx = 0
113
119
  arr.each do |existing|
@@ -122,10 +128,11 @@ module Contrast
122
128
  arr.insert(idx, new_element)
123
129
  end
124
130
 
125
- # Given an arry of tags, merge any that overlap
126
- # The tag that was higher up is removed from the
127
- # list of tags.
128
- # ranges like [0-3][3-6]-6-9] that should become [0-9]
131
+ # Given an arry of tags, merge any that overlap. The tag that was higher up is removed from the list of tags.
132
+ # ranges like [0-3][3-6]-6-9] become [0-9]
133
+ #
134
+ # @param tags [Array<Contrast::Agent::Assess::Tag>]
135
+ # @return [Array<Contrast::Agent::Assess::Tag>]
129
136
  def smallerize tags
130
137
  smallered = []
131
138
  curr = nil
data/lib/contrast.rb CHANGED
@@ -4,10 +4,6 @@
4
4
  # Used to prevent deprecation warnings from flooding stdout
5
5
  ENV['PB_IGNORE_DEPRECATIONS'] = 'true'
6
6
 
7
- # Top-level namespace for Contrast Security agent
8
- module Contrast
9
- end
10
-
11
7
  # Some developers override various methods on Object, which can often involve
12
8
  # changing expected method parity/behavior which in turn prevents us from being
13
9
  # able to reliably use affected methods.
@@ -38,22 +34,36 @@ if RUBY_VERSION >= '3.0.0'
38
34
  end
39
35
  end
40
36
 
41
- # component interface for class creation
42
- # config gets built as a consequence of this require
43
- require 'contrast/components/interface'
37
+ require 'contrast/components/agent'
38
+ require 'contrast/components/app_context'
39
+ require 'contrast/components/assess'
40
+ require 'contrast/components/config'
41
+ require 'contrast/components/contrast_service'
42
+ require 'contrast/components/inventory'
43
+ require 'contrast/components/logger'
44
+ require 'contrast/components/protect'
45
+ require 'contrast/components/sampling'
46
+ require 'contrast/components/scope'
47
+ require 'contrast/components/settings'
48
+
49
+ module Contrast
50
+ SCOPE = Contrast::Components::Scope::Interface.new
51
+ CONFIG = Contrast::Components::Config::Interface.new
52
+ SETTINGS = Contrast::Components::Settings::Interface.new
53
+ ASSESS = Contrast::Components::Assess::Interface.new
54
+ PROTECT = Contrast::Components::Protect::Interface.new
55
+ INVENTORY = Contrast::Components::Inventory::Interface.new
56
+ LOGGER = Contrast::Components::Logger::Interface.new
57
+ AGENT = Contrast::Components::Agent::Interface.new
58
+ CONTRAST_SERVICE = Contrast::Components::ContrastService::Interface.new
59
+ APP_CONTEXT = Contrast::Components::AppContext::Interface.new
60
+ end
44
61
 
45
62
  # This needs to be required very early, after component interfaces, and before instrumentation attempts
46
63
  require 'contrast/funchook/funchook'
47
64
 
48
- # shared configuration support
49
- require 'contrast/config'
50
- require 'contrast/configuration'
51
-
52
65
  require 'contrast/agent/version'
53
66
 
54
- # errors and exceptions
55
- require 'contrast/security_exception'
56
-
57
67
  # shared utils
58
68
  require 'contrast/utils/timer'
59
69
  require 'contrast/utils/preflight_util'
@@ -34,6 +34,23 @@
34
34
  "type": "BODY",
35
35
  "tags":["NO_NEWLINES", "CROSS_SITE"]
36
36
  }, {
37
+ "class_name":"ActionDispatch::Request",
38
+ "instance_method": true,
39
+ "method_visibility": "public",
40
+ "method_name": "body",
41
+ "source": "P0",
42
+ "target": "R",
43
+ "type": "BODY",
44
+ "tags":["NO_NEWLINES", "CROSS_SITE"]
45
+ }, {
46
+ "class_name":"ActionDispatch::Cookies::CookieJar",
47
+ "instance_method": true,
48
+ "method_visibility": "public",
49
+ "method_name": "[]",
50
+ "target": "R",
51
+ "type": "COOKIE",
52
+ "tags":["NO_NEWLINES", "CROSS_SITE"]
53
+ }, {
37
54
  "class_name":"Rack::Request::Helpers",
38
55
  "instance_method": true,
39
56
  "method_visibility": "public",
@@ -129,10 +146,45 @@
129
146
  "target":"R",
130
147
  "type":"PARAMETER",
131
148
  "tags":["CROSS_SITE"]
149
+ }, {
150
+ "class_name":"Grape::Env",
151
+ "instance_method": true,
152
+ "method_visibility": "public",
153
+ "method_name":"[]",
154
+ "source": "P0",
155
+ "target":"R",
156
+ "type":"HEADER",
157
+ "tags":["CROSS_SITE"]
158
+ }, {
159
+ "class_name":"Grape::Request",
160
+ "instance_method": true,
161
+ "method_visibility": "public",
162
+ "method_name":"headers",
163
+ "source": "P0",
164
+ "target":"R",
165
+ "type":"HEADER",
166
+ "tags":["NO_NEWLINES", "CROSS_SITE"]
167
+ }, {
168
+ "class_name":"Grape::Request",
169
+ "instance_method": true,
170
+ "method_visibility": "public",
171
+ "method_name":"body",
172
+ "target":"R",
173
+ "type":"BODY",
174
+ "tags":["CROSS_SITE"]
175
+ }, {
176
+ "class_name":"Grape::Validations::Base",
177
+ "instance_method": true,
178
+ "method_visibility": "public",
179
+ "method_name":"validate!",
180
+ "source": "P0",
181
+ "target":"R",
182
+ "type":"PARAMETER",
183
+ "tags":["CROSS_SITE"]
132
184
  }
133
185
  ],
134
186
  "propagators":[
135
- {
187
+ {
136
188
  "class_name":"String",
137
189
  "instance_method": true,
138
190
  "method_visibility": "public",
@@ -140,7 +192,7 @@
140
192
  "source":"O",
141
193
  "target":"R",
142
194
  "action":"KEEP"
143
- }, {
195
+ }, {
144
196
  "class_name": "String",
145
197
  "instance_method": true,
146
198
  "method_visibility": "public",
@@ -722,6 +774,24 @@
722
774
  "patch_method": "select_tagger",
723
775
  "source": "O",
724
776
  "target": "R"
777
+ },{
778
+ "class_name":"CGI::Util",
779
+ "method_name":"unescape",
780
+ "instance_method": true,
781
+ "method_visibility": "public",
782
+ "source":"P0",
783
+ "target":"R",
784
+ "action":"SPLAT",
785
+ "tags":[],
786
+ "untags":[]
787
+ }, {
788
+ "class_name":"StringIO",
789
+ "instance_method": true,
790
+ "method_visibility": "public",
791
+ "method_name": "read",
792
+ "source": "O",
793
+ "target": "R",
794
+ "action": "SPLAT"
725
795
  }, {
726
796
  "class_name":"CGI::Util",
727
797
  "method_name":"escapeHTML",
@@ -742,6 +812,16 @@
742
812
  "action":"SPLAT",
743
813
  "tags":["HTML_ENCODED"],
744
814
  "untags":["HTML_DECODED"]
815
+ }, {
816
+ "class_name":"Rack::Utils",
817
+ "method_name":"escape_html",
818
+ "instance_method": false,
819
+ "method_visibility": "public",
820
+ "source":"P0",
821
+ "target":"R",
822
+ "action":"SPLAT",
823
+ "tags":["HTML_ENCODED"],
824
+ "untags":["HTML_DECODED"]
745
825
  }, {
746
826
  "class_name":"CGI::Util",
747
827
  "method_name":"h",
@@ -1287,6 +1367,18 @@
1287
1367
  "instance_method": true,
1288
1368
  "method_visibility": "public",
1289
1369
  "source":"P0"
1370
+ }, {
1371
+ "class_name":"Rack::Response",
1372
+ "method_name":"body=",
1373
+ "instance_method": true,
1374
+ "method_visibility": "public",
1375
+ "source":"P0"
1376
+ }, {
1377
+ "class_name":"Rack::Response",
1378
+ "method_name":"write",
1379
+ "instance_method": true,
1380
+ "method_visibility": "public",
1381
+ "source":"P0"
1290
1382
  }, {
1291
1383
  "class_name":"Sinatra::Helpers",
1292
1384
  "method_name":"body",
@@ -1347,12 +1439,108 @@
1347
1439
  "method_visibility": "public",
1348
1440
  "method_name":"async_exec",
1349
1441
  "source":"P0"
1442
+ }, {
1443
+ "class_name":"ActiveRecord::Relation::Calculations",
1444
+ "instance_method": true,
1445
+ "method_visibility": "public",
1446
+ "method_name":"calculate",
1447
+ "source":"P0"
1448
+ }, {
1449
+ "class_name":"ActiveRecord::FinderMethods",
1450
+ "instance_method": true,
1451
+ "method_visibility": "public",
1452
+ "method_name":"exists?",
1453
+ "source":"P0"
1454
+ }, {
1455
+ "class_name":"ActiveRecord::FinderMethods",
1456
+ "instance_method": true,
1457
+ "method_visibility": "public",
1458
+ "method_name":"find_by",
1459
+ "source":"P0"
1350
1460
  }, {
1351
1461
  "class_name":"ActiveRecord::Querying",
1352
1462
  "instance_method": false,
1353
1463
  "method_visibility": "public",
1354
1464
  "method_name":"select",
1355
1465
  "source":"P0"
1466
+ }, {
1467
+ "class_name":"ActiveRecord::QueryMethods",
1468
+ "instance_method": true,
1469
+ "method_visibility": "public",
1470
+ "method_name":"from",
1471
+ "source":"P0"
1472
+ }, {
1473
+ "class_name":"ActiveRecord::QueryMethods",
1474
+ "instance_method": true,
1475
+ "method_visibility": "public",
1476
+ "method_name":"group",
1477
+ "source":"P0"
1478
+ }, {
1479
+ "class_name":"ActiveRecord::QueryMethods",
1480
+ "instance_method": true,
1481
+ "method_visibility": "public",
1482
+ "method_name":"having",
1483
+ "source":"P0"
1484
+ }, {
1485
+ "class_name":"ActiveRecord::QueryMethods",
1486
+ "instance_method": true,
1487
+ "method_visibility": "public",
1488
+ "method_name":"joins",
1489
+ "source":"P0"
1490
+ }, {
1491
+ "class_name":"ActiveRecord::QueryMethods",
1492
+ "instance_method": true,
1493
+ "method_visibility": "public",
1494
+ "method_name":"lock",
1495
+ "source":"P0"
1496
+ }, {
1497
+ "class_name":"ActiveRecord::QueryMethods",
1498
+ "instance_method": true,
1499
+ "method_visibility": "public",
1500
+ "method_name":"select",
1501
+ "source":"P0"
1502
+ }, {
1503
+ "class_name":"ActiveRecord::QueryMethods",
1504
+ "instance_method": true,
1505
+ "method_visibility": "public",
1506
+ "method_name":"reselect",
1507
+ "source":"P0"
1508
+ }, {
1509
+ "class_name":"ActiveRecord::QueryMethods",
1510
+ "instance_method": true,
1511
+ "method_visibility": "public",
1512
+ "method_name":"where",
1513
+ "source":"P0"
1514
+ }, {
1515
+ "class_name":"ActiveRecord::QueryMethods",
1516
+ "instance_method": true,
1517
+ "method_visibility": "public",
1518
+ "method_name":"rewhere",
1519
+ "source":"P0"
1520
+ }, {
1521
+ "class_name":"ActiveRecord::QueryMethods::WhereChain",
1522
+ "instance_method": true,
1523
+ "method_visibility": "public",
1524
+ "method_name":"not",
1525
+ "source":"P0"
1526
+ }, {
1527
+ "class_name":"ActiveRecord::Relation",
1528
+ "instance_method": true,
1529
+ "method_visibility": "public",
1530
+ "method_name":"delete_by",
1531
+ "source":"P0"
1532
+ }, {
1533
+ "class_name":"ActiveRecord::Relation",
1534
+ "instance_method": true,
1535
+ "method_visibility": "public",
1536
+ "method_name":"destroy_by",
1537
+ "source":"P0"
1538
+ }, {
1539
+ "class_name":"ActiveRecord::Relation",
1540
+ "instance_method": true,
1541
+ "method_visibility": "public",
1542
+ "method_name":"update_all",
1543
+ "source":"P0"
1356
1544
  }
1357
1545
  ]
1358
1546
  }, {
@@ -1685,6 +1873,13 @@
1685
1873
  "method_visibility": "public",
1686
1874
  "method_name": "redirect_to",
1687
1875
  "source": "P0"
1876
+ },
1877
+ {
1878
+ "class_name": "Grape::DSL::InsideRoute",
1879
+ "instance_method": true,
1880
+ "method_visibility": "public",
1881
+ "method_name": "redirect",
1882
+ "source": "P0"
1688
1883
  }
1689
1884
  ]
1690
1885
  }, {
@@ -1,6 +1,16 @@
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
+ "class_name":"Rspec::Core::Example",
10
+ "instance_method":true,
11
+ "method_visibility": "private",
12
+ "method_name":"finish"
13
+ },{
4
14
  "class_name":"Rack::Request::Helpers",
5
15
  "instance_method":true,
6
16
  "method_visibility": "public",
data/ruby-agent.gemspec CHANGED
@@ -24,6 +24,7 @@ def self.add_dev_dependencies spec
24
24
  add_debuggers(spec)
25
25
  add_linters(spec) # if RUBY_VERSION >= '2.6.0' # TODO: RUBY-714 remove guard w/ EOL of 2.5
26
26
  add_specs(spec)
27
+ add_custom_dependencies(spec)
27
28
  end
28
29
 
29
30
  # Dependencies used to build the agent during development.
@@ -33,14 +34,21 @@ def self.add_builders spec
33
34
  spec.add_development_dependency 'rake-compiler', '~> 0'
34
35
  end
35
36
 
37
+ # Dependencies that are required during testing in actual application
38
+ def self.add_custom_dependencies spec
39
+ spec.add_development_dependency 'zlib'
40
+ end
41
+
36
42
  # Dependencies used for local debugging during development.
37
43
  def self.add_debuggers spec
38
44
  spec.add_development_dependency 'pry'
45
+ spec.add_development_dependency 'pry-byebug', '>= 3.9'
39
46
  spec.add_development_dependency 'ruby-debug-ide'
40
47
  end
41
48
 
42
49
  # Dependencies used for framework testing.
43
50
  def self.add_frameworks spec
51
+ spec.add_development_dependency 'grape', '~> 1.5', '>= 1.5.2'
44
52
  spec.add_development_dependency 'rack-protection', '>= 2'
45
53
  spec.add_development_dependency 'rails', '6.0.3.5'
46
54
  spec.add_development_dependency 'sinatra', '>= 2'
@@ -51,6 +59,7 @@ def self.add_linters spec
51
59
  spec.add_development_dependency 'debride', '1.8.2'
52
60
  spec.add_development_dependency 'fasterer', '0.9.0'
53
61
  spec.add_development_dependency 'flay', '2.12.1'
62
+ # spec.add_development_dependency 'steep', '0.44.1' # TODO: RUBY-714 uncomment w/ EOL of 2.5
54
63
  add_rubocop(spec)
55
64
  end
56
65
 
@@ -65,15 +74,16 @@ def self.add_specs spec
65
74
  spec.add_development_dependency 'factory_bot'
66
75
  spec.add_development_dependency 'fake_ftp'
67
76
  spec.add_development_dependency 'openssl'
77
+ spec.add_development_dependency 'parallel_tests'
68
78
  spec.add_development_dependency 'rspec', '~> 3.0'
69
79
  spec.add_development_dependency 'rspec-benchmark'
70
80
  spec.add_development_dependency 'rspec_junit_formatter', '0.3.0'
71
81
  spec.add_development_dependency 'rspec-rails', '5.0'
72
82
  spec.add_development_dependency 'tzinfo-data' # Alpine rspec-rails requirement.
83
+ spec.add_development_dependency 'warning'
73
84
  end
74
85
 
75
86
  def self.add_coverage spec
76
- spec.add_development_dependency 'codecov', '0.5.2'
77
87
  spec.add_development_dependency 'simplecov', '0.21.2'
78
88
  end
79
89
 
@@ -90,8 +100,8 @@ end
90
100
  def self.add_tested_gems spec
91
101
  spec.add_development_dependency 'async'
92
102
  spec.add_development_dependency 'execjs'
93
- spec.add_development_dependency 'sqlite3'
94
103
  spec.add_development_dependency 'rhino'
104
+ spec.add_development_dependency 'sqlite3'
95
105
  spec.add_development_dependency 'tilt'
96
106
  spec.add_development_dependency 'xpath'
97
107
  end
@@ -114,7 +124,7 @@ def self.add_files spec
114
124
  # Directories used for testing:
115
125
  f.match(%r{^(spec|test)/}) ||
116
126
  # Directories used in pipelines
117
- f.match(%r{^(\.github|bin|internal_resources|vendor)/}) ||
127
+ f.match(%r{^(\.github|bin|internal_resources|sig|vendor)/}) ||
118
128
  # Configuration and other files that don't belong to one directory
119
129
  f.match(/(Dockerfile)/) ||
120
130
  f.match(/(.*\.csv)/) ||
@@ -1 +1 @@
1
- 2.20.2
1
+ 2.21.2