lib/mihari/structs/rule.rb in mihari-5.2.1 vs lib/mihari/structs/rule.rb in mihari-5.2.2
- old
+ new
@@ -8,10 +8,12 @@
require "yaml"
module Mihari
module Structs
class Rule
+ include Mixins::FalsePositive
+
# @return [Hash]
attr_reader :data
# @return [Array, nil]
attr_reader :errors
@@ -107,13 +109,13 @@
def tags
@tags ||= data[:tags]
end
#
- # @return [Array<String>]
+ # @return [Array<String, RegExp>]
#
def falsepositives
- @falsepositives ||= data[:falsepositives]
+ @falsepositives ||= data[:falsepositives].map { |fp| normalize_falsepositive fp }
end
#
# @return [Array<Hash>]
#