Skip to content

Fix CVE-2026-22184 and auto-track base image tags in digest workflow#21333

Merged
geropl merged 3 commits intomainfrom
fix-cve-2026-22184-zlib-upgrade
Mar 9, 2026
Merged

Fix CVE-2026-22184 and auto-track base image tags in digest workflow#21333
geropl merged 3 commits intomainfrom
fix-cve-2026-22184-zlib-upgrade

Conversation

@geropl
Copy link
Member

@geropl geropl commented Mar 8, 2026

Motivation

The daily vulnerability scan on main (build run) reported a critical vulnerability (CVE-2026-22184, zlib 1.3.1-r2) across 6 Docker images. The root cause: Dockerfiles referenced stale base image tags, and the existing update-image-digest workflow only tracked @sha256:-pinned images — not tag-based references like node:22.22.0-alpine.

Resolves CLC-2227

Changes

Bump base image tags

Bump node:22.22.0-alpinenode:22.22.1-alpine and caddy/caddy:2.11-alpinecaddy/caddy:2.11.2-alpine in 4 Dockerfiles (server, gitpod-db, ws-manager-bridge, dashboard). The updated Alpine packages include zlib 1.3.2-r0, fixing CVE-2026-22184. The remaining 2 images (ide-proxy, proxy) already had apk upgrade --no-cache and will pick up the fix on next build.

Prevent future staleness: update-image-digest.yml

Add a new "Update base image tags in Dockerfiles" step to the daily workflow. It uses crane ls + sort -V to find the latest patch release for tracked base images and updates FROM lines accordingly.

Currently tracked patterns:

  • node:22.22.X-alpine
  • node:22.22.X
  • caddy/caddy:2.11[.X]-alpine

New base images that should be auto-updated require adding an entry to the TRACKED_IMAGES array. This is intentional — explicit tracking avoids accidentally bumping images that need manual validation (e.g., major/minor versions, or LTS tags like ubuntu:22.04).

Verification

  • Tested the new workflow step locally against the repo — correctly identifies stale tags and picks the latest patch version for all three patterns
  • YAML validated"

@geropl geropl requested a review from a team as a code owner March 8, 2026 09:24
This ensures the zlib
package is updated from 1.3.1-r2 to 1.3.2-r0, fixing CVE-2026-22184
detected by the daily vulnerability scan.

Co-authored-by: Ona <no-reply@ona.com>
@geropl geropl force-pushed the fix-cve-2026-22184-zlib-upgrade branch from 3167f05 to f4d28cf Compare March 9, 2026 09:10
The daily update-image-digest workflow only updated images pinned with
@sha256: digests. Dockerfiles using tag-based references like
node:22.22.0-alpine or caddy/caddy:2.11-alpine were not tracked,
causing them to go stale and accumulate vulnerabilities.

Add a new step that uses crane ls to find the latest patch release for
tracked base images (node, caddy/caddy) and updates FROM lines in
Dockerfiles accordingly.

Co-authored-by: Ona <no-reply@ona.com>
@geropl geropl changed the title Fix CVE-2026-22184: add apk upgrade to Alpine-based Dockerfiles Fix CVE-2026-22184 and auto-track base image tags in digest workflow Mar 9, 2026
Base image tags (node:22.22.1-alpine, caddy/caddy:2.11.2-alpine) still
ship zlib 1.3.1-r2. The fix (1.3.2-r0) is available in Alpine repos but
the upstream images haven't been rebuilt yet. Running apk upgrade in the
Dockerfile ensures the fix is picked up at build time regardless.

This matches the existing pattern in ide-proxy and proxy Dockerfiles.

Co-authored-by: Ona <no-reply@ona.com>
@geropl geropl enabled auto-merge (squash) March 9, 2026 09:51
@geropl geropl merged commit 21339b8 into main Mar 9, 2026
14 checks passed
geropl added a commit that referenced this pull request Mar 9, 2026
Same fix as the other Caddy-based images (dashboard, ide-proxy) from
#21333. The proxy Dockerfile was missed in that PR.

Together with the existing apk upgrade --no-cache, this resolves
CVE-2026-22184 (zlib 1.3.1-r2 -> 1.3.2-r0).

Co-authored-by: Ona <no-reply@ona.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants