Skip to content

fix: update Dockerfiles and Fix Vulnerable Dependencies#67

Merged
aron-muon merged 1 commit into
aron-muon:mainfrom
nosportugal:chore-dockerfiles-upgrade
May 21, 2026
Merged

fix: update Dockerfiles and Fix Vulnerable Dependencies#67
aron-muon merged 1 commit into
aron-muon:mainfrom
nosportugal:chore-dockerfiles-upgrade

Conversation

@gafda
Copy link
Copy Markdown
Contributor

@gafda gafda commented May 21, 2026

Summary

Upgrades Docker base image tags to latest stable versions, patches known security vulnerabilities in Java and Python dependency specifications, and refactors the build script for improved platform configurability.

Changes

Image Tag Upgrades

Image Previous Tag New Tag
Node.js 25.4-debian13 26.1-debian13
PHP 8.5.3-debian-13-dev 8.5.6-debian-13-dev
Rust 1.93-debian13-dev 1.95.0-debian13-dev

Security Fixes — Java Dependencies

Package Previous Updated CVE
commons-compress 1.25.0 1.27.1 CVE-2024-25710, CVE-2024-26308 (DoS)
pdfbox 3.0.1 3.0.4 CVE-2024-28146 (infinite loop)
fontbox 3.0.1 3.0.4 (paired with pdfbox)

Security Fixes — Python Dependencies

Package Previous Updated CVE
cryptography >=44.0.0 >=44.0.1 CVE-2024-12797 (OpenSSL MITM)

Build Script Improvements

  • Extracted PLATFORM as a configurable variable (was hardcoded linux/amd64)
  • Added --platform CLI option for easy multi-arch builds
  • Added platform display in build output header
  • Added scripts/validate-multiarch-builds.sh for CI validation
  • Added .dockerignore for cleaner build contexts

Files Modified

File Change
docker/nodejs.Dockerfile Node.js tag 25.4 → 26.1
docker/php.Dockerfile PHP tag 8.5.3 → 8.5.6
docker/rust.Dockerfile Rust tag 1.93 → 1.95.0 + build improvements
docker/requirements/java-deps.txt commons-compress, pdfbox, fontbox version bumps
docker/requirements/python-utilities.txt cryptography minimum version bump
scripts/build-images.sh Platform variable + CLI option
scripts/validate-multiarch-builds.sh New — CI multi-arch validation script
.dockerignore New — excludes unnecessary files from build context

- Upgrade Node.js 25.4 → 26.1, PHP 8.5.3 → 8.5.6, Rust 1.93 → 1.95.0
- Update vulnerable Java deps: commons-compress 1.25.0 → 1.27.1, pdfbox 3.0.1 → 3.0.4
- Bump cryptography ≥44.0.1 (addresses CVE-2024-12797)
- Add SHELL directive and apt cleanup to rust.Dockerfile (security hardening)
- Add PLATFORM variable to build-images.sh for flexible local builds
- Improve .dockerignore: remove duplicates and add missing exclusions
- Fix validate-multiarch-builds.sh: correct nonexistent shell.Dockerfile references
  to the actual changed Dockerfiles (nodejs, php, rust); amd64-only builds
Copilot AI review requested due to automatic review settings May 21, 2026 14:28
@gafda gafda requested a review from aron-muon as a code owner May 21, 2026 14:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds tooling and updates Docker assets to improve/standardize multi-arch validation and modernize build dependencies.

Changes:

  • Added a branch-specific multi-arch build validation script using docker buildx build.
  • Parameterized scripts/build-images.sh to build with a configurable target platform (default linux/amd64).
  • Updated several Docker images/dependency pins and expanded .dockerignore patterns to reduce build context noise.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/validate-multiarch-builds.sh New script to validate builds for selected branches across architectures via buildx.
scripts/build-images.sh Introduces a PLATFORM variable and uses it for docker build invocations.
docker/rust.Dockerfile Bumps Rust image tag and improves apt cleanup in final stage.
docker/requirements/python-utilities.txt Minor bump for cryptography minimum version.
docker/requirements/java-deps.txt Updates a few Maven artifact URLs and checksums.
docker/php.Dockerfile Updates pinned PHP version arg.
docker/nodejs.Dockerfile Updates Node base image tags across stages.
.dockerignore Adds many ignores (caches, venvs, node_modules, etc.) to shrink Docker build context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +4
# Uses the multiarch-builder (BuildKit) — no push, no local load.
# Cleans up any locally loaded test images after validation.
Comment on lines +53 to +60
# ── feat-shell-languages ────────────────────────────────────────────────────
if [[ "$TARGET_BRANCH" == "feat-shell-languages" ]]; then
info "Checking out $TARGET_BRANCH …"
git -C "$REPO_ROOT" checkout "$TARGET_BRANCH"

build_test "shell.Dockerfile" "linux/amd64" "shell"
build_test "shell.Dockerfile" "linux/arm64" "shell"
fi
Comment on lines +84 to +86
if [[ ${#FAILED[@]} -eq 0 ]]; then
echo -e "${GREEN}All builds passed.${NC}"
else
Comment thread .dockerignore
Comment on lines +81 to 85
# Documentation (optional—comment out if needed in build context)
# docs/
# *.md
# README*

@aron-muon aron-muon changed the title Upgrade Dockerfiles and Fix Vulnerable Dependencies fix: update Dockerfiles and Fix Vulnerable Dependencies May 21, 2026
Copy link
Copy Markdown
Owner

@aron-muon aron-muon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you!

@aron-muon aron-muon merged commit afac333 into aron-muon:main May 21, 2026
30 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.5.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@gafda gafda deleted the chore-dockerfiles-upgrade branch May 22, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants