fix: add SHA-256 checksum verification for geoipupdate deb package#133
fix: add SHA-256 checksum verification for geoipupdate deb package#133
Conversation
Closes #63 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the security posture of the Docker image build process by introducing SHA-256 checksum verification for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enhances security by adding SHA-256 checksum verification for the geoipupdate package download in the Dockerfile. The implementation correctly mirrors the existing pattern for wkhtmltopdf and prevents potential supply chain attacks. The changes also include a subtle but important fix to the filename variable, which improves caching behavior. I have one suggestion to make the download command more robust.
| curl -sSL -o "$GEOIP_DEB" \ | ||
| "https://github.com/maxmind/geoipupdate/releases/download/v${GEOIP_UPDATER_VERSION}/geoipupdate_${GEOIP_UPDATER_VERSION}_linux_${TARGETARCH}.deb"; \ |
There was a problem hiding this comment.
It's a good practice to use the -f (--fail) flag with curl in scripts. This flag causes curl to exit with a non-zero status code (22) on server errors (like 404 Not Found), which will be immediately caught by set -e. Without it, curl might download an HTML error page and exit successfully, causing the build to fail later at the checksum verification step with a less direct error message.
curl -sSLf -o "$GEOIP_DEB" \
"https://github.com/maxmind/geoipupdate/releases/download/v${GEOIP_UPDATER_VERSION}/geoipupdate_${GEOIP_UPDATER_VERSION}_linux_${TARGETARCH}.deb"; \
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #133 +/- ##
==========================================
- Coverage 69.96% 69.96% -0.01%
==========================================
Files 832 832
Lines 48813 48768 -45
==========================================
- Hits 34154 34121 -33
+ Misses 14659 14647 -12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary
.debpackage download in the Dockerfile, mirroring the existing pattern used for wkhtmltopdfCloses #63
Test plan
docker build --platform linux/amd64 -f docker/Dockerfile -t openspp:test .docker build --platform linux/arm64 -f docker/Dockerfile -t openspp:test .🤖 Generated with Claude Code