---
title: "Finding Relationships Between Ruby’s Top 100 Packages and Their Dependencies"
description: "RubyGems' MFA requirement for gems over 180M downloads leaves a loophole: some big gems depend on small gems below the threshold, so compromising a small gem's owner account reaches big gems' users."
url: "https://swe.quest/articles/finding-relationships-between-ruby-s-top-100-packages-and-their-dependencies-e53722c1985f09a2"
canonical: "https://shopify.engineering/relationships-between-ruby-top-100-packages-dependencies"
source: "Shopify Engineering"
published: "2022-10-19"
difficulty: "medium"
kind: "Research"
reading_minutes: 9
tags: ["supply-chain-security","ruby","identity-auth","algorithms"]
---

# Finding Relationships Between Ruby’s Top 100 Packages and Their Dependencies

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2022-10-19, 9 min read, Research. Original: [https://shopify.engineering/relationships-between-ruby-top-100-packages-dependencies](https://shopify.engineering/relationships-between-ruby-top-100-packages-dependencies)

## Summary

RubyGems' MFA requirement for gems over 180M downloads leaves a loophole: some big gems depend on small gems below the threshold, so compromising a small gem's owner account reaches big gems' users. Querying rubygems.org data dumps found 112 big gems; the rubygems.org API showed 13 with small direct dependencies, and resolving full transitive trees via programmatic \`bundle lock\` raised that to 24. Small dependencies exist mainly because they are newer than their parents or ship with Ruby by default (e.g. racc, rexml). A dependency graph built with the graph gem and a custom DFS that enumerates all paths show how each big gem reaches each small one, and the proposed responses are waiting for universal MFA or enforcing MFA early on those specific gems.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Supply chain security](https://swe.quest/tags/supply-chain-security.md) (Security)
- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)

## Prerequisites

- Ruby and Bundler basics ([easy posts on Ruby](https://swe.quest/tags/ruby.md?difficulty=easy))
- package dependency trees
- graph traversal (BFS/DFS)

## Keywords

RubyGems, Bundler, Gemfile.lock, multi-factor authentication, graph gem, racc, nokogiri

## Related posts

- [How We Fixed the Dependency Confusion Vulnerability in Over 600 Ruby Applications](https://swe.quest/articles/how-we-fixed-the-dependency-confusion-vulnerability-in-over-600-ruby-14f9a0a0836510b2.md): Shopify Engineering · 2022-01-27 · Medium · 9 min read · Supply chain security, Ruby, Refactoring & migrations, CI/CD
  Shopify closed a dependency confusion hole across roughly 600 Ruby applications by migrating each \`Gemfile.lock\` to Bundler's newer format, which pins every gem to an explicit source.
- [Your Dependencies Don’t Care About Your FIPS Configuration](https://swe.quest/articles/your-dependencies-don-t-care-about-your-fips-configuration-c719fbf5e05d7dd0.md): Docker · 2026-01-22 · Medium · 5 min read · Supply chain security, Cryptography, Containers, Ruby
  FIPS-enabled container images can still run non-FIPS crypto because prebuilt native dependencies bring their own crypto linkage.
- [Ruby2Shell (CVE-2026-132825): find vulnerable Ruby across your repos](https://swe.quest/articles/ruby2shell-cve-2026-132825-find-vulnerable-ruby-across-your-repos-943808a4d97a4f48.md): Sourcegraph · 2026-11-20 · Medium · 5 min read · Ruby, Vulnerability research, Supply chain security, Developer tools
  Ruby2Shell (CVE-2026-132825) is a critical heap overflow in Ruby's string case conversion that researchers say default Rails and classic Sinatra apps expose without authentication, with remote code execution proofs of concept known.
- [How Software Bill of Materials change the dependency game](https://swe.quest/articles/how-software-bill-of-materials-change-the-dependency-game-78d74981c640e90b.md): Zalando Engineering · 2023-04-12 · Medium · 5 min read · Supply chain security, Microservices, Build systems, Analytics & OLAP
  Zalando generates a Software Bill of Materials from the container image of every deployed application and publishes the dependency data to its data lake, so any engineer can query which apps use a library version, which licenses are in use, and how fast upgrades are adopted.
- [How GitHub uses CodeQL to secure GitHub](https://swe.quest/articles/how-github-uses-codeql-to-secure-github-3ead357c38ddce28.md): GitHub Engineering · 2025-02-12 · Medium · 14 min read · Static analysis, Application security, Ruby, CI/CD
  GitHub's Product Security Engineering team runs CodeQL across more than 10,000 repositories, mostly with default setup and the security-extended suites.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
