Skip to content

Commit 841daec

Browse files
committed
ci: pin third-party actions to commit SHAs in qa workflow
Replaces tag references (@v2, @V3, @main) with full commit SHAs and a trailing version comment for every third-party action and reusable workflow. Mitigates tag-rewriting attacks against popular GitHub Actions. First-party actions (actions/checkout, actions/setup-node) are left at tag references since GitHub controls those repos.
1 parent 838fc71 commit 841daec

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/qa.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v6
2020
- id: versions
21-
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
21+
uses: WyriHaximus/github-action-composer-php-versions-in-range@7c91c459140becf43d93d3975070f308ab791949 # v1.16.2
2222
with:
2323
upcomingReleases: true
2424

@@ -31,11 +31,11 @@ jobs:
3131
php: ${{ fromJson(needs.php-versions.outputs.versions) }}
3232
steps:
3333
- uses: actions/checkout@v6
34-
- uses: shivammathur/setup-php@v2
34+
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
3535
with:
3636
php-version: ${{ matrix.php }}
3737
coverage: none
38-
- uses: ramsey/composer-install@v3
38+
- uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # 3.2.1
3939
- run: composer test:unit
4040

4141
integration-tests:
@@ -59,11 +59,11 @@ jobs:
5959
name: PHP ${{ matrix.php }} | WP ${{ matrix.wp }} | ${{ matrix.suite }}
6060
steps:
6161
- uses: actions/checkout@v6
62-
- uses: shivammathur/setup-php@v2
62+
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
6363
with:
6464
php-version: ${{ matrix.php }}
6565
coverage: none
66-
- uses: ramsey/composer-install@v3
66+
- uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # 3.2.1
6767
- run: composer ${{ matrix.suite }}
6868
env:
6969
WP_VERSION: ${{ matrix.wp }}
@@ -72,11 +72,11 @@ jobs:
7272
runs-on: ubuntu-latest
7373
steps:
7474
- uses: actions/checkout@v6
75-
- uses: shivammathur/setup-php@v2
75+
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
7676
with:
7777
php-version: '8.2'
7878
coverage: pcov
79-
- uses: ramsey/composer-install@v3
79+
- uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # 3.2.1
8080
- name: Coverage (core)
8181
run: php -d pcov.enabled=1 vendor/bin/phpunit --testsuite=unit,integration --coverage-php=build/coverage-core.cov
8282
- name: Coverage (polylang)
@@ -91,14 +91,14 @@ jobs:
9191
run: |
9292
composer require --dev phpunit/phpcov --quiet
9393
vendor/bin/phpcov merge build --clover build/coverage.xml
94-
- uses: codecov/codecov-action@v5
94+
- uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
9595
with:
9696
files: build/coverage.xml
9797
env:
9898
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9999

100100
static-analysis:
101-
uses: inpsyde/reusable-workflows/.github/workflows/static-analysis-php.yml@main
101+
uses: inpsyde/reusable-workflows/.github/workflows/static-analysis-php.yml@6bbc8c9422de0f685b71cfb8f9cddd2b591e2c50 # main as of 2026-05-08
102102

103103
coding-standards:
104-
uses: inpsyde/reusable-workflows/.github/workflows/coding-standards-php.yml@main
104+
uses: inpsyde/reusable-workflows/.github/workflows/coding-standards-php.yml@6bbc8c9422de0f685b71cfb8f9cddd2b591e2c50 # main as of 2026-05-08

0 commit comments

Comments
 (0)