Module: Contrast::Agent::Protect::Policy::RuleApplicator
- Includes:
- Components::Interface
- Included in:
- AppliesCommandInjectionRule, AppliesDeserializationRule, AppliesNoSqliRule, AppliesPathTraversalRule, AppliesSqliRule, AppliesXxeRule
- Defined in:
- lib/contrast/agent/protect/policy/rule_applicator.rb
Overview
This Module is the base of our Protect Applicators. It lays out the form of the Applicator, which will override specific implementations in order to properly invoke its Rule.
Instance Method Summary collapse
Methods included from Components::Interface
Instance Method Details
#apply_rule(method, exception, properties, object, args) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/contrast/agent/protect/policy/rule_applicator.rb', line 18 def apply_rule method, exception, properties, object, args invoke(method, exception, properties, object, args) rescue Contrast::SecurityException => e raise e rescue StandardError => e logger.error('Error applying protect rule', e, module: object.cs__class.cs__name, method: method, rule: name) end |