Class: Contrast::Agent::Assess::Rule::Response::CspHeaderMissing

Inherits:
HeaderRule show all
Defined in:
lib/contrast/agent/assess/rule/response/csp_header_missing_rule.rb

Overview

These rules check that the HTTP Headers include CSP header types

Constant Summary collapse

HEADER_KEYS =
%w[Content-Security-Policy X-Content-Security-Policy X-Webkit-CSP].cs__freeze
ACCEPTED_VALUES =
[/(.)/].cs__freeze
DEFAULT_SAFE =
false

Constants inherited from HeaderRule

HeaderRule::HEADER_TYPE

Constants inherited from BaseRule

BaseRule::DATA

Instance Method Summary collapse

Methods inherited from HeaderRule

#analyze_response?, #headers?, #violated?

Methods inherited from BaseRule

#analyze

Instance Method Details

#rule_idObject



18
19
20
# File 'lib/contrast/agent/assess/rule/response/csp_header_missing_rule.rb', line 18

def rule_id
  'csp-header-missing'
end