Skip to content

chore(geoip): update GeoLite2-Country.mmdb#1039

Merged
trim21 merged 2 commits into
masterfrom
chore/update-mmdb
Feb 19, 2026
Merged

chore(geoip): update GeoLite2-Country.mmdb#1039
trim21 merged 2 commits into
masterfrom
chore/update-mmdb

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated weekly update of GeoLite2 Country database.

@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Feb 16, 2026
@trim21 trim21 enabled auto-merge (squash) February 19, 2026 10:43
@claude

claude Bot commented Feb 19, 2026

Copy link
Copy Markdown

PR Review: chore(geoip): update GeoLite2-Country.mmdb

This is a routine automated weekly update of the embedded GeoLite2-Country database. The change is straightforward — a single-line replacement of the brotli-compressed, base64-encoded mmdb blob in server/geoip/data.ts.

What this PR does

The workflow downloads the .mmdb file from P3TERX/GeoLite.mmdb, then runs scripts/update-mmdb.mjs to compress it with Brotli and embed it as a base64 string in a TypeScript source file. The consumer (server/services/geoip.ts) decompresses and opens it via @maxmind/geoip2-node.

Concerns

Supply chain risk (worth considering)

The database is pulled from a third-party mirror (P3TERX/GeoLite.mmdb) rather than the official MaxMind distribution. This is a common workaround since MaxMind requires account registration, but it means the project is trusting a third-party to faithfully mirror the upstream database. A compromised or tampered mirror could silently introduce incorrect geolocation data.

Recommendation: Consider verifying the integrity of the downloaded .mmdb file (e.g., comparing a checksum against a known-good reference, or cross-checking against another mirror) as part of the update workflow. Even a simple size sanity check would help catch obvious corruption.

No test coverage for the updated data

There are no automated tests that validate the newly embedded database (e.g., spot-checking that a known IP maps to the expected country). If the database were corrupt or truncated, this would only surface at runtime.

Recommendation: A lightweight test that performs one or two known lookups against server/services/geoip.ts would catch regressions from bad database updates.

Everything else looks fine

  • The embedding strategy (Brotli + base64 in a TS file) is consistent with the existing pattern.
  • Auto-merge with squash is appropriate for this type of automated dependency update.
  • The PR description clearly documents the source and the generation process.

This is low-risk for the actual change, but the supply chain and validation gaps are worth addressing in the workflow itself rather than blocking this individual PR.

@trim21 trim21 merged commit 948adf3 into master Feb 19, 2026
22 of 23 checks passed
@trim21 trim21 deleted the chore/update-mmdb branch February 19, 2026 10:47
trim21 added a commit to trim21/flood that referenced this pull request May 1, 2026
Co-authored-by: trim21 <13553903+trim21@users.noreply.github.com>
Co-authored-by: Trim21 <trim21.me@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant