-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe create a gem? #2
Comments
@douglascamata yes, that's my initial idea. Leaving this issue open until I create a gem. |
@sergey-alekseev remember to update here when you start the gem, I want to contribute 👍 |
bonus points if your gem checking for leaky gems itself leaks memory 😛 |
@somazx it can be a hidden feature, like an easter egg, lol |
How about adding as advisory to bundler-audit then it can live with all the other gems and we do not need different mechanisms |
@grosser it's a nice idea! But I also would love to see it working without bundler too, if possible. And I think it is better if I need only 1 line of code in the main file of my project to activate the verification at require-time than a command that I need to run. |
How would you know what gem version is used if not for a Gemfile.lock ... so you need bundler ... |
@grosser dunno how I would check that without bundler yet, but it might be possible somehow :P |
|
That does not mean that your app is actually using that version of the gem I'd prefer something simple/useful/integrated instead of On Wed, Oct 21, 2015 at 2:09 PM, Douglas Camata [email protected]
|
@grosser this is the actual version of the gem that was loaded by the I don't like |
If you don't use bundler then a require will load a random version of the Same can be done by making bundler-audit requirable, which adds the feature (FYI checking on require will wastes startup time, adds another dependency On Wed, Oct 21, 2015 at 3:23 PM, Douglas Camata [email protected]
|
@grosser I don't see the issue of random version of the gem picked if you don't use bundler as part of the gem's problem. This gem responsibility would be just check if the loaded gem version leaks memory, it doesn't matter how the gem got there. But talking real, everyone uses bundler, so the correct version of the gem will be loaded and verified. I also think a little startup time wasted in development/test is a fair price to pay for automatically checking these things that can give a big headache in production. Adding to CI is nice, but what if you don't have CI for whatever the reason? Anyway, let's see what bundler-audit guys says about your question. And just to make it clear, I really liked your suggestion about bundler-audit integration and IMHO we should do both ideas. |
|
Thanks @douglascamata and @grosser for your considerations. I'm open to all 3 options @grosser mentioned in rubysec/bundler-audit#116 (comment). An integration with bundler-audit would be nice. |
Hey, Thanks for the effort everybody. The ruby-advisory-db is mostly about classes of bugs that are can be abused maliciously. What exactly constitutes a "vulnerability" is a bit of a philosophical point but @grosser you were correct in suspecting that many of them could belong in the advisory-db 😃. We do impose a bit of a hurdle in that we aggregate advisories that have been published or somewhat vetted elsewhere, i.e. the requirement that notices contain a CVE or osvdb. For the most part, a lot of these memory bugs could very well be applicable. For your purposes, I would suggest adopting the ruby-advisory-db schema (minus the CVE/OSVDB requirement) and then forking bundler-audit to slurp down that database instead. The above analysis regarding depending on bundler is correct - runtime checks are annoying to implement properly :). |
@phillmv thanks for your input on this. Let me confirm you recommend the 3rd option @grosser mentioned in rubysec/bundler-audit#116 (comment):
|
Something that just changes the url would be great ... maintaining a fork is not fun :) |
What about we submit a patch do rubysec/bundler-audit with support to using multiple/another databases and, of course, use ruby-advisory-db as default? Or maybe command-line option to check for memory leaks instead of bug can be abused maliciously? |
Closed by https://github.com/rubymem/bundler-leak. 🎉 |
@sergey-alekseev thank you! for creating the leaky-gems db! Credit should also be given to @etagwerker and @fastruby who helped bring it to life! |
FYI asking if bundler-audit is willing to include the db as a optional check rubysec/bundler-audit#223 |
Do you think it is possible to create a gem to automatically check if you have a "leaky gem" installed?
I know that if you have a Gemfile it would be pretty easy to implement a command to check this. If you use Rails creating an initializer to do the same thing is also easy. But is it possible to check gem versions at "require" time?
The text was updated successfully, but these errors were encountered: