Sha256: 2aab6719c00cfce2d19d919503ee70d6e129f79bf686286a5924bb7615a5a07b
Contents?: true
Size: 1.37 KB
Versions: 12
Compression:
Stored size: 1.37 KB
Contents
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true cs__scoped_require 'contrast/agent/assess/policy/source_validation/cross_site_validator' module Contrast module Agent module Assess module Policy # Some of our sources require validation to prevent them from applying # certain tags in a given context. This provides a single place from # which those validations can be called. module SourceValidation VALIDATORS = [ Contrast::Agent::Assess::Policy::SourceValidation::CrossSiteValidator ].cs__freeze # Determines if the conditions in which this source was called are # valid and should result in the application of a tag # # @param tag [String] the tag which the Source is attempting to apply # @param source_type [String] the type of the source # @param source_name [String] the name of the source # @return [Boolean] if the conditions are valid for the application # of a tag def self.valid? tag, source_type, source_name VALIDATORS.each do |validator| return false unless validator.valid?(tag, source_type, source_name) end true end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems