Class: Contrast::Agent::Protect::Rule::CmdiDangerousPath
- Inherits:
-
CmdiBaseRule
- Object
- Base
- CmdiBaseRule
- Contrast::Agent::Protect::Rule::CmdiDangerousPath
- Defined in:
- lib/contrast/agent/protect/rule/cmdi/cmdi_dangerous_path.rb
Overview
The Ruby implementation of the Protect Command Injection Semantic Dangerous Path sub-rule. This rule should report
Constant Summary collapse
- NAME =
'cmd-injection-semantic-dangerous-paths'
Constants inherited from CmdiBaseRule
Contrast::Agent::Protect::Rule::CmdiBaseRule::APPLICABLE_USER_INPUTS, Contrast::Agent::Protect::Rule::CmdiBaseRule::CHAINED_COMMAND_CHARS
Constants included from Reporting::InputType
Reporting::InputType::BODY, Reporting::InputType::COOKIE_NAME, Reporting::InputType::COOKIE_VALUE, Reporting::InputType::DWR_VALUE, Reporting::InputType::HEADER, Reporting::InputType::JSON_ARRAYED_VALUE, Reporting::InputType::JSON_VALUE, Reporting::InputType::METHOD, Reporting::InputType::MULTIPART_CONTENT_TYPE, Reporting::InputType::MULTIPART_FIELD_NAME, Reporting::InputType::MULTIPART_NAME, Reporting::InputType::MULTIPART_VALUE, Reporting::InputType::PARAMETER_NAME, Reporting::InputType::PARAMETER_VALUE, Reporting::InputType::QUERYSTRING, Reporting::InputType::REQUEST, Reporting::InputType::SOCKET, Reporting::InputType::UNDEFINED_TYPE, Reporting::InputType::UNKNOWN, Reporting::InputType::URI, Reporting::InputType::URL_PARAMETER, Reporting::InputType::XML_VALUE
Constants inherited from Base
Base::BLOCKING_MODES, Base::RULE_NAME, Base::STACK_COLLECTION_RESULTS, Base::SUSPICIOUS_REPORTING_RULES
Constants included from Filters
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from CmdiBaseRule
#build_attack_with_match, #classification, #infilter
Methods included from Reporting::InputType
Methods included from Components::Logger::InstanceMethods
Methods inherited from Base
#append_to_activity, #block_message, #cef_logging, #classification, #classify, #enabled?, #excluded?, #initialize, #stream_safe?, #update
Methods included from Filters
#infilter, #postfilter, #postfilter?, #prefilter, #prefilter?
Methods included from Builders
#build_attack_result, #build_attack_with_match, #build_attack_without_match, #build_base_sample, #build_sample, #build_violation
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
Constructor Details
This class inherits a constructor from Contrast::Agent::Protect::Rule::Base
Instance Method Details
#infilter?(path) ⇒ Boolean
27 28 29 30 31 32 |
# File 'lib/contrast/agent/protect/rule/cmdi/cmdi_dangerous_path.rb', line 27 def infilter? path return unless enabled? return unless dangerous_path?(path) true end |
#rule_name ⇒ Object
18 19 20 |
# File 'lib/contrast/agent/protect/rule/cmdi/cmdi_dangerous_path.rb', line 18 def rule_name NAME end |
#sub_rules ⇒ Object
22 23 24 |
# File 'lib/contrast/agent/protect/rule/cmdi/cmdi_dangerous_path.rb', line 22 def sub_rules Contrast::Utils::ObjectShare::EMPTY_ARRAY end |