Module: Dependabot::UpdateCheckers::VersionFilters

Defined in:
lib/dependabot/update_checkers/version_filters.rb

Class Method Summary collapse

Class Method Details

.filter_vulnerable_versions(versions_array, security_advisories) ⇒ Object


6
7
8
9
10
11
12
13
14
15
16
# File 'lib/dependabot/update_checkers/version_filters.rb', line 6

def self.filter_vulnerable_versions(versions_array, security_advisories)
  versions_array.reject do |v|
    security_advisories.any? do |a|
      if v.is_a?(Gem::Version)
        a.vulnerable?(v)
      else
        a.vulnerable?(v.fetch(:version))
      end
    end
  end
end