Class: Contrast::Agent::Assess::Rule::Response::XXssProtection

Inherits:
HeaderRule show all
Includes:
Framework::RailsSupport
Defined in:
lib/contrast/agent/assess/rule/response/x_xss_protection_header_rule.rb

Overview

These rules check the content of the HTTP Response to determine if the response contains the needed header

Constant Summary collapse

HEADER_KEYS =
%w[X-XSS-Protection].cs__freeze
ACCEPTED_VALUES =
[/^1/].cs__freeze
DEFAULT_SAFE =
true

Constants included from Framework::RailsSupport

Framework::RailsSupport::RAILS_VERSION

Constants inherited from HeaderRule

HeaderRule::HEADER_TYPE

Constants inherited from BaseRule

BaseRule::DATA

Instance Method Summary collapse

Methods included from Framework::RailsSupport

#rails_seven?

Methods inherited from HeaderRule

#headers?, #violated?

Methods inherited from BaseRule

#analyze

Instance Method Details

#rule_idObject



20
21
22
# File 'lib/contrast/agent/assess/rule/response/x_xss_protection_header_rule.rb', line 20

def rule_id
  'xxssprotection-header-disabled'
end