Repository navigation
Retire the PHP release workflow's tag trigger (#1002) - #1004
Merged
Merged
Conversation
PHP Server 2.11.8 is the final PHP release, but release.yml still started on 2.x tags and its publish job held the Docker Hub and GHCR logins and contents: write. A runner keeps every secret a job references in memory, so the boundary is whether the job runs at all. Remove the push trigger and make the publish job `if: false`: a skipped job starts no runner and loads none of its secrets or write permissions. publish-chart already needs publish to succeed, so it is skipped too. workflow_dispatch stays only because a workflow needs a trigger; the file remains as the reviewed record its contract tests read. check-native-release-tags.sh and the release contract test now require exactly that: no push trigger and a publish job that never runs. Against main's release.yml the check fails on the push trigger, and it fails again if only the publish job becomes runnable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Member
Author
|
General interim review (Security unavailable): exact head The diff is 3 files, one commit on main.
Fixes #1002. Merge only this SHA and post the readback. |
Member
Author
|
Merge readback for General's interim review (Security unavailable).
The retired PHP |
This was referenced Nov 4, 2026
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.



Review tier A: CI trust. It changes a privileged release workflow and the check that guards it.
Fixes #1002, from General's release-credential audit.
Problem
PHP Server 2.11.8 is the final PHP release. Even so,
release.ymlstill started on'[0-2].[0-9]+.[0-9]+*'tags. Itspublishjob, in thedockerhubenvironment, held the Docker Hub and GHCR logins withcontents: writeandpackages: write.A runner keeps every secret a job references in memory, so step scoping isn't a boundary. Whether the job runs at all is the boundary.
Change
.github/workflows/release.yml:push: tagstrigger is removed, so no tag of any kind starts the workflow.publishjob is nowif: false. A skipped job starts no runner, so none of its secrets or write permissions are ever loaded.publish-chartalready requiresneeds.publish.result == 'success', so it is skipped too. Its condition is unchanged.workflow_dispatchstays only because a workflow needs a trigger. A dispatch produces skipped jobs and nothing else.scripts/ci/check-native-release-tags.sh: it used to require push-tag patterns matching plain 2.x versions and no native tags. It now requires that the retired workflow has exactly one trigger,workflow_dispatch, and thatpublishisif: false.tests/Unit/ReleaseImagePublishWorkflowContractTest.php: it asserts the same,jobs.publish.if === falseand triggers['workflow_dispatch'], in place of the old dispatch-or-tag condition.The optional native hardening from the issue (a credential-free OCI build, then a login-only copy) is a separate change and not in this PR.
Checked
check-native-release-tags.sh: passes on this head. Two counterfactuals fail it as expected:release.ymlfails with "must have only workflow_dispatch, not: push workflow_dispatch";publishrunnable fails with "publish job must be if: false".baseimage in a bounded container (2 CPU / 2 GiB / 512 pids, source read-only), on 145 tests across the four release-workflow contract classes:jqin that image, among others). CI's runner has them.test_release_publish_job_is_guarded_before_registry_login, the test changed here, passes; the branch runs one more assertion than main (1567 vs 1566).🤖 Generated with Claude Code