Cooldown Support for Ruby Bundler

(blog.rubygems.org)

93 points | by calyhre 2 days ago

3 comments

  • swader999 2 hours ago
    Aren't we back to the drawing board once everyone uses this?
    • grncdr 2 hours ago
      I think the idea is that dedicated security firms and/or automated scanners will discover exploits in the cooldown period.
      • woodruffw 38 minutes ago
        Yep, this is the thesis behind them. I wish people engaged more fully with this argument: it’s possible to believe that security vendors won’t do a good job of upholding their side of the bargain, but I’ve yet to see anybody argue that rather than making a faulty universalization argument against cooldowns.
    • password4321 2 hours ago
      The point is to allow the automated scanners a chance to run.

      Every security company and their cousin wants to be the one to find the next big dependency malware.

    • ihumanable 2 hours ago
      Yea, all the new advice around using dependency cooldowns only works if _someone_ is installing these things before you and finding the vulnerabilities.

      It seems like the advice right now is to become a freerider while there are still people installing closer to release that will do free work for you finding out there's something nasty in the release.

      Once everyone is waiting 2 weeks to install an update, then the value of everyone waiting goes down dramatically.

      • postalcoder 55 minutes ago
        Using dependency cooldowns is not a free-rider problem. There's a real tradeoff here – ppl are trading their time preference for security.

        Just as users are incentivized to avoid malware, researchers and attackers are equally motivated to be the first to discover it.

        The concern trolling around widespread dependency cooldowns doesn't make sense. Most people shouldn't be eager to download a release that hasn't made its way through at least some scans.

      • kbenson 2 hours ago
        This is how a chunk of people function anyway. There are plenty of people that choose to not install "point zero" release for software of a certain importance, assuming with any major changes there are often bugs that come along with it.

        In this case, since the number of cool down days is configurable, even if everyone was using it we would still likely see a somewhat smooth curve for adoption, since not everyone will choose the same delay and the delay time will likely map closely to how people want to habdke risk.

        It's all a trade off, just like it's always been. This just makes it simpler to act on what you want your risk/comfort level to be.

    • raesene9 1 hour ago
      not really, there are a number of security companies doing analysis of any new packages looking for supply chain attacks, so if you wait a couple of days, till their analysis is complete, you're reducing the risk of hitting a compromised package.
    • teeray 2 hours ago
      It basically devolves into a Volunteer’s Dilemma. There’s no incentive here to be the guinea pig, so nobody will want to be.
      • embedding-shape 38 minutes ago
        > It basically devolves into a Volunteer’s Dilemma. There’s no incentive here to be the guinea pig, so nobody will want to be.

        Except there is lots to gain from being the first to write about the new malware on some registry, so companies are actively downloading and inspecting literally every package.

        Back in the day (maybe 6-7 years ago?) you could detect this by uploading a new npm package that hit back some endpoint in your control, and it was almost guaranteed that this endpoint got a request within a minute of publishing a new package or update to existing one with users. Nowadays I think none of the scanners actually run the code, mostly static-analysis, and I dunno how often the npm download counter updates per day, probably harder to see in real-time.

        • teeray 13 minutes ago
          > Except there is lots to gain from being the first to write about the new malware on some registry

          Show me the company writing to their customers “we intentionally decided to ship code with potentially novel vulnerabilities. One of those vulnerabilities caused disclosure of your data, but cheer up! We have this cool security blog post about it now.” Meanwhile their competitors freeride and their customers’ data is safe.

  • delichon 3 hours ago
    > A version whose source does not expose created_at, such as older gem servers, historical entries from before the v2 cutover, or private registries still on the v1 format, is treated as outside the window and stays resolvable.

    How is that not an easy exploit to circumvent the cooldown?

    • werdnapk 2 hours ago
      Most gems in Ruby/Rails projects come from rubygems, so if they were published long ago, any exploits should have already been found hopefully. Any old gems that would attempt to release a new compromised version would now get a created_at timestamp and the cooldown applies.

      Unless you can compromise the gem server to overwrite created_at fields, I don't see any exploits here.

      Private gem servers are either already trusted (if they're your own) or already under some scrutiny and extra care already being taken (ideally), but this last case applies to very few projects I'm sure.

    • OptionOfT 2 hours ago
      Can you in your own gem depend on gems from another server? Or does it need to be configured on the client?

      If not, and the current defacto standard gem server doesn't accept v1 anymore, we're good I suppose?

  • doctorpangloss 1 hour ago
    you have 1.0 installed. you enable 7 day cooldowns. an exploit is discovered in 1.0, and 1.1 is immediately released to fix the exploit. do you sit on 1.0 for 7 days?
    • trevor-e 1 hour ago
      it specifically addresses this in the "The escape hatch" section...
    • esafak 19 minutes ago
      Security updates bypass the cooldown.