Sha256: f6fd31773af5230200929e70e941cda8d64a3101e6d5580c99883c6bbc188b33

Contents?: true

Size: 1 KB

Versions: 5

Compression:

Stored size: 1 KB

Contents

# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

require 'contrast/agent/patching/policy/policy_node'

module Contrast
  module Agent
    module Deadzone
      module Policy
        # This class functions to translate our policy.json into an actionable
        # Ruby object, allowing for dynamic patching over hardcoded patching,
        # specifically for those methods in which other Contrast operations
        # should not apply
        class DeadzoneNode < Contrast::Agent::Patching::Policy::PolicyNode
          def node_class
            'Deadzone'
          end

          def feature
            'Deadzone'
          end

          # Deadzone means place the code inside of the contrast scope so that
          # none of our code executes. As such, all DeadZone nodes have that as
          # their method scope
          def method_scope
            :contrast
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
contrast-agent-4.4.1 lib/contrast/agent/deadzone/policy/deadzone_node.rb
contrast-agent-4.4.0 lib/contrast/agent/deadzone/policy/deadzone_node.rb
contrast-agent-4.3.2 lib/contrast/agent/deadzone/policy/deadzone_node.rb
contrast-agent-4.3.1 lib/contrast/agent/deadzone/policy/deadzone_node.rb
contrast-agent-4.3.0 lib/contrast/agent/deadzone/policy/deadzone_node.rb