Skip to content

Instantly share code, notes, and snippets.

@rentalcustard
Created January 31, 2013 10:19
Show Gist options
  • Save rentalcustard/4681932 to your computer and use it in GitHub Desktop.
Save rentalcustard/4681932 to your computer and use it in GitHub Desktop.
Check your Gemfile.lock for unverified Rubygems
#unverified.list obtained from https://gist.github.com/raw/865b05630be54544ca72/a1a0c114d5eab0e65efccc941ca013fd06e6f43c/unverified.list
File.readlines("unverified.list").map do |line|
line.split.last.gsub("./", "").gsub(/-(\d+).*/, "")
end.sort.uniq.each do |gem|
in_gemfile_lock = system "grep -q #{gem} Gemfile.lock"
puts "Unsafe #{gem}" if in_gemfile_lock
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment