Skip to content

fix(deps): pin the patched resolv, and drop the superseded specification - #106

Merged
GauranshMathur merged 2 commits into
mainfrom
fix/resolv-cve
Sep 2, 2026
Merged

fix(deps): pin the patched resolv, and drop the superseded specification#106
GauranshMathur merged 2 commits into
mainfrom
fix/resolv-cve

Conversation

@GauranshMathur

Copy link
Copy Markdown
Owner

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 scan failed on CVE-2026-80212 (HIGH) in resolv 0.3.1, found at:

usr/local/lib/ruby/gems/3.3.0/specifications/default/resolv-0.3.1.gemspec

That path is the interesting part: resolv is a default gem, baked into ruby:3.3.12-slim. It's in neither the Gemfile nor Gemfile.lock, so there was nothing to bump — bundle update has no opinion about a gem it doesn't manage.

The fix is two halves, and needs both

  1. Gemfile pins resolv >= 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.
  2. The Dockerfile removes the old specification. Without this the image still describes itself as shipping 0.3.1, because the superseded gemspec stays on disk and that's what a scanner reads. Only the specification goes; the stdlib source stays, and 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.x image 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

resolv 0.7.2 installs and loads Gem.loaded_specs["resolv"] == 0.7.2
Suite on SQLite ✅ 393 examples
Suite on PostgreSQL ✅ 393 examples (from #105's rig)

The 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

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
@GauranshMathur
GauranshMathur merged commit d01fb4e into main Sep 2, 2026
7 checks passed
@GauranshMathur
GauranshMathur deleted the fix/resolv-cve branch September 2, 2026 01:48
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