From 9deb2d01807aa6e52d8e4da5317470f01f2b763e Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 17 Nov 2026 22:54:20 +0000 Subject: [PATCH 1/8] Require maxmind-db 1.5.0 maxmind-db 1.5.0 limits the resources a crafted database can make the decoder use, rejects pointers to pointers, and speeds up lookups. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 12 ++++++++++++ Gemfile.lock | 2 +- maxmind-geoip2.gemspec | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f9ddc5..9dadf5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 1.7.0 + +* The minimum version of the `maxmind-db` gem is now 1.5.0. This version + limits the work and memory of each record decode and of the metadata decode + when a database is opened: 65,536 decoded values, 512 levels of nesting, and + 2 MiB of string, bytes, and integer payload. Opening a database or looking up + an IP address raises `MaxMind::DB::InvalidDatabaseError` if a decode exceeds + a limit. It also rejects pointers that target pointers, and it makes lookups + faster. MaxMind databases are well within the limits, but a custom database + that worked before may now fail. See the + [maxmind-db 1.5.0 changelog](https://github.com/maxmind/MaxMind-DB-Reader-ruby/blob/v1.5.0/CHANGELOG.md). + ## 1.6.0 (2026-07-16) * A new `residential` object has been added to the `anonymizer` object on diff --git a/Gemfile.lock b/Gemfile.lock index 851c0d9..e4ce68f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ PATH maxmind-geoip2 (1.6.0) connection_pool (>= 2.2, < 4.0) http (>= 4.3, < 7.0) - maxmind-db (~> 1.4) + maxmind-db (~> 1.5) GEM remote: https://rubygems.org/ diff --git a/maxmind-geoip2.gemspec b/maxmind-geoip2.gemspec index 42be6ca..d0efcc4 100644 --- a/maxmind-geoip2.gemspec +++ b/maxmind-geoip2.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |s| s.add_dependency 'connection_pool', '>= 2.2', '< 4.0' s.add_dependency 'http', '>= 4.3', '< 7.0' - s.add_dependency 'maxmind-db', ['~> 1.4'] + s.add_dependency 'maxmind-db', ['~> 1.5'] s.add_development_dependency 'minitest' s.add_development_dependency 'rake' From aaa9be3f625ea50b2a7b6fc8172a44f716abe884 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 17 Nov 2026 22:54:46 +0000 Subject: [PATCH 2/8] Set the 1.7.0 release date Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dadf5f..ede28d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 1.7.0 +## 1.7.0 (2026-11-17) * The minimum version of the `maxmind-db` gem is now 1.5.0. This version limits the work and memory of each record decode and of the metadata decode From a571a4972b88f74bedeb09e64efeceac70996cf8 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 17 Nov 2026 23:11:08 +0000 Subject: [PATCH 3/8] Update for v1.7.0 --- Gemfile.lock | 2 +- lib/maxmind/geoip2/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e4ce68f..2686d3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - maxmind-geoip2 (1.6.0) + maxmind-geoip2 (1.7.0) connection_pool (>= 2.2, < 4.0) http (>= 4.3, < 7.0) maxmind-db (~> 1.5) diff --git a/lib/maxmind/geoip2/version.rb b/lib/maxmind/geoip2/version.rb index ffa8058..e25f1d2 100644 --- a/lib/maxmind/geoip2/version.rb +++ b/lib/maxmind/geoip2/version.rb @@ -3,6 +3,6 @@ module MaxMind module GeoIP2 # The Gem version. - VERSION = '1.6.0' + VERSION = '1.7.0' end end From ea13ab505b5997d6587b1de6db9b2deb24aa611c Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 17 Nov 2026 23:30:25 +0000 Subject: [PATCH 4/8] Keep the release bundle out of the system gems rubygems/release-gem signs the gem by running sigstore-cli 0.2.3 with Bundler.unbundled_env. The bundle install step had put json 3.1.0, a RuboCop dependency in Gemfile.lock, into the system gems, so sigstore loaded it and failed: "unknown keywords: allow_blank, create_additions, allow_infinity". The action then pushed 1.7.0 without an attestation. With BUNDLE_PATH set for the job, bundle exec still finds the bundle, and the unbundled sigstore sees only Ruby's default json. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14eea0b..f6cb889 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,11 @@ jobs: environment: release permissions: id-token: write + env: + # Keep the bundle out of the system gems. release-gem signs the gem + # with an unbundled `gem exec` that sees the system gems, and the json + # version in Gemfile.lock can break the signer there. + BUNDLE_PATH: vendor/bundle steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: From 8a74f0d683813020dec289931f1d906e154b79ac Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 17 Nov 2026 23:30:31 +0000 Subject: [PATCH 5/8] Update rubygems/release-gem to v1.4.2 The v1.4.1 "Wait for release to propagate" step runs rubygems-await, which fails on Ruby 4.0 with "undefined method 'dependencies' for Gem::CompactIndexClient::Cache". It retried until the 1.7.0 job timed out. v1.4.2 waits for the release without rubygems-await. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6cb889..79d3536 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,4 +41,4 @@ jobs: # zizmor complains that 'v1' is a ref that can be provided by both the branch and tag namespaces. # specify that we want the v1 branch. - - uses: rubygems/release-gem@7f9650160c1a4e7989fdc9855807bdbd421d8b6b # v1.4.1 + - uses: rubygems/release-gem@5c53f5308233b7c0f47411f0471b3faae6fa57b2 # v1.4.2 From 0a5eafca244c05da647e36ea3e2aff808dab78cf Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 17 Nov 2026 23:32:52 +0000 Subject: [PATCH 6/8] Fail the release job when the gem has no attestation release-gem catches a signing error, pushes the gem without an attestation, and the job still passes. That is how 1.7.0 shipped unsigned. Ask RubyGems.org for the attestation after the push. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79d3536..6e90ba3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,3 +42,16 @@ jobs: # zizmor complains that 'v1' is a ref that can be provided by both the branch and tag namespaces. # specify that we want the v1 branch. - uses: rubygems/release-gem@5c53f5308233b7c0f47411f0471b3faae6fa57b2 # v1.4.2 + + # release-gem pushes the gem without an attestation if signing fails, + # and the job still passes. Fail the job so that someone notices. + - name: Check that RubyGems.org has an attestation + run: | + for gem in pkg/*.gem; do + name="$(basename "$gem" .gem)" + if ! curl -fsS "https://rubygems.org/api/v1/attestations/$name.json" | + jq -e 'length > 0' >/dev/null; then + echo "::error::RubyGems.org has no attestation for $name." + exit 1 + fi + done From 736b702b3f5d74d10cab29ea6b0548134618c22e Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 17 Nov 2026 23:26:52 +0000 Subject: [PATCH 7/8] Add the 1.7.1 changelog entry Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ede28d5..655cce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.7.1 (2026-11-17) + +* No code changes. This release republishes 1.7.0 with a Sigstore + attestation. The release workflow failed to sign 1.7.0 and pushed it + without one. + ## 1.7.0 (2026-11-17) * The minimum version of the `maxmind-db` gem is now 1.5.0. This version From 3fdef4254891efef4ccf5570dc68be94c1c51021 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 17 Nov 2026 23:40:39 +0000 Subject: [PATCH 8/8] Update for v1.7.1 --- Gemfile.lock | 2 +- lib/maxmind/geoip2/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2686d3e..27e72d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - maxmind-geoip2 (1.7.0) + maxmind-geoip2 (1.7.1) connection_pool (>= 2.2, < 4.0) http (>= 4.3, < 7.0) maxmind-db (~> 1.5) diff --git a/lib/maxmind/geoip2/version.rb b/lib/maxmind/geoip2/version.rb index e25f1d2..16e3915 100644 --- a/lib/maxmind/geoip2/version.rb +++ b/lib/maxmind/geoip2/version.rb @@ -3,6 +3,6 @@ module MaxMind module GeoIP2 # The Gem version. - VERSION = '1.7.0' + VERSION = '1.7.1' end end