惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
有赞技术团队
有赞技术团队
量子位
N
Netflix TechBlog - Medium
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
V2EX
IT之家
IT之家
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

Socket

Fake Corepack Site Distributes Infostealer and Proxyware to ... Large-Scale GitHub Actions Abuse Powers a Distributed cPanel... New Study Identifies 53 Slopsquatting Targets Across 5 Front... White House Launches Gold Eagle Initiative to Manage Surge i... Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Mu... Next.js moves to scheduled security releases - Socket 11 Malicious NuGet Tools Pose as Game Cheats to Drop a Windo... Compromised npm Packages in the AsyncAPI Namespace Deliver M... jscrambler npm Package Compromised in Supply Chain Attack - ... Fake Braintree NuGet Package Skims Credit Cards and Harvests... Compromised Injective SDK npm Package Exfiltrates Wallet Key... npm v12 Ships With Install Scripts Off by Default, Begins De... Malicious Go Module Exposes GitHub Malware Lure Network Span... pnpm 11.10 Hardens Registry Authentication to Block Token Re... Coordinated npm and PyPI Campaign Typosquats Popular Secure ... Node.js Considers Public Workflow for Security Reports Amid ... PolinRider: North Korea-Linked Supply Chain Campaign Expands... Risky Biz Podcast: AI Agents Are Raising the Stakes for Soft... Chrome and Firefox Extensions Posing as Free VPNs Add Clipbo... Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages - S... Rolldown Pulls Rust React Compiler Integration After Binary ... Miasma Mini Shai-Hulud Hits LeoPlatform npm Packages and Git... Frontier AI Is Now Critical Infrastructure - Socket The Code You Didn't Write Is Still Yours to Defend - Socket GitHub Actions Checkout Now Blocks Risky pull_request_target... Introducing Repository Access Permissions and Custom Roles -... Socket MCP Adds Org Alerts, Threat Feed Review, and Package ... Socket Firewall Now Blocks Malicious VS Code and Open VSX Ex... 140+ Mastra npm Packages Compromised in Coordinated Supply C... npm Package Uses Prompt Injection and Token Flooding to Disr...
RubyGems Adds Cooldown Feature to Bundler for Newly Publi...
Sarah Gooding · 2026-06-05 · via Socket

Sidebar CTA Background

Secure your dependencies with us

Socket proactively blocks malicious open source packages in your code.

Install

RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that can delay installation of newly published gem versions, bringing a time-based supply chain defense to Ruby’s package management workflow.

The feature allows developers to configure Bundler so it will not resolve to a gem version until it has been public for a set number of days. In the example published by RubyGems maintainer Hiroshi SHIBATA, a project can add a cooldown directly to its Gemfile:

source "https://rubygems.org", cooldown: 7

With that setting, Bundler skips gem versions published within the last seven days and chooses versions that fall outside the cooldown window. Cooldown is unset by default, so existing projects continue resolving to the newest eligible versions unless the setting is explicitly enabled.

The feature targets a narrow but recurring supply chain risk: the period immediately after a malicious package version is published. In many compromise scenarios, attackers rely on speed. A maintainer account is taken over, a malicious release is pushed, and automated installs or CI jobs can pick it up before maintainers, registries, or security researchers have time to respond.

How Cooldown Changes Resolution#

Cooldown does not determine whether a gem is safe. It only delays resolution to versions that are too new under the configured policy.

Time-based install delays can reduce exposure to newly published malicious versions, but they can also hold back legitimate releases, including urgent security fixes. Bundler includes an escape hatch for those cases: passing --cooldown 0 disables the delay for a run when a project needs to install the newest available version.

The feature is part of a wider movement among package managers to add install-time controls that account for the speed of modern dependency attacks. pnpm introduced minimumReleaseAge to delay dependency updates, and npm later added a similar minimumReleaseAge setting. RubyGems’ cooldown feature applies the same general idea to Bundler’s resolver.

gem.coop’s cooldown feature tested a similar idea at the registry layer. The independent RubyGems-compatible registry delayed access to newly published gems through a separate gem source. Bundler’s version takes a different route: the delay is applied by the client during dependency resolution, using timestamp metadata from RubyGems.org’s compact index.

How Bundler Applies the Filter#

Bundler’s cooldown feature depends on per-version created_at metadata now available in RubyGems.org’s v2 compact index, which Bundler uses during dependency resolution.

RubyGems did not add this data to its public API. The timestamp is available to Bundler through the compact index, not as a new public gem metadata field for general API consumers.

When Bundler has the timestamp data, it compares a gem version’s release time against the configured cooldown period and skips versions that are still inside the window. If Bundler cannot prove that a version is too new, it does not block it. Older gem servers, historical entries from before the v2 cutover, and private registries that do not expose the timestamp remain resolvable.

That conservative behavior avoids breaking sources that do not provide the new metadata, but it also means the feature depends on whether Bundler can see release timestamps for a given source.

Configuration Options#

RubyGems’ announcement describes several ways to enable cooldown. The most project-specific option is the cooldown: keyword on a source in the Gemfile. Bundler also supports project config, global config, the BUNDLE_COOLDOWN environment variable, and command-line flags for bundle install, bundle update, bundle add, and bundle outdated.

The per-source option lets teams apply different policies to different registries. For example, a project could delay new versions from RubyGems.org while allowing an internal gem server to resolve immediately:

source "https://rubygems.org", cooldown: 7

source "https://gems.internal.example.com", cooldown: 0 do
gem "internal-tool"
end

Command-line flags take precedence over configuration settings, which take precedence over per-source Gemfile settings.

Bundler 4.0.13 also makes cooldown visible in bundle outdated. When a newer version exists but is still inside the configured waiting period, Bundler annotates it with the remaining cooldown time rather than treating the project as simply up to date.

RubyGems Extends Registry Security Improvements#

Cooldown shipped alongside RubyGems 4.0.13 and Bundler 4.0.13, which also included other enhancements and fixes. In the release notes, RubyGems listed cooldown under Bundler security changes.

The feature follows other recent RubyGems.org security work, including push-time gem validation, checks against Have I Been Pwned to prevent reuse of compromised passwords, mandatory 2FA, trusted publishing, and AI-assisted vulnerability scanning for critical gems backed by Alpha Omega and Anthropic.

Those efforts address different parts of the package supply chain. Registry-side checks can help prevent or detect malicious releases. Authentication improvements make maintainer account compromise harder. Cooldown gives consumers a way to delay adoption of releases that have only just appeared.

The tradeoff is that delay-based controls are not always desirable. A newly published version may be malicious, but it may also be an urgent fix. Bundler’s implementation leaves that decision to projects by making cooldown opt-in and allowing it to be disabled for a specific run.

RubyGems’ cooldown feature brings that control to Bundler at a time when delayed installation is becoming a more common response to fast-moving package compromises. The idea is simple: many malicious releases are detected and removed within hours, while automated installs can consume them almost immediately. A short waiting period gives those detection and takedown processes more time to work before a new version enters a project’s dependency resolution.