Class: SemgrepWebApp::AutotriageVerdict2
- Inherits:
-
Object
- Object
- SemgrepWebApp::AutotriageVerdict2
- Defined in:
- lib/semgrep_web_app/models/autotriage_verdict2.rb
Overview
Which autotriage verdict do you want to include? If not specified, includes
all. This filter is applicable when issue_type is sast or unspecified.
Valid values: true_positive, false_positive
Constant Summary collapse
- AUTOTRIAGE_VERDICT2 =
[ # TODO: Write general description for TRUE_POSITIVE TRUE_POSITIVE = 'true_positive'.freeze, # TODO: Write general description for FALSE_POSITIVE FALSE_POSITIVE = 'false_positive'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = TRUE_POSITIVE) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/semgrep_web_app/models/autotriage_verdict2.rb', line 25 def self.from_value(value, default_value = TRUE_POSITIVE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'true_positive' then TRUE_POSITIVE when 'false_positive' then FALSE_POSITIVE else default_value end end |
.validate(value) ⇒ Object
19 20 21 22 23 |
# File 'lib/semgrep_web_app/models/autotriage_verdict2.rb', line 19 def self.validate(value) return false if value.nil? AUTOTRIAGE_VERDICT2.include?(value) end |