Class: Contrast::Agent::Reporting::InputAnalysisResult
- Defined in:
- lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb
Overview
This class will do ia analysis for our protect rules
Constant Summary collapse
- INPUT_TYPE =
Contrast::Agent::Reporting::InputType
- SCORE_LEVEL =
Contrast::Agent::Reporting::ScoreLevel
Instance Method Summary collapse
- #attack_count ⇒ Object
- #attack_count=(attack_count) ⇒ Object
-
#details ⇒ Contrast::Agent::Reporting::Details::ProtectRuleDetails?
Additional per rule details containing more specific info.
-
#details=(protect_rule_details) ⇒ Object
Additional per rule details containing more specific info.
-
#ids ⇒ Object
Matchers IDs.
-
#ids=(ids) ⇒ Object
Matchers IDs.
-
#input_type ⇒ Object
Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::InputType>].
-
#input_type=(input_type) ⇒ Object
Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::InputType>] Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::InputType>].
- #key ⇒ Object
- #key=(key) ⇒ Object
- #key_type ⇒ Object
- #key_type=(key_type) ⇒ Object
- #path ⇒ Object
- #path=(path) ⇒ Object
- #rule_id ⇒ Object
- #rule_id=(id) ⇒ Object
-
#score_level ⇒ Object
Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::ScoreLevel>].
-
#score_level=(score_level) ⇒ Object
Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::ScoreLevel>] Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::ScoreLevel>].
- #value ⇒ Object
- #value=(value) ⇒ Object
Instance Method Details
#attack_count ⇒ Object
100 101 102 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 100 def attack_count @_attack_count ||= 0 end |
#attack_count=(attack_count) ⇒ Object
Returns @_attack_count.
106 107 108 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 106 def attack_count= attack_count @_attack_count = attack_count if attack_count.is_a?(Integer) end |
#details ⇒ Contrast::Agent::Reporting::Details::ProtectRuleDetails?
Additional per rule details containing more specific info.
136 137 138 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 136 def details @_details end |
#details=(protect_rule_details) ⇒ Object
Additional per rule details containing more specific info.
127 128 129 130 131 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 127 def details= protect_rule_details return unless protect_rule_details.is_a?(Contrast::Agent::Reporting::Details::ProtectRuleDetails) @_details = protect_rule_details end |
#ids ⇒ Object
Matchers IDs
88 89 90 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 88 def ids @_ids ||= [] end |
#ids=(ids) ⇒ Object
Matchers IDs
95 96 97 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 95 def ids= ids @_ids = ids if ids.is_a?(Array) && ids.any?(String) end |
#input_type ⇒ Object
Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::InputType>]
30 31 32 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 30 def input_type @_input_type ||= INPUT_TYPE::UNKNOWN end |
#input_type=(input_type) ⇒ Object
Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::InputType>] Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::InputType>]
38 39 40 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 38 def input_type= input_type @_input_type = input_type if INPUT_TYPE.to_a.include?(input_type) end |
#key ⇒ Object
54 55 56 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 54 def key @_key ||= Contrast::Utils::ObjectShare::EMPTY_STRING end |
#key=(key) ⇒ Object
60 61 62 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 60 def key= key @_key = key if key.is_a?(String) end |
#key_type ⇒ Object
71 72 73 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 71 def key_type @_key_type ||= INPUT_TYPE::UNDEFINED_TYPE end |
#key_type=(key_type) ⇒ Object
66 67 68 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 66 def key_type= key_type @_key_type = key_type if INPUT_TYPE.to_a.include?(key_type) end |
#path ⇒ Object
43 44 45 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 43 def path @_path ||= Contrast::Utils::ObjectShare::EMPTY_STRING end |
#path=(path) ⇒ Object
49 50 51 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 49 def path= path @_path = path if path.is_a?(String) end |
#rule_id ⇒ Object
18 19 20 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 18 def rule_id @_rule_id ||= Contrast::Utils::ObjectShare::EMPTY_STRING end |
#rule_id=(id) ⇒ Object
24 25 26 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 24 def rule_id= id @_rule_id = id if id.is_a?(String) end |
#score_level ⇒ Object
Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::ScoreLevel>]
112 113 114 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 112 def score_level @_score_level ||= SCORE_LEVEL::IGNORE end |
#score_level=(score_level) ⇒ Object
Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::ScoreLevel>] Symbol<Contrast::Agent::Reporting::Settings::InputAnalysis::InputAnalysisResult::ScoreLevel>]
120 121 122 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 120 def score_level= score_level @_score_level = score_level if SCORE_LEVEL.to_a.include?(score_level) end |
#value ⇒ Object
76 77 78 |
# File 'lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb', line 76 def value @_value ||= Contrast::Utils::ObjectShare::EMPTY_STRING end |