fix(security): Upgrade Go runner to 1.26, fix Python CVEs, harden remaining DHI images#70
Merged
Merged
Conversation
* Add `bc` to bash Dockerfile for calculations. * Include `yq` for YAML/JSON/XML/TOML processing in bash Dockerfile. * Remove unnecessary scientific libraries from C/C++ Dockerfile. * Resolve DHI gcc-14-base conflict in Fortran Dockerfile using equivs. * Update PHP Dockerfile to use DHI debian-base and install necessary build dependencies. * Install R packages as pre-compiled binaries from Posit Package Manager in R Dockerfile. * Upgrade Node.js dependencies in requirements file. * Update Go version in runner Dockerfile and go.mod. * Upgrade Python dependencies in pyproject.toml and uv.lock.
|
🎉 This PR is included in version 3.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
Docker Scout scans revealed 18 HIGH-severity CVEs across KubeCodeRun images:
golang:1.24-alpine(non-DHI). This introduced 9 Go stdlib CVEs into every language image.urllib3,python-multipart, andpyasn1.xlsxpackage had an unfixable ReDoS vulnerability (CVE-2024-22363) with no upstream patch.gcc-14-baseconflict preventedgfortran,r-base-core, and other packages from installing on DHI'sdebian-base:trixie-debian13-dev(DHI shipsgcc-14-base=14.2.0-19dhi0which conflicts with stock Debian's=14.2.0-19requirement).dhi.io/phpdirectly as the base, which made it impossible to install additional system libraries needed by PHP extensions (equivs doesn't work cleanly on the PHP image).ghcr.io/aron-muon/kubecoderun-runner:latest(non-DHI, Go 1.24).Solution
Runner: Go 1.24 → Go 1.26.3 (fixes 9 HIGH × 12 images = 108 CVE instances)
docker/runner/Dockerfilegolang:1.24-alpine→dhi.io/golang:1.26-debian13-devdocker/runner/go.modgo 1.24→go 1.26.3CVEs fixed: CVE-2026-42499, CVE-2026-39836, CVE-2026-39820, CVE-2026-33814, CVE-2026-33811, CVE-2026-32283, CVE-2026-32281, CVE-2026-32280, CVE-2026-25679
Python API: Dependency upgrades (fixes 8 HIGH CVEs)
pyproject.tomlpython-multipart>=0.0.27, addedurllib3>=2.7.0, addedpyasn1>=0.6.3uv.lockNode.js: Remove unfixable package (fixes 1 HIGH CVE)
docker/requirements/nodejs.txtxlsx(CVE-2024-22363, ReDoS, no upstream fix);exceljsalready provides equivalent functionalityDHI gcc-14-base conflict resolution
docker/fortran.Dockerfilegcc-14-base (= 14.2.0-19)constraint; installsgfortran-12instead ofgfortrandocker/r.Dockerfiler-base-coreonly (notr-base-dev)docker/c-cpp.Dockerfilelibgsl-dev,libblas-dev,liblapack-dev(trigger the conflict; users needing BLAS/LAPACK can use the bash image)PHP image: Restructured to debian-base + PHP binary copy
docker/php.Dockerfiledhi.io/php:8.5.6-debian13-devintodhi.io/debian-base:trixie-debian13-dev; addslibonig5runtime dep +ldconfigBash image: Added utilities
docker/bash.Dockerfilebc(floating-point math), addedyqv4.53.2 (YAML/JSON/XML processor, static Go binary)Build infrastructure
scripts/build-images.sh--build-arg RUNNER_IMAGEto all builds, ensuring language images use the locally-built DHI runnerRemaining Known Issues
python:3.13-debian13base (3.13.13)Mitigation path (NOT DONE): Upgrade the API Dockerfile from
dhi.io/python:3.13-debian13todhi.io/python:3.14-debian13(ships Python 3.14.5, which patches all 3 CVEs). The project already declaresrequires-python = ">=3.13"so 3.14 is compatible. Alternatively, wait for DHI to publish a patchedpython:3.13.14+image.Testing
All 12 language images tested with Mandelbrot fractal generation:
Docker Scout scan (post-rebuild): 0 CVEs on all language images.