Skip to content

Add "Protecting RubyGems.org from the outside in" post#257

Merged
colby-swandale merged 2 commits intomasterfrom
colby/protecting-rubygems-post
Apr 9, 2026
Merged

Add "Protecting RubyGems.org from the outside in" post#257
colby-swandale merged 2 commits intomasterfrom
colby/protecting-rubygems-post

Conversation

@colby-swandale
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 9, 2026 05:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new blog post describing recent RubyGems.org security hardening work, focusing on gem-push metadata validation changes and Have I Been Pwned password-compromise checks.

Changes:

  • Introduces a new post covering gem package structure and push-time validation hardening.
  • Documents the HIBP k-anonymity password checking approach used at login/registration/reset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


We've been chipping away at that. Over the past few months, we shipped two changes that tighten [rubygems.org](https://rubygems.org)'s defences at very different layers: stronger validation of gem contents at push time, and integration with Have I Been Pwned to catch compromised passwords at login.

## What [rubygems.org](https://rubygems.org) checks when you gem push
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this heading, "gem push" refers to the CLI command. Elsewhere in the blog the convention is to format commands with backticks (e.g., gem push), which also avoids reading "gem" as a verb here.

Suggested change
## What [rubygems.org](https://rubygems.org) checks when you gem push
## What [rubygems.org](https://rubygems.org) checks when you `gem push`

Copilot uses AI. Check for mistakes.
x checksums.yaml.gz
```

[rubygems.org](https://rubygems.org) closely inspects all 3 of these files when a gem is published, but the ones we're looking at are the `metadata` and `checksums.yaml`.
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tar listing above shows metadata.gz and checksums.yaml.gz, but this sentence refers to metadata and checksums.yaml. For accuracy (and to avoid confusing readers), consider referencing the actual file names (or explicitly noting the .gz wrappers).

Suggested change
[rubygems.org](https://rubygems.org) closely inspects all 3 of these files when a gem is published, but the ones we're looking at are the `metadata` and `checksums.yaml`.
[rubygems.org](https://rubygems.org) closely inspects all 3 of these files when a gem is published, but the ones we're looking at are `metadata.gz` and `checksums.yaml.gz`.

Copilot uses AI. Check for mistakes.

[rubygems.org](https://rubygems.org) closely inspects all 3 of these files when a gem is published, but the ones we're looking at are the `metadata` and `checksums.yaml`.

The `checksums.yaml` certifies the integrity hash of the `data.tar.gz` and `metadata.gz` with a sha256 after `gem build`. If someone tampers with the code directly, the checksums won't match and [rubygems.org](https://rubygems.org) rejects the push immediately. Checksums are the easy part.
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sha256" is typically written as "SHA-256" (or "SHA256") when referring to the algorithm name in prose. Consider updating the capitalization/formatting here.

Suggested change
The `checksums.yaml` certifies the integrity hash of the `data.tar.gz` and `metadata.gz` with a sha256 after `gem build`. If someone tampers with the code directly, the checksums won't match and [rubygems.org](https://rubygems.org) rejects the push immediately. Checksums are the easy part.
The `checksums.yaml` certifies the integrity hash of the `data.tar.gz` and `metadata.gz` with a SHA-256 hash after `gem build`. If someone tampers with the code directly, the checksums won't match and [rubygems.org](https://rubygems.org) rejects the push immediately. Checksums are the easy part.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@colby-swandale colby-swandale merged commit 9732868 into master Apr 9, 2026
2 checks passed
@colby-swandale colby-swandale deleted the colby/protecting-rubygems-post branch April 9, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants