Replies: 6 comments 22 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.
-
|
Just adding my strong support for introducing a cooldown feature here. Much of the ongoing debate seems to centre on the premise that cooldowns or grace periods aren't a silver bullet. From a risk management perspective, very few individual controls are perfectly effective. However, when deployed as part of a defence-in-depth strategy, they provide a meaningful improvement to the overall security posture. Cooldowns have empirically prevented supply chain breaches in the past; in that regard, they are an effective control. I agree they aren't the only solution, but the balance of implementation effort versus security effectiveness is compelling. The referenced article raises some valid concerns, but I have a few thoughts on those points. First, regarding the idea that if everyone implements a cooldown it becomes less effective: this assumes uniform implementation. In reality, organisations have varying risk tolerances and will adopt different cooldown windows. More importantly, forcing an attacker to wait increases their dwell time. The longer a malicious payload sits, the broader the window for the community, security researchers, and automated tools to discover it before it is widely deployed. Second, on the risk of delaying legitimate security updates: while true, there are standard mitigating controls for this. When CVEs are published, they can be scanned for and risk-assessed. Automated tools like Dependabot, for example, can bypass the cooldown period to raise an immediate PR for a critical security fix. Securing the software supply chain requires a collective industry effort across prevention, detection, and recovery. It's a massive undertaking, and unfortunately, requiring MFA for maintainers won't completely resolve the issue of compromised dependencies on its own. Adding a cooldown feature is a pragmatic, high-value addition to our collective defence toolkit. |
Beta Was this translation helpful? Give feedback.
-
|
I've drafted an initial design proposal for the cooldown feature. Feedback is welcome. Design: Cooldown option for RubyGems and Bundler (v2)ConfigurationSetting name and unit
Cooldown applies uniformly to all gems within a source — per-gem granularity (e.g., Per-source configuration in GemfileCooldown is specified per source in the Gemfile. This allows private registries to be excluded from cooldown naturally: Sources without a Precedence (highest to lowest)
For Since CLI flag takes the highest precedence, urgent updates (e.g., CVE fixes) can bypass cooldown with Behavior
Versions within the cooldown period are excluded from the candidate set during version resolution — they are treated as if they do not exist. If no candidates satisfy cooldown, resolution fails with an error. Versions already recorded in
|
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