Skip to content

Commit 5b3f647

Browse files
fix(php): build November 2026 security releases from source
1 parent c3313e8 commit 5b3f647

9 files changed

Lines changed: 40 additions & 25 deletions

File tree

‎.github/workflows/php8-security-release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Build PHP 8 Security Images
2-
run-name: Build PHP 8 Security Images 8.2.35, 8.3.36, 8.4.27, 8.5.12
2+
run-name: Build PHP 8 Security Images 8.2.36, 8.3.37, 8.4.28, 8.5.13
33

44
on:
55
workflow_dispatch:
@@ -22,7 +22,7 @@ jobs:
2222
fail-fast: false
2323
max-parallel: 1
2424
matrix:
25-
phpVersion: ["8.2.35", "8.3.36", "8.4.27", "8.5.12"]
25+
phpVersion: ["8.2.36", "8.3.37", "8.4.28", "8.5.13"]
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@v6

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Run the relevant offline checks before building, then validate the built image f
7474

7575
## PHP 8 security releases
7676

77-
`Build PHP 8 Security Images` builds PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 from pinned upstream Dockerfiles, without waiting for official base image tags. See [source provenance and build instructions](php/8/upstream/README.md).
77+
`Build PHP 8 Security Images` builds PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 from pinned upstream Dockerfiles, without waiting for official base image tags. See [source provenance and build instructions](php/8/upstream/README.md).
7878

7979
## PHP extension downloads
8080

@@ -95,7 +95,7 @@ Commit and push the fixes, then select that branch in Actions. Existing images a
9595

9696
The legacy PHP 7 Action uses the existing Dockerfiles and preserves the previous workflow's amd64/arm64/arm/v7 platform list; local PECL installation checks cover amd64 only. The alternative `php/5.6` context remains available through CNB. Both 5.6 contexts include the PECL fix.
9797

98-
For PHP 8.2+, rebuild only images whose PEAR is older than 1.10.17. `Build PHP 8 Security Images` rebuilds the fixed batch `8.2.35`, `8.3.36`, `8.4.27`, `8.5.12`. After publication, pull the updated base image and rebuild the 1Panel runtime.
98+
For PHP 8.2+, rebuild only images whose PEAR is older than 1.10.17. `Build PHP 8 Security Images` rebuilds the fixed batch `8.2.36`, `8.3.37`, `8.4.28`, `8.5.13`. After publication, pull the updated base image and rebuild the 1Panel runtime.
9999

100100
## PHP EOL source backports
101101

‎README_zh.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
## PHP 8 安全版本
7676

77-
`Build PHP 8 Security Images` 从固定上游提交的 Dockerfile 构建 PHP 8.2.35、8.3.36、8.4.27 和 8.5.12,不依赖尚未发布的官方基础镜像标签。详见[源码来源和构建说明](php/8/upstream/README.md)。
77+
`Build PHP 8 Security Images` 从固定上游提交的 Dockerfile 构建 PHP 8.2.36、8.3.37、8.4.28 和 8.5.13,不依赖尚未发布的官方基础镜像标签。详见[源码来源和构建说明](php/8/upstream/README.md)。
7878

7979
## PHP 扩展下载
8080

@@ -95,7 +95,7 @@ PHP 5.6、PHP 7 和 PHP 8 镜像在编译 PHP 后安装固定版本、校验 SHA
9595

9696
旧 PHP 7 Action 使用已有 Dockerfile,保留此前工作流的 amd64/arm64/arm/v7 平台列表;本地 PECL 安装验证仅覆盖 amd64。备用 `php/5.6` 构建目录仍可通过 CNB 选择,两个 5.6 目录均包含 PECL 修复。
9797

98-
PHP 8.2+ 仅在镜像内 PEAR 低于 1.10.17 时需要为本问题重打。`Build PHP 8 Security Images` 会重建固定的 `8.2.35`、`8.3.36`、`8.4.27`、`8.5.12` 四个版本。发布后重新拉取基础镜像,再重建 1Panel 运行环境。
98+
PHP 8.2+ 仅在镜像内 PEAR 低于 1.10.17 时需要为本问题重打。`Build PHP 8 Security Images` 会重建固定的 `8.2.36`、`8.3.37`、`8.4.28`、`8.5.13` 四个版本。发布后重新拉取基础镜像,再重建 1Panel 运行环境。
9999

100100
## PHP EOL 源码回补
101101

‎checks/check-php-eol-backport.py‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,19 @@
5656
if not success:
5757
assert 'unsupported baseline' in result.stderr
5858

59+
# PHP 2026-11-19 release metadata, cross-checked against docker-library/php.
60+
security_versions = {
61+
'8.2.36': 'df50a00d2b453096608bf2bd98a9fab9a3df8678a77b93011b65c3cfe9a018fa',
62+
'8.3.37': '0237af84478b7a7649d3964153f1b8653d622550b846f56d63062de683fb86bb',
63+
'8.4.28': '0c8ec360e5dd8154f270b2fd50cd44ecc824e6ee39c85f911312b80d4daecd72',
64+
'8.5.13': '607602acaf0c3061818e9916ec44a058e8b3d43959a83862b9cd3ec7bf5b785f',
65+
}
66+
5967
# Run only the existing workflow's Python assembly, never a Docker/Actions job.
6068
workflow = (root / '.github/workflows/php8-security-release.yml').read_text()
6169
assembly = textwrap.dedent(workflow.split("python3 - <<'PY'\n", 1)[1].split('\n PY', 1)[0])
6270
with tempfile.TemporaryDirectory() as tmp:
63-
for version in ('8.2.35', '8.3.36', '8.4.27', '8.5.12'):
71+
for version, sha256 in security_versions.items():
6472
directory = Path(tmp) / version
6573
directory.mkdir()
6674
env = dict(os.environ, PHP_VERSION=version, RUNNER_TEMP=str(directory))
@@ -69,6 +77,13 @@
6977
assert (context / 'data/rebuild-php-eol').is_file()
7078
assert (context / 'data/prepare-apt').is_file()
7179
assert 'RUN sh /usr/local/bin/rebuild-php-eol' in (context / 'Dockerfile').read_text()
80+
dockerfile = (context / 'Dockerfile').read_text()
81+
assert f'ENV PHP_SHA256="{sha256}"' in dockerfile
82+
assert f'https://www.php.net/distributions/php-{version}.tar.xz' in dockerfile
83+
assert 'gpg --batch --verify php.tar.xz.asc php.tar.xz' in dockerfile
84+
assert f'ENV PHP_VERSION {version}\n' in dockerfile
85+
assert f'PHP_VERSION === "{version}"' in dockerfile
86+
assert f'"{version}"' in workflow.split('phpVersion: [', 1)[1].split(']', 1)[0]
7287
php7 = (root / '.github/workflows/php7-release.yml').read_text()
7388
assert "buildPhp74:\n description: 'Build and publish PHP 7.4'\n type: boolean\n default: true" in php7
7489
assert 'Build PHP-7.4 and Push\n if: ${{ inputs.buildPhp74 }}' in php7
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ ENV PHP_LDFLAGS="-Wl,-O1 -pie"
6060

6161
ENV GPG_KEYS 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A 1198C0117593497A5EC5C199286AF1F9897469DC
6262

63-
ENV PHP_VERSION 8.2.35
64-
ENV PHP_URL="https://www.php.net/distributions/php-8.2.35.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.2.35.tar.xz.asc"
65-
ENV PHP_SHA256="5737b98601fe5ab1b8c5db0c82ed3158acb9283ed3081ffe2faffb9ac81455e6"
63+
ENV PHP_VERSION 8.2.36
64+
ENV PHP_URL="https://www.php.net/distributions/php-8.2.36.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.2.36.tar.xz.asc"
65+
ENV PHP_SHA256="df50a00d2b453096608bf2bd98a9fab9a3df8678a77b93011b65c3cfe9a018fa"
6666

6767
RUN set -eux; \
6868
\
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ ENV PHP_LDFLAGS="-Wl,-O1 -pie"
6060

6161
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC C28D937575603EB4ABB725861C0779DC5C0A9DE4 AFD8691FDAEDF03BDF6E460563F15A9B715376CA
6262

63-
ENV PHP_VERSION 8.3.36
64-
ENV PHP_URL="https://www.php.net/distributions/php-8.3.36.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.3.36.tar.xz.asc"
65-
ENV PHP_SHA256="dd54693aa334c5c4d72e9aee96b082c2473750a18a6c1d105789c93a3b1692fd"
63+
ENV PHP_VERSION 8.3.37
64+
ENV PHP_URL="https://www.php.net/distributions/php-8.3.37.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.3.37.tar.xz.asc"
65+
ENV PHP_SHA256="0237af84478b7a7649d3964153f1b8653d622550b846f56d63062de683fb86bb"
6666

6767
RUN set -eux; \
6868
\
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ ENV PHP_LDFLAGS="-Wl,-O1 -pie"
6060

6161
ENV GPG_KEYS AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6 0616E93D95AF471243E26761770426E17EBBB3DD
6262

