Hello! Welcome to the May newsletter. Read on for announcements from Ruby Central and a report of the OSS work we’ve done from the previous month.

In April, Ruby Central's open-source work was supported by Ruby Shield sponsor Shopify, AWS, the German Sovereign Tech Fund (STF), and Ruby Central memberships from 29 other companies, including Partner-level member Contributed Systems, the company behind Mike Perham’s Sidekiq. In total, we were supported by 187 members. Thanks to all of our members for making everything that we do possible. <3

Ruby Central News

Thank you to everyone who attended RailsConf Detroit!

Nadia Odunayo, Founder & CEO at The StoryGraph, delivering the opening keynote for RailsConf 2024. Photo by Alice Heart Photography.

Keep up with Ruby Central’s AWS Software Engineer in Residence

  • Samuel Giddins, RubyGems.org lead Security Engineer and our Software Engineer in Residence, has been sharing the highs, lows, and progress updates of his security work on his blog. Last month his development work included:
    • Spending a significant amount of time investigating the impact of the xz/liblzma backdoor on the RubyGems ecosystem, and publishing a blog post on his findings. The rubygems-research tool proved invaluable in efficiently analyzing the spread of the vulnerable library within RubyGems. Spoiler: RubyGems was not vulnerable to the backdoor!
    • Patching various Denial of Service (DoS) vulnerabilities related to YAML aliases and uploaded gem metadata size in RubyGems.org, improving the platform by re-introducing avatars with privacy considerations (more on this below), and documenting the compact index API for package repositories.
  • You can learn more and follow along here. Thank you to AWS for supporting this work!

We’re revamping our Ruby Central Membership Program!

  • If you’re reading this in your email inbox, you should have already received this news. If not, check out this announcement to learn about all of the exciting new ways we’ll be engaging with our members and how you can get involved.

Upcoming Conferences:

Get Involved:

  • If you'd like to get involved and help make our community and events even better, we'd love to have you join us! Check out our volunteer page, and/or feel free to shoot an email to our executive director, Adarsh, to find the best way to get plugged in.
  • Want to promote your company at RubyConf in 2024? Secure your sponsorship now to reach all our attendees, showcase your thought leadership, and cultivate invaluable industry relationships by emailing our wonderful sponsorships manager, Tom.
  • Remember, you can receive exclusive benefits like conference discounts and more by signing up for a Ruby Central membership. Check to see if your employer matches donations to Ruby Central, Inc. through Benevity and double your support!

RubyGems News

In April, we released RubyGems 3.5.8 and 3.5.9, and Bundler 2.5.8 and 2.5.9. These releases bring a series of enhancements and bug fixes designed to improve the overall developer experience with RubyGems, including: a security improvement that adheres to global umask settings when writing files, a fix for the [NoMethodError crash linked to issues with corrupt package files](https://github.com/rubygems/rubygems/pull/7539), and a resolution for an error message problem in the resolver when it runs out of versions due to the use of --strict --patch filters.

Some other important accomplishments from the team this month include:

Avoiding Writing Credentials to Lockfiles the Default

  • In an effort to enhance security and prevent users from accidentally sharing credentials publicly, we recommend that you do not embed credentials in lockfiles.
  • This practice was already uncommon, except in instances where users included credentials directly in their Gemfile—a method we do not recommend. Instead, it's advisable to utilize settings.
  • Despite some users opting to use an ENV variable, we consistently ensure that credentials are not stored in the lockfile but are sourced either from the configuration or directly from the Gemfile.

Making bundle update specific_gems Smarter

  • For years, reports have indicated that bundle update gem does not consistently update the gem to its latest available version. Users find that if they delete their lockfile, specify the desired version in the Gemfile, or run bundle install, the gem updates as expected. Ideally, such steps shouldn't be necessary for updating a gem—bundle update gem should suffice.
  • This is also why dependency bots like Dependabot sometimes fail to create PRs to address security alerts. The challenge is that upgrading one gem may require upgrading others to prevent version conflicts. bundle update gem currently lacks the capability to handle this complexity.
  • To address this, I implemented a fix where a full bundle update is first executed to determine the latest resolvable versions, followed by a targeted update that forces these versions, allowing the resolver to manage any conflicts by unlocking conflicting dependencies.

Resolving Musl Platform Issues for RubyGems and Bundler

  • Since introducing support for the musl platform, there's been different issues and regressions with it, leading to hesitancy among gem authors about releasing musl variants. The maintainer of Nokogiri has been actively identifying these issues, including a critical problem he believes to be the last barrier to fully supporting musl precompiled gems. Addressing this issue seemed necessary.
  • The non-transitivity of Gem::Platform#=== with musl was causing missing platforms in the lockfile, leading to resolution errors. The issue has been resolved by specifically accommodating the unique aspects of musl when removing invalid platforms from the lockfile.

In April, RubyGems gained 106 new commits contributed by 13 authors. There were 1,175 additions and 797 deletions across 106 files.

RubyGems.org News

The updates made this month to RubyGems.org reflect a strong commitment to improving user experience, enhancing security, and modernizing the platform. Sponsored hosting for RubyGems.org in April was provided by AWSFastly, and DataDog.

The following are highlights of what the team worked on this month:

Re-introducing Avatars to RubyGems.org

  • Originally, profile images were removed from RubyGems.org due to privacy concerns, as Gravatar's system exposed user emails, leading to complaints. This change, however, made the site appear anonymous, diminishing the perceived trustworthiness of gem info pages.
  • To address this issue, @segiddins has developed a solution that allows images to be safely displayed without compromising privacy. This new method proxies images through RubyGems.org, maintaining user privacy while enhancing the visual appeal and trust of the platform.

Adding RubyGems Yank Limits

  • To reduce the likelihood of disruption caused by a left-pad-like package removal, we've introduced limits on deleting old or highly downloaded gems.
  • Gem deletions are primarily for immediate fixes of newly released gems where reverting is the best solution. For other issues, the recommended approach is to release a new version.
  • We've set a provisional limit on gems that can be yanked. This policy affects gems with over 100,000 downloads or those older than 30 days, aligning more closely with other ecosystems that restrict deletions.
  • We will adjust the policy based on feedback and continue to coordinate yank requests through RubyGems staff, balancing the needs of maintainers and the wider community.

An Upgraded Search System from OpenSearch v1 to v2

  • The upgrade from OpenSearch v1 to v2 allows us to benefit from new updates, features, and enhancements.
  • Additionally, the introduction of High Availability ensures that our search functionality will remain operational even if an AWS Availability Zone(Data Center) goes offline, providing a robust and resilient service.

Collaborated with Shopify on a JIT performance-focused Protobuf implementation

  • Earlier this year we began writing a pure Ruby protobuf implementation which is fully compliant. It was completed last month. We are coordinating our effort with Shopify, who are already at work on an implementation of protobuf that has different goals.

In April, RubyGems.org gained 82 new commits contributed by 10 authors. There were 1,111 additions and 761 deletions across 150 files.

Total spent

In April we spent $78,729.06 on development work.

Thank you

Thank you to all the contributors of RubyGems and RubyGems.org for this month! Your contributions are greatly appreciated, and we are grateful for your support.

Contributors to RubyGems:

Contributors to RubyGems.org:

If we missed you, please let us know so we can include you in our shout out!