Sha256: 46b1ec9c17c8f10f19ed8169534eb78b988f1f8d9b33210fac06bfdb51016c34

Contents?: true

Size: 963 Bytes

Versions: 15

Compression:

Stored size: 963 Bytes

Contents

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

module Contrast
  module Agent
    module Assess
      module Policy
        module Propagator
          # Propagation that results in all the tags of the source being
          # applied to the target exactly as is. The target's preexisting tags
          # are unaffected beyond any merging of overlapping tags.
          class Keep < Contrast::Agent::Assess::Policy::Propagator::Base
            class << self
              # Keep means the tags just pass from the source to the target
              # as is.
              def propagate propagation_node, preshift, target
                source = find_source(propagation_node.sources[0], preshift)
                target.cs__copy_from(source, 0, propagation_node.untags)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
contrast-agent-3.14.0 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.13.2 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.13.1 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.13.0 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.12.2 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.12.1 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.12.0 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.11.0 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.10.2 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.10.1 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.10.0 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.9.1 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.9.0 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.8.5 lib/contrast/agent/assess/policy/propagator/keep.rb
contrast-agent-3.8.4 lib/contrast/agent/assess/policy/propagator/keep.rb