Replies: 4 comments 3 replies
-
👋 I'm positive to add this proposal to rubygems and bundler. I think it should be in the settings rather than options like pnpm, what do you think? FYI: https://docs.renovatebot.com/key-concepts/minimum-release-age/ |
Beta Was this translation helpful? Give feedback.
-
|
I wrote the current my thought for "cooldown" feature: https://dev.to/hsbt/should-rubygemsbundler-have-a-cooldown-feature-40cp |
Beta Was this translation helpful? Give feedback.
-
|
Respectfully, I think cooldowns are beside the point. The real problem isn't the frequency of gem releases — frequent updates are actually a good thing, since they often carry important bug fixes. The real problem is account takeovers and unauthorized releases. 2FA on release/upload or Trusted Publishing already exist, and directly prevent the attack itself, rather than just limiting the damage. A more effective solution would be to enforce 2FA at the moment of publishing — for example, requiring a second factor when running Beyond that, 2FA should be mandatory for all RubyGems accounts, not just top gems. The typosquatting attacks mentioned in this article targeted obscure gems precisely because they're less protected — so the long tail is where enforcement matters most. an additional angle might be to try to scan new gems as soon as they’re uploaded — but a mandatory delay, whether in Bundler or on the server, would do more harm than good. Opt-in cooldowns are a workaround for a policy gap — if RubyGems enforced 2FA or Trusted Publishing for all gems, new malicious pushes would be blocked at the source. Combined with ongoing scanning to clear out existing bad gems, cooldowns would eventually become unnecessary. What would it take for RubyGems to make 2FA or Trusted Publishing mandatory for all gem publishers? |
Beta Was this translation helpful? Give feedback.
-
|
Building on the article's comment about how the actual value is allowing time for gems to be scanned, I'm wondering if a different mechanism than passage of time would be better. What if security firms and researchers could sign a release as vetted? The mechanism would allow anyone to sign a release as vetted: another developer or a security company can sign the release after they've done their checks (automated or manual). Everyone else can declare who's signatures they want to wait for before installing. A lot of people might opt to wait for Maicej's Diffend signature before installing. Others might decide they trust their circle of developers they personally know and if any of them sign it, they will proceed to install. Basically, the idea would be to shift from: "Wait a week and hope that someone will check it.". We might have a small default list of security signers vetted by the RubyGems team so everyone has a core list to start with. If someone wants faster checks, they can add their own trusted sources to their personal list. A large company might use their own security team. Once their signing directly on RubyGems for their own benefit, anyone else can decide to also add them to their trusted list. It might even provide a beneficial incentive to security firms to dedicate resources to becoming a well known source of security signatures, as a marketing avenue for their primary services. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@woodruffw’s “We should all be using dependency cooldowns” makes a good case that supporting a cooldown (a window of time between when a dependency is published and when it’s considered suitable for use) when updating dependencies is an effective way to mitigate common supply chain attacks.
npm-check-update supports this natively via its
cooldownoption, pnpm via itsminimumReleaseAge, and Dependabot viacooldown.Could Bundler support this directly itself when calling the likes of
bundle updateandbundle outdated?At the moment, it seems Dependabot separately queries the RubyGems (and private registries’) API to determine the release date for each gem version so I assume this isn’t already readily available via a CLI command.
Beta Was this translation helpful? Give feedback.
All reactions