contrast-agent 4.8.0 → 4.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -1
  3. data/.simplecov +1 -0
  4. data/lib/contrast.rb +24 -14
  5. data/lib/contrast/agent/assess/contrast_event.rb +1 -4
  6. data/lib/contrast/agent/assess/finalizers/hash.rb +2 -4
  7. data/lib/contrast/agent/assess/policy/patcher.rb +6 -4
  8. data/lib/contrast/agent/assess/policy/policy.rb +1 -1
  9. data/lib/contrast/agent/assess/policy/policy_scanner.rb +3 -5
  10. data/lib/contrast/agent/assess/policy/preshift.rb +4 -4
  11. data/lib/contrast/agent/assess/policy/propagation_method.rb +4 -4
  12. data/lib/contrast/agent/assess/policy/propagator/database_write.rb +3 -6
  13. data/lib/contrast/agent/assess/policy/propagator/split.rb +9 -6
  14. data/lib/contrast/agent/assess/policy/propagator/substitution.rb +2 -3
  15. data/lib/contrast/agent/assess/policy/rewriter_patch.rb +7 -7
  16. data/lib/contrast/agent/assess/policy/source_method.rb +6 -6
  17. data/lib/contrast/agent/assess/policy/trigger/xpath.rb +0 -3
  18. data/lib/contrast/agent/assess/policy/trigger_method.rb +2 -3
  19. data/lib/contrast/agent/assess/policy/trigger_node.rb +1 -1
  20. data/lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb +4 -4
  21. data/lib/contrast/agent/at_exit_hook.rb +3 -3
  22. data/lib/contrast/agent/class_reopener.rb +6 -5
  23. data/lib/contrast/agent/disable_reaction.rb +3 -4
  24. data/lib/contrast/agent/exclusion_matcher.rb +2 -3
  25. data/lib/contrast/agent/inventory/dependency_analysis.rb +2 -6
  26. data/lib/contrast/agent/inventory/dependency_usage_analysis.rb +3 -5
  27. data/lib/contrast/agent/inventory/policy/datastores.rb +3 -4
  28. data/lib/contrast/agent/inventory/policy/policy.rb +1 -1
  29. data/lib/contrast/agent/middleware.rb +14 -13
  30. data/lib/contrast/agent/patching/policy/after_load_patch.rb +3 -3
  31. data/lib/contrast/agent/patching/policy/after_load_patcher.rb +3 -4
  32. data/lib/contrast/agent/patching/policy/patch.rb +8 -8
  33. data/lib/contrast/agent/patching/policy/patcher.rb +6 -6
  34. data/lib/contrast/agent/patching/policy/policy.rb +2 -4
  35. data/lib/contrast/agent/patching/policy/policy_node.rb +2 -3
  36. data/lib/contrast/agent/protect/policy/policy.rb +1 -1
  37. data/lib/contrast/agent/protect/policy/rule_applicator.rb +3 -5
  38. data/lib/contrast/agent/protect/rule/base.rb +10 -10
  39. data/lib/contrast/agent/protect/rule/cmd_injection.rb +4 -5
  40. data/lib/contrast/agent/protect/rule/path_traversal.rb +1 -5
  41. data/lib/contrast/agent/reaction_processor.rb +2 -3
  42. data/lib/contrast/agent/request.rb +4 -3
  43. data/lib/contrast/agent/request_context.rb +9 -9
  44. data/lib/contrast/agent/request_handler.rb +5 -3
  45. data/lib/contrast/agent/response.rb +2 -3
  46. data/lib/contrast/agent/rewriter.rb +4 -3
  47. data/lib/contrast/agent/rule_set.rb +5 -4
  48. data/lib/contrast/agent/service_heartbeat.rb +2 -3
  49. data/lib/contrast/agent/static_analysis.rb +6 -5
  50. data/lib/contrast/agent/thread.rb +2 -4
  51. data/lib/contrast/agent/thread_watcher.rb +3 -4
  52. data/lib/contrast/agent/tracepoint_hook.rb +4 -4
  53. data/lib/contrast/agent/version.rb +1 -1
  54. data/lib/contrast/api/communication/messaging_queue.rb +4 -5
  55. data/lib/contrast/api/communication/response_processor.rb +11 -11
  56. data/lib/contrast/api/communication/service_lifecycle.rb +5 -4
  57. data/lib/contrast/api/communication/socket_client.rb +18 -14
  58. data/lib/contrast/api/communication/speedracer.rb +5 -6
  59. data/lib/contrast/api/decorators/address.rb +2 -3
  60. data/lib/contrast/api/decorators/agent_startup.rb +7 -9
  61. data/lib/contrast/api/decorators/application_startup.rb +8 -10
  62. data/lib/contrast/api/decorators/application_update.rb +0 -4
  63. data/lib/contrast/api/decorators/http_request.rb +3 -7
  64. data/lib/contrast/api/decorators/instrumentation_mode.rb +3 -5
  65. data/lib/contrast/api/decorators/message.rb +7 -7
  66. data/lib/contrast/api/decorators/trace_event_object.rb +2 -3
  67. data/lib/contrast/components/agent.rb +10 -15
  68. data/lib/contrast/components/app_context.rb +7 -11
  69. data/lib/contrast/components/assess.rb +16 -16
  70. data/lib/contrast/components/base.rb +40 -0
  71. data/lib/contrast/components/config.rb +0 -2
  72. data/lib/contrast/components/contrast_service.rb +6 -11
  73. data/lib/contrast/components/heap_dump.rb +5 -4
  74. data/lib/contrast/components/inventory.rb +2 -7
  75. data/lib/contrast/components/logger.rb +1 -2
  76. data/lib/contrast/components/protect.rb +10 -13
  77. data/lib/contrast/components/sampling.rb +5 -5
  78. data/lib/contrast/components/scope.rb +0 -4
  79. data/lib/contrast/components/settings.rb +1 -5
  80. data/lib/contrast/configuration.rb +3 -4
  81. data/lib/contrast/extension/assess/array.rb +2 -4
  82. data/lib/contrast/extension/assess/eval_trigger.rb +2 -3
  83. data/lib/contrast/extension/assess/fiber.rb +6 -5
  84. data/lib/contrast/extension/assess/hash.rb +3 -3
  85. data/lib/contrast/extension/assess/kernel.rb +2 -4
  86. data/lib/contrast/extension/assess/marshal.rb +4 -4
  87. data/lib/contrast/extension/assess/regexp.rb +5 -4
  88. data/lib/contrast/extension/assess/string.rb +6 -6
  89. data/lib/contrast/extension/kernel.rb +2 -4
  90. data/lib/contrast/extension/protect/kernel.rb +0 -5
  91. data/lib/contrast/framework/manager.rb +2 -3
  92. data/lib/contrast/framework/rack/patch/session_cookie.rb +6 -6
  93. data/lib/contrast/framework/rails/patch/assess_configuration.rb +5 -7
  94. data/lib/contrast/framework/rails/patch/support.rb +40 -36
  95. data/lib/contrast/framework/rails/railtie.rb +8 -6
  96. data/lib/contrast/framework/rails/rewrite/active_record_named.rb +3 -4
  97. data/lib/contrast/funchook/funchook.rb +4 -3
  98. data/lib/contrast/logger/application.rb +1 -6
  99. data/lib/contrast/logger/log.rb +22 -6
  100. data/lib/contrast/logger/request.rb +0 -4
  101. data/lib/contrast/tasks/service.rb +1 -6
  102. data/lib/contrast/utils/assess/sampling_util.rb +2 -3
  103. data/lib/contrast/utils/assess/tracking_util.rb +2 -4
  104. data/lib/contrast/utils/heap_dump_util.rb +5 -3
  105. data/lib/contrast/utils/invalid_configuration_util.rb +4 -3
  106. data/lib/contrast/utils/inventory_util.rb +2 -3
  107. data/lib/contrast/utils/io_util.rb +2 -4
  108. data/lib/contrast/utils/job_servers_running.rb +4 -3
  109. data/lib/contrast/utils/os.rb +2 -3
  110. data/lib/contrast/utils/string_utils.rb +2 -3
  111. data/lib/contrast/utils/tag_util.rb +25 -19
  112. data/ruby-agent.gemspec +4 -2
  113. data/service_executables/VERSION +1 -1
  114. data/service_executables/linux/contrast-service +0 -0
  115. data/service_executables/mac/contrast-service +0 -0
  116. metadata +28 -15
  117. data/lib/contrast/components/interface.rb +0 -196
  118. data/lib/contrast/delegators/input_analysis.rb +0 -12
@@ -1,12 +0,0 @@
1
- # Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
2
- # frozen_string_literal: true
3
-
4
- module Contrast
5
- module Delegators
6
- # Used to decorate the InputAnalysis protobuf model so it can own the
7
- # Contrast::Agent::Request from which it came.
8
- class InputAnalysis < SimpleDelegator
9
- attr_accessor :request
10
- end
11
- end
12
- end