fix(deps): pin the patched resolv, and drop the superseded specification - #106
Merged
Conversation
The image scan failed on CVE-2026-80212 (HIGH) in resolv 0.3.1, which ships as a default gem in ruby:3.3.12-slim. Bundler cannot replace a default gem on its own, so the fix is two halves: the Gemfile pins 0.7.2 — the release that carries the fix, published 2026-08-27 — so the application loads it, and the Dockerfile removes the old specification, which stays on disk otherwise and is what the scanner reads. Not a Ruby upgrade: no 3.3.x image ships resolv 0.7.2 yet, and CLAUDE.md reserves version bumps for a decision rather than a scanner finding. Verified locally: resolv 0.7.2 installs, loads, and the suite is green on both adapters. The scan itself can only be verified in CI, which has the Docker daemon this sandbox does not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KDUtHLJxUmEKXVbBJmcbAh
The first attempt removed it in the build stage, and the final stage starts FROM base again — so the vulnerable specification was back in the image that actually ships, and the scan failed on exactly the file the fix had deleted one stage earlier. Removing it in base means every stage inherits the removal, the shipped image included. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KDUtHLJxUmEKXVbBJmcbAh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The image scan started failing on every pull request again. Not a regression from any of them — a new advisory landed, the same way #93 did.
What broke
Trivy image scanfailed on CVE-2026-80212 (HIGH) inresolv0.3.1, found at:That path is the interesting part:
resolvis a default gem, baked intoruby:3.3.12-slim. It's in neither the Gemfile norGemfile.lock, so there was nothing to bump —bundle updatehas no opinion about a gem it doesn't manage.The fix is two halves, and needs both
Gemfilepinsresolv >= 0.7.2— the release carrying the fix, published 2026-08-27. This is what makes the application load a patched version; bundler installs it over the default.require "resolv"resolves to the bundled 0.7.2.Doing only (1) would leave the gate red while the app was actually safe. Doing only (2) would make the gate green while the app still loaded 0.3.1 — the scanner silenced rather than the finding fixed. Hence both.
Not a Ruby upgrade. No
3.3.ximage ships resolv 0.7.2 yet (it's five days old), and CLAUDE.md reserves version bumps for a decision rather than a scanner finding.Verified
resolv0.7.2 installs and loadsGem.loaded_specs["resolv"] == 0.7.2The scan itself can only be verified in CI — this sandbox has no usable Docker daemon and Docker Hub's blob CDN is proxy-blocked, so I can't build the image here. Same limitation as #93, and CI is the check.
This unblocks #105, which hit this failure and is not the cause of it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KDUtHLJxUmEKXVbBJmcbAh
Generated by Claude Code