Skip to content

Fix/image CVE refresh - #744

Merged
wdower merged 7 commits into
masterfrom
fix/image-cve-refresh
Jul 31, 2026
Merged

Fix/image CVE refresh#744
wdower merged 7 commits into
masterfrom
fix/image-cve-refresh

Conversation

@wdower

@wdower wdower commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Bumps all dependencies we can bump without changing a major version pin to cut down on Trivy findings (run locally, not currently set up in CI/CD).

Also folds in some of the Dockerfile fixes needed to get the container to launch on a Docker ECI host.

wdower added 2 commits July 28, 2026 00:39
Clears the 25 HIGH/CRITICAL gemspec findings from #743 (local rebuild + Trivy:
0 gemspec findings; total 47->17, remainder are out-of-scope UBI9 OS packages).

Gems (bundle update within existing constraints, no majors; bundler-audit clean):
concurrent-ruby 1.3.8, faraday 1.10.6, oj 3.17.4, websocket-driver 0.8.2, crass
1.0.7, json 2.21.1, loofah 2.25.2, msgpack 1.8.3, rails-html-sanitizer 1.7.1.
faraday pinned '~> 1.10', '>= 1.10.6' (CVE-2026-54297) since bundle update
mis-resolves the transitive gem down to 1.3.1.

Toolchain: Ruby 3.4.9->3.4.10 (patched default gems erb 4.0.4.1 / net-imap
0.5.15, CVE-2026-41316 + net-imap advisories), Node 24.14.0->24.18.0, yarn
upgrade within package.json ranges.

Build (incorporates #739): base image digest-pinned, tar --no-same-owner,
combined COPY -- required to build under Docker Enhanced Container Isolation.

Signed-off-by: Will <will@dower.dev>
Signed-off-by: Will <will@dower.dev>
@wdower
wdower requested a review from aaronlippold July 28, 2026 04:49
@wdower wdower self-assigned this Jul 28, 2026
@aaronlippold
aaronlippold temporarily deployed to vulcan-fix-image-cve-re-3lfogu July 28, 2026 04:51 Inactive
aaronlippold
aaronlippold previously approved these changes Jul 28, 2026
The gem-CVE remediation bumped Ruby to 3.4.10 in Gemfile/Gemfile.lock/
Dockerfile but left CI-facing pins at 3.4.9:
- .ruby-version / .tool-versions drove setup-ruby to install 3.4.9,
  aborting bundle install (Gemfile specifies 3.4.10).
- docker-bake.hcl passed RUBY_VERSION=3.4.9 as a build-arg against the
  Dockerfile's 3.4.10 SHA256, failing the tarball checksum.

Sync all pins to 3.4.10 (and bake node default to 24.18.0 to match the
Dockerfile ARG).

Signed-off-by: Will <will@dower.dev>
ruby/setup-ruby installs prebuilt binaries from ruby-builder, which has
no 3.4.10 build yet (source tarball exists; only compilation works). The
docker job already builds Ruby from source, but lint/backend fail at
setup with 'Unknown version 3.4.10 for ruby on ubuntu-24.04'.

Add a composite action that compiles the pinned Ruby from source
(mirroring the Dockerfile: source fetch + SHA256 verify + configure/make
/install), caching both the compiled Ruby and the gem bundle. Wire lint
and backend to it so CI tests on the same 3.4.10 the image ships.

Temporary: revert to ruby/setup-ruby once ruby-builder publishes a
3.4.10 binary. Timeouts bumped to cover a one-time cold compile.

Signed-off-by: Will <will@dower.dev>
Comment thread .github/actions/setup-ruby-source/action.yml Dismissed
wdower added 2 commits July 30, 2026 13:51
bootsnap 1.18.6 mis-detects Ruby bug #22023 on 3.4.x patch releases, so
RubyVM::InstructionSequence#to_binary raises 'should not compile with
coverage' at boot when SimpleCov is active, crashing every backend CI
shard on Ruby 3.4.10. 1.24.6 fixes the detection and applies the
workaround. Lockfile-only (Gemfile already allows >= 1.4.2).

Signed-off-by: Will <will@dower.dev>
bundler-audit flags CVE-2026-66066 (arbitrary file read + RCE in Active
Storage variant processing) against activestorage 8.0.5. Rails 8.0.5.1 is
the fixed release. Lockfile-only (Gemfile already allows ~> 8.0.0).

Signed-off-by: Will <will@dower.dev>
@wdower

wdower commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Note that a large number of bump updates to gems in this PR needed Ruby 3.4.10, which hasn't wended its way to being installable by GH actions yet.

I have therefore stopped using GH actions for the Ruby install step and borrowed the Dockerfile's Ruby setup, which just pulls and installs up-to-date Ruby directly. This keeps parity between the container build CI and the regular CI, and lets us actually close the dependency issues we're trying to get at with this branch.

Later, when 3.4.10 is available through the GH action for Ruby installation, we can determine if we want to go back to that flow.

Add --proto '=https' --proto-redir '=https' to every build-time curl so
it refuses any non-HTTPS hop, including redirects, closing the transport
downgrade vector SonarCloud S6506 flags (downloads are already SHA256-
verified). Covers the Ruby, jemalloc, and Node fetches in the Dockerfile
and the Ruby fetch in the CI source-build action.

Signed-off-by: Will <will@dower.dev>
@sonarqubecloud

Copy link
Copy Markdown

Comment thread Dockerfile Dismissed
Comment thread Dockerfile Dismissed
Comment thread Dockerfile Dismissed
Comment thread Dockerfile Dismissed
@wdower
wdower merged commit fcd2b03 into master Jul 31, 2026
18 checks passed
@wdower
wdower deleted the fix/image-cve-refresh branch July 31, 2026 16:14
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.

3 participants