63-
ENV PHP_VERSION 8.4.27
64-
ENV PHP_URL="https://www.php.net/distributions/php-8.4.27.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.4.27.tar.xz.asc"
65-
ENV PHP_SHA256="dcf93923b0e38e0d5252b25b796520b5a47761a08b3488b6d0b5d1115764d3f0"
63+
ENV PHP_VERSION 8.4.28
64+
ENV PHP_URL="https://www.php.net/distributions/php-8.4.28.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.4.28.tar.xz.asc"
65+
ENV PHP_SHA256="0c8ec360e5dd8154f270b2fd50cd44ecc824e6ee39c85f911312b80d4daecd72"
6666

6767
RUN set -eux; \
6868
\
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ ENV PHP_LDFLAGS="-Wl,-O1 -pie"
6060

6161
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 49D9AF6BC72A80D6691719C8AA23F5BE9C7097D4 D95C03BC702BE9515344AE3374E44BC9067701A5
6262

63-
ENV PHP_VERSION 8.5.12
64-
ENV PHP_URL="https://www.php.net/distributions/php-8.5.12.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.5.12.tar.xz.asc"
65-
ENV PHP_SHA256="08bc2eba2a588654ade1357174aa646b761556c862dda0678345ee29ed481209"
63+
ENV PHP_VERSION 8.5.13
64+
ENV PHP_URL="https://www.php.net/distributions/php-8.5.13.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-8.5.13.tar.xz.asc"
65+
ENV PHP_SHA256="607602acaf0c3061818e9916ec44a058e8b3d43959a83862b9cd3ec7bf5b785f"
6666

6767
RUN set -eux; \
6868
\

‎php/8/upstream/README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# PHP 8 security source builds
22

3-
These Debian Trixie FPM Dockerfiles build PHP **8.2.35, 8.3.36, 8.4.27 and 8.5.12** from source. They include the fixes for CVE-2026-109618 and CVE-2026-109619 announced in the [PHP security release on 2026-10-21](https://www.php.net/archive/2026.php#2026-10-21-5).
3+
These Debian Trixie FPM Dockerfiles build PHP **8.2.36, 8.3.37, 8.4.28 and 8.5.13** from source. They include the security fixes in the [PHP releases on 2026-11-19](https://www.php.net/archive/2026.php), including the PHP-FPM, session, timezone-cache and backtrace fixes listed in the [PHP changelog](https://www.php.net/ChangeLog-8.php).
44

5-
Source: [docker-library/php PR #1694](https://github.com/docker-library/php/pull/1694), pinned to commit [`f6048b5f6e3c2202ee082665a4ccc0d90de291a3`](https://github.com/docker-library/php/commit/f6048b5f6e3c2202ee082665a4ccc0d90de291a3). The PR was **not merged** when synchronized; its [build CI passed](https://github.com/docker-library/php/actions/runs/39610715899), but that CI does not publish official Docker Hub images. Each version directory contains the unchanged upstream `<minor>/trixie/fpm/Dockerfile`. The shared `docker-php-*` scripts and MIT license also come from that revision.
5+
Source: [docker-library/php](https://github.com/docker-library/php), pinned to security-update commit [`8f7cce49542f60a52d87a852a46a734cc1de78fc`](https://github.com/docker-library/php/commit/8f7cce49542f60a52d87a852a46a734cc1de78fc). Each version directory contains the unchanged upstream `<minor>/trixie/fpm/Dockerfile`. The shared `docker-php-*` scripts and MIT license match that revision. This builds from the official released PHP source without requiring Docker Hub's PHP image publication to finish.
66

77
The source archive SHA256 values match the [PHP downloads page](https://www.php.net/downloads.php?source=Y). Both SHA256 and GPG signature verification remain enabled in the Dockerfiles.
88

99
Run **Build PHP 8 Security Images** (`.github/workflows/php8-security-release.yml`) manually after committing and pushing the workflow to the default branch. It uses the existing `DOCKERHUB_USERNAME` and `DOCKERHUB_PASSWORD` secrets to publish:
1010

11-
- `1panel/php:8.2.35-fpm`
12-
- `1panel/php:8.3.36-fpm`
13-
- `1panel/php:8.4.27-fpm`
14-
- `1panel/php:8.5.12-fpm`
11+
- `1panel/php:8.2.36-fpm`
12+
- `1panel/php:8.3.37-fpm`
13+
- `1panel/php:8.4.28-fpm`
14+
- `1panel/php:8.5.13-fpm`
1515

1616
Each tag includes `linux/amd64`, `linux/arm/v7` and `linux/arm64/v8`. Versions and platform builds run sequentially, with PHP compilation limited to two jobs. This source build does not require the new `php:<version>-fpm` tags to exist on Docker Hub.
1717

0 commit comments

Comments
 (0)