Skip to content

🔧(docker) harden the Dockerfile#782

Merged
kernicPanel merged 6 commits into
fix/pin-collabora-imagefrom
fix/dockerfile-hardening
Jul 22, 2026
Merged

🔧(docker) harden the Dockerfile#782
kernicPanel merged 6 commits into
fix/pin-collabora-imagefrom
fix/dockerfile-hardening

Conversation

@kernicPanel

Copy link
Copy Markdown
Collaborator

Purpose

The SonarCloud docker analyzer now scans the Dockerfile and fails the
quality gate of any PR touching it (see #773) with findings that
predate those PRs.

Proposal

  • 🔥 drop the floating pip upgrade: nothing uses pip in the image (the
    build relies on uv) and the base image ships its own pip, refreshed
    on every base image bump
  • 🧹 use apk --no-cache everywhere so package indexes are not stored
    in the image layers
  • 🔤 quote DRIVE_STATIC_ROOT and sort the core package list

Deliberately not addressed (to be marked "Accepted" in SonarCloud):

  • the mime.types wget (kept as is)
  • uv sync --no-build: sdists may need building on alpine/musl
  • yarn lifecycle scripts in the mail-builder stage: left to the mjml
    bump PR

Address the maintainability findings raised by the new SonarCloud
docker analyzer: drop the floating pip upgrade (nothing uses pip in
the image, the build relies on uv, and the base image already ships
a current pip), stop storing apk indexes in the image layers, quote
DRIVE_STATIC_ROOT and sort the core package list.
@kernicPanel
kernicPanel force-pushed the fix/dockerfile-hardening branch from a137642 to 663cd49 Compare July 21, 2026 16:38
@kernicPanel
kernicPanel changed the base branch from main to fix/pin-collabora-image July 21, 2026 16:39
@kernicPanel
kernicPanel requested a review from NathanVss July 21, 2026 16:41
Next 15.5.18, Vite 6.4.3 and Turbo 2.9.14 patch several advisories:
Next.js server components denial of service (GHSA-26hh-7cqf-hhc6),
Vite server.fs.deny bypass (GHSA-fx2h-pf6j-xcff) and Turbo local
code execution on untrusted repositories (GHSA-3qcw-2rhx-2726).
Rebase the backend image on python:3.13.14-alpine (Alpine 3.24) to
pull the patched openssl fixing CVE-2026-31789. Stays within the
pinned 3.13 runtime, so no dependency re-resolution is needed.
Bump the transitive idna to 3.18 to fix GHSA-65pc-fj4g-8rjx, where
crafted input to idna.encode() bypasses the CVE-2024-3651 mitigation.
Raise the transitive pillow constraint to 12.3.0 to fix
CVE-2026-54058 (GHSA-pg7v-jwj7-p798), flagged by the trivy
scan on the backend image.
@kernicPanel
kernicPanel merged commit 651a643 into fix/pin-collabora-image Jul 22, 2026
2 of 4 checks passed
@kernicPanel
kernicPanel deleted the fix/dockerfile-hardening branch July 22, 2026 13:22
@sonarqubecloud

Copy link
Copy Markdown

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