Module: Contrast::Utils::InvalidConfigurationUtil
- Included in:
- Framework::Rack::Patch::SessionCookie, Framework::Rails::Patch::AssessConfiguration, Framework::Sinatra::Patch::EncryptedSessionCookie
- Defined in:
- lib/contrast/utils/invalid_configuration_util.rb
Overview
This utility allows us to report invalid configurations detected in customer applications, as determined by Configuration Rules at runtime.
Constant Summary collapse
- CS__PATH =
'path'
- CS__SESSION_ID =
'sessionId'
- CS__SNIPPET =
'snippet'
Instance Method Summary collapse
-
#cs__report_finding(rule_id, user_provided_options, call_location) ⇒ Object
Build and report a finding for the given rule.
Methods included from Components::Scope::InstanceMethods
#contrast_enter_method_scopes!, #contrast_exit_method_scopes!, #with_app_scope, #with_contrast_scope, #with_deserialization_scope, #with_split_scope
Methods included from Components::Logger::InstanceMethods
Instance Method Details
#cs__report_finding(rule_id, user_provided_options, call_location) ⇒ Object
Build and report a finding for the given rule
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/contrast/utils/invalid_configuration_util.rb', line 25 def cs__report_finding rule_id, , call_location with_contrast_scope do finding = build_finding(rule_id, , call_location) return unless finding Contrast::Agent::Assess::Policy::TriggerMethod.report_finding(finding) end rescue StandardError => e logger.error('Unable to build a finding', e, rule: rule_id) end |