Sha256: ea4132f983cbb95bf53d368fe4ffe8d304a52047cf9a018f8c00705230ba1eee

Contents?: true

Size: 799 Bytes

Versions: 4

Compression:

Stored size: 799 Bytes

Contents

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

require 'contrast/agent/assess/rule/response/header_rule'
require 'contrast/utils/string_utils'

module Contrast
  module Agent
    module Assess
      module Rule
        module Response
          # These rules check the content of the HTTP Response to determine if the headers contains the required header
          class ClickJacking < HeaderRule
            def rule_id
              'clickjacking-control-missing'
            end

            HEADER_KEYS = %w[X-Frame-Options].cs__freeze
            ACCEPTED_VALUES = [/^deny/i, /^sameorigin/i].cs__freeze
            DEFAULT_SAFE = false
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
contrast-agent-6.1.0 lib/contrast/agent/assess/rule/response/click_jacking_header_rule.rb
contrast-agent-6.0.0 lib/contrast/agent/assess/rule/response/click_jacking_header_rule.rb
contrast-agent-5.3.0 lib/contrast/agent/assess/rule/response/click_jacking_header_rule.rb
contrast-agent-5.2.0 lib/contrast/agent/assess/rule/response/click_jacking_header_rule.rb