bundler-audit icon indicating copy to clipboard operation
bundler-audit copied to clipboard

Feature request: Audit ruby version, when specified

Open fatkodima opened this issue 6 years ago • 6 comments

When Gemfile.lock includes ruby version, something like

RUBY VERSION
   ruby 2.7.0p-1

than verify it for vulnerabilities. If this is a valuable feature for this project, then I will send a PR.

fatkodima avatar Oct 22 '19 18:10 fatkodima

It would also be nice if something could audit rubygems which I know is not in the lock file.

jmks avatar Mar 31 '20 15:03 jmks

A few years back I wrote https://github.com/lucasluitjes/recent_ruby which does exactly that. I don't know if it meets the project standards for bundler-audit but I thought I'd mention it just in case it's helpful.

lucasluitjes avatar May 01 '21 11:05 lucasluitjes

@postmodern @reedloden Before I will invest some time into this feature, is this something that will be merged?

fatkodima avatar Jan 01 '22 16:01 fatkodima

@fatkodima I would be interested in something like this, not sure if @postmodern would agree.

@lucasluitjes Does recent_ruby include a feature to list known CVEs for the Ruby version you are using?

It would be useful to know that if you are using Ruby 2.7.x, then you have this known CVE to worry about: https://www.ruby-lang.org/en/news/2023/03/30/redos-in-time-cve-2023-28756/

etagwerker avatar Feb 27 '24 15:02 etagwerker

@etagwerker No, recent_ruby only checks if the build file for that ruby version in the ruby-build repository contains warn_eol (for example https://github.com/rbenv/ruby-build/blob/master/share/ruby-build/2.7.7), and that you're on the latest patch release.

Listing CVEs would be handy feature though. Not sure where to reliably pull that data from. I looked at https://github.com/rubysec/ruby-advisory-db/tree/master/rubies/ruby but it doesn't seem up to date (CVE-2023-28756 isn't in there, for example). If you know a good data source, feel free to make an issue on the https://github.com/lucasluitjes/recent_ruby repository.

lucasluitjes avatar Feb 27 '24 17:02 lucasluitjes

Apparently bundler 2.4 now requires that the RUBY VERSION versions be listed if the Gemfile contains a ruby '...' declaration. https://devcenter.heroku.com/changelog-items/2809

Although, I'm still not 100% certain that the ruby version in the Gemfile.lock will always match the actual ruby version that's used in production?

postmodern avatar Feb 29 '24 03:02 postmodern