Module: Dependabot::UpdateCheckers::VersionFilters

Extended by:
T::Sig
Defined in:
lib/dependabot/update_checkers/version_filters.rb

Class Method Summary collapse

Class Method Details

.filter_vulnerable_versions(versions_array, security_advisories) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/dependabot/update_checkers/version_filters.rb', line 28

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