From 6c69876ef1c926440565a58afc575c982df39adb Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:06:26 +0000 Subject: [PATCH] Pin PHP 8.4.28 and 8.5.13 images for the 2026-11-19 security releases Move the production, devcontainer and CI PHP pins to the official 8.4.28 and 8.5.13 Bookworm image indexes, raise the 8.4 runtime version guards to 80428, and update the contract tests and devcontainer README that assert the exact parent. Co-Authored-By: Claude Opus 5.5 --- .devcontainer/docker/Dockerfile | 6 +++--- .devcontainer/docker/README.md | 8 +++++--- Dockerfile | 4 ++-- docker/verify-runtime-trust.php | 4 ++-- scripts/ci/php-container-images.json | 4 ++-- tests/Unit/ProductionImageTrustContractTest.php | 2 +- tests/ci/test_bookworm_consumer.py | 2 +- tests/ci/test_devcontainer_attestations.py | 6 +++--- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.devcontainer/docker/Dockerfile b/.devcontainer/docker/Dockerfile index 8a7901b8..e3babb0f 100644 --- a/.devcontainer/docker/Dockerfile +++ b/.devcontainer/docker/Dockerfile @@ -2,7 +2,7 @@ FROM node:22.23.4-bookworm-slim@sha256:4b150b48b4116e2a22f2c39cc27025fbf4f153e20 FROM composer:2.11.0@sha256:278dfc7bd35169965d03f87194816f43bf4e6b6ea61707c2114e52ad12fe24ce AS composer -FROM php:8.4.27-cli-bookworm@sha256:b3e907a1108629c562c4bb313ce3449e34d49991f6bb2487913f6146f47200fe AS brotli-build +FROM php:8.4.28-cli-bookworm@sha256:85da896b3eeb8bcd83fe612e51a529b7d5983a1fab92ef5f63c7ac6e2842fc46 AS brotli-build COPY .central-apt-source/docker/apt/require-fixed-bookworm-apt.sh /usr/local/share/sample-app/require-fixed-bookworm-apt.sh COPY --from=composer /usr/bin/composer /usr/local/bin/composer @@ -129,7 +129,7 @@ RUN set -eux; \ .; \ test -s /tmp/sample-app-mysql-seed.tar -FROM php:8.4.27-cli-bookworm@sha256:b3e907a1108629c562c4bb313ce3449e34d49991f6bb2487913f6146f47200fe +FROM php:8.4.28-cli-bookworm@sha256:85da896b3eeb8bcd83fe612e51a529b7d5983a1fab92ef5f63c7ac6e2842fc46 COPY .central-apt-source/docker/apt/require-fixed-bookworm-apt.sh /usr/local/share/sample-app/require-fixed-bookworm-apt.sh COPY --from=brotli-build /out /usr/local/share/sample-app/brotli @@ -174,7 +174,7 @@ COPY docker/install-npm.sh /usr/local/bin/install-npm COPY .devcontainer/docker/verify-php-trust.php .devcontainer/docker/verify-node-trust.mjs /usr/local/share/sample-app/ RUN set -eux; \ - php -r 'exit(PHP_MAJOR_VERSION === 8 && PHP_MINOR_VERSION === 4 && PHP_VERSION_ID >= 80427 ? 0 : 1);'; \ + php -r 'exit(PHP_MAJOR_VERSION === 8 && PHP_MINOR_VERSION === 4 && PHP_VERSION_ID >= 80428 ? 0 : 1);'; \ php /usr/local/share/sample-app/verify-php-trust.php "$(command -v composer)"; \ ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime; \ echo "${TZ}" > /etc/timezone; \ diff --git a/.devcontainer/docker/README.md b/.devcontainer/docker/README.md index 3b78f2d5..7a41d712 100644 --- a/.devcontainer/docker/README.md +++ b/.devcontainer/docker/README.md @@ -1,11 +1,13 @@ # Development image build inputs -The development recipe uses the same pinned PHP 8.4.27 Bookworm index for its +The development recipe uses the same pinned PHP 8.4.28 Bookworm index for its Brotli builder and final stage, on both amd64 and arm64. Its shared APT preflight comes from the accepted immutable source in [central `docker/apt`](https://github.com/durable-workflow/.github/tree/18783be6bef737cc778e4c7282a8797e39daa61a/docker/apt). -That source records the exact parent descriptors and publisher SPDX package -inventory; installed-image acceptance is a separate result. +That source records the exact descriptors and publisher SPDX package inventory of +the earlier PHP 8.4.27 parent; it does not record the 8.4.28 parent. The preflight +itself does not depend on the parent digest: it checks the installed native +APT/libapt pair in each stage. Installed-image acceptance is a separate result. Both image workflows check out that exact central commit without persisted credentials into `.central-apt-source`, then verify its actual HEAD and the diff --git a/Dockerfile b/Dockerfile index a458861f..5b30c0b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM composer:2.11.0@sha256:278dfc7bd35169965d03f87194816f43bf4e6b6ea61707c2114e52ad12fe24ce AS composer -FROM php:8.4.27-cli-bookworm@sha256:b3e907a1108629c562c4bb313ce3449e34d49991f6bb2487913f6146f47200fe AS brotli-build +FROM php:8.4.28-cli-bookworm@sha256:85da896b3eeb8bcd83fe612e51a529b7d5983a1fab92ef5f63c7ac6e2842fc46 AS brotli-build COPY .central-apt-source/docker/apt/require-fixed-bookworm-apt.sh /usr/local/share/sample-app/require-fixed-bookworm-apt.sh COPY --from=composer /usr/bin/composer /usr/local/bin/composer @@ -14,7 +14,7 @@ RUN /bin/sh /usr/local/share/sample-app/require-fixed-bookworm-apt.sh \ && /out/verify-system-brotli \ && cp /usr/src/brotli-inputs/version /usr/src/brotli-inputs/install-vendor.sh /usr/src/brotli-inputs/verify-runtime.php /out/ -FROM php:8.4.27-cli-bookworm@sha256:b3e907a1108629c562c4bb313ce3449e34d49991f6bb2487913f6146f47200fe AS base +FROM php:8.4.28-cli-bookworm@sha256:85da896b3eeb8bcd83fe612e51a529b7d5983a1fab92ef5f63c7ac6e2842fc46 AS base COPY .central-apt-source/docker/apt/require-fixed-bookworm-apt.sh /usr/local/share/sample-app/require-fixed-bookworm-apt.sh COPY --from=brotli-build /out /usr/local/share/sample-app/brotli diff --git a/docker/verify-runtime-trust.php b/docker/verify-runtime-trust.php index 456bc3ae..3c715ca6 100644 --- a/docker/verify-runtime-trust.php +++ b/docker/verify-runtime-trust.php @@ -4,8 +4,8 @@ final class ProductionTrustRefused extends RuntimeException {} -if (PHP_MAJOR_VERSION !== 8 || PHP_MINOR_VERSION !== 4 || PHP_VERSION_ID < 80427) { - throw new ProductionTrustRefused('PHP 8.4.27 or newer on the 8.4 line is required.'); +if (PHP_MAJOR_VERSION !== 8 || PHP_MINOR_VERSION !== 4 || PHP_VERSION_ID < 80428) { + throw new ProductionTrustRefused('PHP 8.4.28 or newer on the 8.4 line is required.'); } Phar::loadPhar($argv[1]); require_once 'phar://composer.phar/vendor/autoload.php'; diff --git a/scripts/ci/php-container-images.json b/scripts/ci/php-container-images.json index e38692ab..fdf80aa5 100644 --- a/scripts/ci/php-container-images.json +++ b/scripts/ci/php-container-images.json @@ -1,4 +1,4 @@ { - "8.4": "php:8.4.27-cli-bookworm@sha256:b3e907a1108629c562c4bb313ce3449e34d49991f6bb2487913f6146f47200fe", - "8.5": "php:8.5.12-cli-bookworm@sha256:050713ce008e2360ea9dc96e1f9a075690132388d917fc3552806f7a7be6f2a0" + "8.4": "php:8.4.28-cli-bookworm@sha256:85da896b3eeb8bcd83fe612e51a529b7d5983a1fab92ef5f63c7ac6e2842fc46", + "8.5": "php:8.5.13-cli-bookworm@sha256:d6991172c4282d2a09d6418073923a81664173bb0a0e07a16663a9a645746092" } diff --git a/tests/Unit/ProductionImageTrustContractTest.php b/tests/Unit/ProductionImageTrustContractTest.php index 69ae8567..23a105a2 100644 --- a/tests/Unit/ProductionImageTrustContractTest.php +++ b/tests/Unit/ProductionImageTrustContractTest.php @@ -20,7 +20,7 @@ public function test_external_runtime_and_composer_inputs_are_immutable(): void } $this->assertStringContainsString('node:22.23.4-bookworm-slim@', $source); $this->assertStringContainsString('composer:2.11.0@', $source); - $this->assertStringContainsString('php:8.4.27-cli-bookworm@', $source); + $this->assertStringContainsString('php:8.4.28-cli-bookworm@', $source); } public function test_node_is_checked_before_asset_and_final_browser_downloads(): void diff --git a/tests/ci/test_bookworm_consumer.py b/tests/ci/test_bookworm_consumer.py index adfa4698..3f6b19cc 100644 --- a/tests/ci/test_bookworm_consumer.py +++ b/tests/ci/test_bookworm_consumer.py @@ -8,7 +8,7 @@ CONTEXT_SOURCE = ".central-apt-source/docker/apt/require-fixed-bookworm-apt.sh" GUARD_PATH = "/usr/local/share/sample-app/require-fixed-bookworm-apt.sh" GUARD = "/bin/sh " + GUARD_PATH -PARENT = "php:8.4.27-cli-bookworm@sha256:b3e907a1108629c562c4bb313ce3449e34d49991f6bb2487913f6146f47200fe" +PARENT = "php:8.4.28-cli-bookworm@sha256:85da896b3eeb8bcd83fe612e51a529b7d5983a1fab92ef5f63c7ac6e2842fc46" def instructions(source): diff --git a/tests/ci/test_devcontainer_attestations.py b/tests/ci/test_devcontainer_attestations.py index 24d783a9..fd792661 100644 --- a/tests/ci/test_devcontainer_attestations.py +++ b/tests/ci/test_devcontainer_attestations.py @@ -28,10 +28,10 @@ def bundle(platform="linux/amd64", change=None): metadata = {"vcs": {"source": "https://github.com/durable-workflow/sample-app", "revision": REVISION, "localdir:dockerfile": ".devcontainer/docker"}, "source": {"infos": [{"filename": "Dockerfile", "language": "Dockerfile", - "data": base64.b64encode(f"FROM php:8.4.27-cli-bookworm@{BASE}\n".encode()).decode()}]}} + "data": base64.b64encode(f"FROM php:8.4.28-cli-bookworm@{BASE}\n".encode()).decode()}]}} provenance = {"runDetails": {"metadata": {"buildkit_metadata": metadata}}, "buildDefinition": {"resolvedDependencies": [ - {"uri": f"pkg:docker/php@8.4.27-cli-bookworm?digest={BASE}&platform={platform}", + {"uri": f"pkg:docker/php@8.4.28-cli-bookworm?digest={BASE}&platform={platform}", "digest": {"sha256": BASE[7:]}}]}} def statement(kind, predicate): @@ -134,7 +134,7 @@ def change(values): self.verify(change) def test_mutable_or_other_distribution_base_is_refused(self): - for base in ("php:8.4.27-cli-bookworm", "php:8.4.27-cli-trixie@" + BASE): + for base in ("php:8.4.28-cli-bookworm", "php:8.4.28-cli-trixie@" + BASE): def change(values): info = values[VERIFIER.SLSA]["predicate"]["runDetails"]["metadata"]["buildkit_metadata"]["source"]["infos"][0] info["data"] = base64.b64encode(f"FROM {base}\n".encode()).decode()