Sha256: 5c31c0d5777a7ed3ce9fcff826ef1c6dc0bde28b1125f92b66dbc971008f204e

Contents?: true

Size: 479 Bytes

Versions: 54

Compression:

Stored size: 479 Bytes

Contents

module CMSScanner
  module Finders
    # Findings container
    class Findings < Array
      # Override to include the confirmed_by logic
      #
      # @param [ Finding ] finding
      def <<(finding)
        return self unless finding

        each do |found|
          next unless found == finding

          found.confirmed_by << finding
          found.confidence += finding.confidence

          return self
        end

        super(finding)
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
cms_scanner-0.0.38.4 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.38.3 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.38.2 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.38.1 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.38.0 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.12 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.11 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.10 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.9 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.8 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.7 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.6 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.5 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.4 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.3 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.2 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37.1 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.37 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.36 lib/cms_scanner/finders/findings.rb
cms_scanner-0.0.35.1 lib/cms_scanner/finders/findings.rb