lib/contrast/agent/static_analysis.rb in contrast-agent-4.8.0 vs lib/contrast/agent/static_analysis.rb in contrast-agent-4.9.0

- old
+ new

@@ -1,19 +1,20 @@ # Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true -require 'contrast/components/interface' -require 'contrast/agent/inventory' +require 'contrast/components/logger' +require 'contrast/components/scope' require 'contrast/api/decorators/application_update' module Contrast module Agent # this module handles one time static analysis tasks class StaticAnalysis include Singleton - include Contrast::Components::Interface - access_component :logging, :analysis, :scope + include Contrast::Components::Logger::InstanceMethods + include Contrast::Components::Scope::InstanceMethods + class << self # After the first request is complete, we do a one-time manual catchup to review and # report the already-loaded gems. def catchup @_catchup ||= begin @@ -21,10 +22,10 @@ true end end def send_inventory_message - return unless INVENTORY.enabled? + return unless ::Contrast::INVENTORY.enabled? app_update_msg = Contrast::Api::Dtm::ApplicationUpdate.build Contrast::Utils::InventoryUtil.append_db_config(app_update_msg) Contrast::Agent.messaging_queue.send_event_eventually(app_update_msg)