Class: Contrast::Agent::Assess::Policy::Propagator::RackProtection

Inherits:
Base
  • Object
show all
Defined in:
lib/contrast/agent/assess/policy/propagator/rack_protection.rb

Overview

Rack::Protection offers several protections against vulnerabilities. Of these, some apply to dataflow and need to be accounted for in order to properly tag data. Others apply to configurations and may be used to suppress configuration vulnerabilities in the future.

Class Method Summary collapse

Methods inherited from Base

find_source, propagate, tracked_value?

Class Method Details

.escaped_params(propagation_node, preshift, ret, _block) ⇒ nil, String

Our custom instrumentation for the Rack::Protection::EscapedParams#escape_string method

Parameters:

Returns:



21
22
23
24
25
# File 'lib/contrast/agent/assess/policy/propagator/rack_protection.rb', line 21

def escaped_params propagation_node, preshift, ret, _block
  Contrast::Agent::Assess::Policy::Propagator::Splat.propagate(propagation_node, preshift, ret)
  apply_escaper_tags(preshift.object, ret)
  ret
end