Repository navigation
fix(xhgui): upgrade Alpine packages so the image gets PHP and nginx security fixes - #9028
Merged
Merged
Conversation
|
Pushed updated container image(s) for this PR:
|
|
Download this PR's build for your OS and architecture with: ddev utility download-ddev --pr 9028Or download the artifact for your OS and architecture directly:
See Testing a PR. |
stasadev
approved these changes
Oct 28, 2026
stasadev
left a comment
Member
There was a problem hiding this comment.
Looks good to me. Claude Code built the PR on Docker and ran ddev xhgui on in a php project: PHP 8.3.36, profiles import and show up in the UI.
apk upgrade puts the upgraded files in a new layer on top of upstream's layers, so the image gets bigger (linux/amd64):
ddev/ddev-xhgui |
Download (compressed) | Unpacked | Our apk layer |
|---|---|---|---|
2ee77bbcd8 (v1.25.5) |
~16 MiB | 75.5 MiB | 7.5 MiB |
f2afa48299 (this PR) |
~27 MiB | 119.1 MiB | 40.0 MiB |
I think that's fine for an optional service, and it goes away once perftools/xhgui#603 gets a rebuilt image.
🤖 Reviewed with assistance from Claude Code
…ecurity fixes ## Short Summary (TL;DR) The `ddev-xhgui` image shipped PHP 8.3.23 from July 2025, because upstream `xhgui/xhgui:0.23` has not been rebuilt since then. The Dockerfile now runs `apk upgrade`, so each DDEV image build picks up current Alpine 3.22 security fixes. ## The Issue Upstream built `xhgui/xhgui:0.23` on 2025-07-07 on Alpine 3.22.0. Our Dockerfile only ran `apk add`, so every DDEV release shipped that package set unchanged: PHP 8.3.23, nginx 1.28.0, OpenSSL 3.5.0, and 33 outdated packages in total. Security scanners flag the image. With `bind_all_interfaces` or `ddev share`, xhgui can also be reachable from the network. ## How This PR Solves The Issue `apk upgrade --no-cache` runs before the existing `apk add`. The rebuilt image has Alpine 3.22.7, PHP 8.3.36 (CLI and php-fpm), and nginx 1.28.3, with no upgradable packages left. Alpine 3.22 gets security fixes until May 2027. Alternatives considered: - Base on upstream `xhgui/xhgui:0.24.x`: it is a moving branch tag, not a release, and its PHP 8.3.32 is older than what 3.22 now provides. - Build xhgui from source: more maintenance than this problem needs. We will also ask upstream perftools/xhgui for a 0.24.0 release and scheduled image rebuilds. ## Manual Testing Instructions ```bash ddev utility download-ddev --pr 9028 export PATH="$HOME/tmp/ddev-download-ddev/pr-9028:$PATH" ddev config --project-type=php ddev start ddev xhgui on ddev exec -s xhgui php -v # Expect PHP 8.3.36 or later, not 8.3.23 ddev xhgui # Expect the xhgui UI to load in the browser ``` ## Automated Testing Overview `TestDdevXhprofXhguiEnabled` passes locally against the new image. ## Release/Deployment Notes The `ddev/ddev-xhgui:f2afa48299` image must be pushed before CI can pull it. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 <[email protected]>
stasadev
force-pushed
the
20261028_rfay_xhgui_apk_upgrade
branch
from
October 29, 2026 15:20
9041483 to
dd9df14
Compare
|
Pushed updated container image(s) for this PR:
|
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.
Short Summary (TL;DR)
The
ddev-xhguiimage shipped PHP 8.3.23 from July 2025, because upstreamxhgui/xhgui:0.23has not been rebuilt since then. The Dockerfile now runsapk upgrade, so each DDEV image build picks up current Alpine 3.22 security fixes. The risk from the old packages is low, but there is no reason to ship them.The Issue
Upstream built
xhgui/xhgui:0.23on 2025-07-07 on Alpine 3.22.0. Our Dockerfile only ranapk add, so every DDEV release shipped that package set unchanged: PHP 8.3.23, nginx 1.28.0, OpenSSL 3.5.0, and 33 outdated packages in total. Security scanners flag the image, even though DDEV v1.25.5 delivered current PHP in the web image.Why the risk is low
bind_all_interfaces: trueorddev share.The fix is still worthwhile. It removes the scanner findings, and it covers users who expose their projects on purpose.
How This PR Solves The Issue
apk upgrade --no-cacheruns before the existingapk add. The rebuilt image has Alpine 3.22.7, PHP 8.3.36 (CLI and php-fpm), and nginx 1.28.3, with no upgradable packages left. Alpine 3.22 gets security fixes until May 2027, so future image builds stay current even when upstream does not rebuild.Alternatives considered:
xhgui/xhgui:0.24.x: it is a moving branch tag, not a release, and its PHP 8.3.32 is older than what Alpine 3.22 now provides.We will also ask upstream perftools/xhgui for a 0.24.0 release and scheduled image rebuilds.
Manual Testing Instructions
Automated Testing Overview
TestDdevXhprofXhguiEnabledpasses locally against the new image.Release/Deployment Notes
The
ddev/ddev-xhgui:f2afa48299image must be pushed before CI can pull it.🤖 Developed with assistance from Claude Code