Class: Contrast::Agent::Protect::Rule::Xss

Inherits:
BaseService show all
Defined in:
lib/contrast/agent/protect/rule/xss.rb

Overview

The Ruby implementation of the Protect Cross-Site Scripting rule.

Constant Summary collapse

NAME =
'reflected-xss'
BLOCK_MESSAGE =
'XSS rule triggered. Response blocked.'

Constants inherited from Base

Base::BLOCKING_MODES, Base::OFF, Base::POSTFILTER_MODES, Base::STACK_COLLECTION_RESULTS, Base::UNKNOWN_USER_INPUT

Instance Attribute Summary

Attributes inherited from Base

#mode

Instance Method Summary collapse

Methods inherited from BaseService

#block_message, #infilter?, #postfilter

Methods inherited from Base

#append_to_activity, #build_attack_with_match, #build_attack_without_match, #enabled?, #excluded?, #infilter, #infilter?, #initialize, #postfilter, #prefilter

Methods included from Components::Interface

included

Constructor Details

This class inherits a constructor from Contrast::Agent::Protect::Rule::Base

Instance Method Details

#nameObject



15
16
17
# File 'lib/contrast/agent/protect/rule/xss.rb', line 15

def name
  NAME
end

#stream_safe?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/contrast/agent/protect/rule/xss.rb', line 19

def stream_safe?
  false
end