security: pin all GitHub Actions to commit SHAs (GHSA-f9f8-rm49-7jv2)#185
Merged
Conversation
- Update shivammathur/setup-php to accd6127 (v2, post Composer 2.9.8 fix) - Add tools: composer:v2 to phpcs workflow to enforce patched Composer - Add permissions: contents: read to magento-compatibility workflow - Pin actions/checkout, actions/cache, actions/labeler, googleapis/release-please-action to verified commit SHAs
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the repository’s GitHub Actions workflows by pinning third-party actions to immutable commit SHAs (mitigating supply-chain risk related to GHSA-f9f8-rm49-7jv2) and ensuring workflows use a patched Composer version where relevant.
Changes:
- Pin commonly used actions (checkout/cache/labeler/release-please) to specific commit SHAs instead of floating tags.
- Update
shivammathur/setup-phpto a specific v2 commit SHA across workflows. - Ensure PHPCS runs with Composer v2 and tighten workflow permissions for Magento compatibility checks.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/release-please.yml | Pins googleapis/release-please-action to a commit SHA while retaining required write permissions. |
| .github/workflows/phpstan.yml | Pins actions/checkout, actions/cache, and setup-php to SHAs for deterministic CI runs. |
| .github/workflows/phpcs.yml | Pins actions and explicitly installs Composer v2 via setup-php tools configuration. |
| .github/workflows/magento-compatibility.yml | Adds contents: read permissions and updates setup-php to the pinned v2 commit SHA. |
| .github/workflows/label.yml | Pins actions/labeler to a commit SHA. |
| .github/workflows/functional-tests.yml | Updates setup-php to the pinned v2 commit SHA for consistent CI toolchain behavior. |
Morgy93
previously approved these changes
May 13, 2026
Morgy93
approved these changes
May 13, 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.
This pull request updates several GitHub Actions workflows to improve reliability, security, and keep dependencies up to date. The main changes include pinning action versions to specific commit hashes, updating Magento and PHP versions in compatibility tests, and improving health checks for MySQL in functional tests.
Workflow dependency and security improvements:
actions/checkout,shivammathur/setup-php,actions/cache,actions/labeler,googleapis/release-please-action) are now pinned to specific commit hashes for better security and reproducibility. [1] [2] [3] [4] [5] [6]Magento compatibility matrix updates:
.github/workflows/magento-compatibility.ymlto"2.4.7-p10","2.4.8-p5", and"2.4.9", and corresponding PHP versions, ensuring the workflow tests against the latest supported versions.Functional test reliability:
.github/workflows/functional-tests.ymlby making the health command more robust, increasing the number of retries, and adding a start period to reduce flakiness.General workflow improvements:
permissionsfor themagento-compatibility.ymlworkflow to follow GitHub best practices.PHP tooling setup enhancements:
composer:v2is always installed with PHP setup steps in relevant workflows. [1] [2]