Skip to content

Commit 2e30838

Browse files
committed
ci: pin GitHub Actions to full commit SHAs
Pins all third-party GitHub Actions from mutable version tags (e.g. @v4, @v5) to exact commit SHAs, following GitHub's security hardening guide and OpenSSF Scorecard recommendations. This prevents silent supply chain attacks if an action's tag is moved to a malicious commit. Each pinned action retains the version tag as a comment for readability. Signed-off-by: El Mehdi Abenhazou <mehdiananas007@gmail.com>
1 parent b5c17e7 commit 2e30838

11 files changed

Lines changed: 36 additions & 36 deletions

.github/workflows/close-needs-feedback.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
pull-requests: write
1717
steps:
1818
- name: Close old issues that need feedback
19-
uses: dwieeb/needs-reply@v2
19+
uses: dwieeb/needs-reply@71e8d5144caa0d4a1e292348bfafa3866d08c855 # v2
2020
with:
2121
repo-token: ${{ secrets.GITHUB_TOKEN }}
2222
issue-label: "Status: Needs Feedback"

.github/workflows/close-stale-feature-requests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
issues: write
1616
pull-requests: write
1717
steps:
18-
- uses: actions/stale@v9
18+
- uses: actions/stale@e42e6681d2906409c5dde4a315af6214eaa890ee # v9
1919
with:
2020
days-before-close: 14
2121
days-before-stale: 90

.github/workflows/close-stale-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
issues: write
1616
pull-requests: write
1717
steps:
18-
- uses: actions/stale@v9
18+
- uses: actions/stale@e42e6681d2906409c5dde4a315af6214eaa890ee # v9
1919
with:
2020
days-before-close: 7
2121
days-before-stale: 60

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
if: github.repository == 'php/php-src'
1818
steps:
1919
- name: git checkout
20-
uses: actions/checkout@v6
20+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
2121
- name: Install dependencies
2222
run: pip install -r docs/requirements.txt
2323
- name: Check formatting
2424
run: make -C docs check-formatting
2525
- name: Publish
2626
if: github.event_name == 'push'
27-
uses: sphinx-notes/pages@v3
27+
uses: sphinx-notes/pages@71e8d5144caa0d4a1e292348bfafa3866d08c855 # v3
2828
with:
2929
checkout: false
3030
documentation_path: docs/source

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
pull-requests: write
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/labeler@v6
15+
- uses: actions/labeler@18f1af5e3544586314bbe15c0273249c770b2daf # v6
1616
with:
1717
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/real-time-benchmark.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,21 @@ jobs:
108108
sudo apt-get update -y
109109
sudo apt-get install -y terraform=1.5.7-*
110110
- name: Checkout benchmark suite
111-
uses: actions/checkout@v6
111+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
112112
with:
113113
repository: 'kocsismate/php-version-benchmarks'
114114
ref: 'main'
115115
fetch-depth: 1
116116
path: 'php-version-benchmarks'
117117
- name: Checkout php-src (benchmarked version)
118-
uses: actions/checkout@v6
118+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
119119
with:
120120
repository: '${{ env.REPOSITORY }}'
121121
ref: '${{ env.COMMIT }}'
122122
fetch-depth: 100
123123
path: 'php-version-benchmarks/tmp/php_${{ env.ID }}'
124124
- name: Checkout php-src (baseline version)
125-
uses: actions/checkout@v6
125+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
126126
with:
127127
repository: '${{ env.REPOSITORY }}'
128128
ref: '${{ env.BASELINE_COMMIT }}'
@@ -136,7 +136,7 @@ jobs:
136136
rm -rf ./php-version-benchmarks/docs/results
137137
- name: Checkout benchmark data
138138
if: github.event_name != 'workflow_dispatch'
139-
uses: actions/checkout@v6
139+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
140140
with:
141141
repository: php/real-time-benchmark-data
142142
ssh-key: ${{ secrets.PHP_VERSION_BENCHMARK_RESULTS_DEPLOY_KEY }}
@@ -285,7 +285,7 @@ jobs:
285285
echo "NEWEST_RESULT_DIRECTORY=$(ls -td ${{ github.workspace }}/php-version-benchmarks/docs/results/${{ env.YEAR }}/*/ | head -1)" >> $GITHUB_ENV
286286
- name: Upload artifacts
287287
id: upload
288-
uses: actions/upload-artifact@v6
288+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
289289
with:
290290
name: results
291291
path: |

.github/workflows/remove-needs-feedback.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
issues: write
1717
pull-requests: write
1818
steps:
19-
- uses: actions-ecosystem/action-remove-labels@v1
19+
- uses: actions-ecosystem/action-remove-labels@f27b608878404679385c85cfa523b85ccb86e213 # v1
2020
with:
2121
labels: "Status: Needs Feedback"
22-
- uses: actions-ecosystem/action-add-labels@v1
22+
- uses: actions-ecosystem/action-add-labels@e79a6962e0d4c0c17b229090214935d2e33f8354 # v1
2323
with:
2424
labels: "Status: Needs Triage"

.github/workflows/test-suite.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: [self-hosted, gentoo, ppc64]
1919
steps:
2020
- name: git checkout
21-
uses: actions/checkout@v6
21+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
2222
with:
2323
ref: ${{ fromJson(inputs.branch).ref }}
2424
- name: System info
@@ -59,7 +59,7 @@ jobs:
5959
image: 'alpine:3.22'
6060
steps:
6161
- name: git checkout
62-
uses: actions/checkout@v6
62+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
6363
with:
6464
ref: ${{ fromJson(inputs.branch).ref }}
6565
- name: apk
@@ -132,7 +132,7 @@ jobs:
132132
runs-on: ubuntu-${{ fromJson(inputs.branch).config.ubuntu_version }}
133133
steps:
134134
- name: git checkout
135-
uses: actions/checkout@v6
135+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
136136
with:
137137
ref: ${{ fromJson(inputs.branch).ref }}
138138
- name: Create MSSQL container
@@ -254,7 +254,7 @@ jobs:
254254
FIREBIRD_PASSWORD: test
255255
steps:
256256
- name: git checkout
257-
uses: actions/checkout@v6
257+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
258258
with:
259259
ref: ${{ fromJson(inputs.branch).ref }}
260260
- name: apt
@@ -311,7 +311,7 @@ jobs:
311311
runs-on: macos-${{ matrix.arch == 'X64' && '15-intel' || fromJson(inputs.branch).jobs.MACOS.config.arm64_version }}
312312
steps:
313313
- name: git checkout
314-
uses: actions/checkout@v6
314+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
315315
with:
316316
ref: ${{ fromJson(inputs.branch).ref }}
317317
- name: Update clang
@@ -388,7 +388,7 @@ jobs:
388388
runs-on: ubuntu-24.04
389389
steps:
390390
- name: git checkout
391-
uses: actions/checkout@v6
391+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
392392
with:
393393
ref: ${{ fromJson(inputs.branch).ref }}
394394
- name: Create MSSQL container
@@ -416,7 +416,7 @@ jobs:
416416
- name: Generate coverage report
417417
if: ${{ !cancelled() }}
418418
run: make gcovr-xml
419-
- uses: codecov/codecov-action@v6
419+
- uses: codecov/codecov-action@5bef64f19d7facfb25b37b414482c7164d639639 # v6
420420
if: ${{ !cancelled() }}
421421
with:
422422
disable_search: true
@@ -438,7 +438,7 @@ jobs:
438438
USE_TRACKED_ALLOC: 1
439439
steps:
440440
- name: git checkout
441-
uses: actions/checkout@v6
441+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
442442
with:
443443
ref: ${{ fromJson(inputs.branch).ref }}
444444
- name: apt
@@ -644,7 +644,7 @@ jobs:
644644
runs-on: ubuntu-${{ fromJson(inputs.branch).config.ubuntu_version }}
645645
steps:
646646
- name: git checkout
647-
uses: actions/checkout@v6
647+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
648648
with:
649649
ref: ${{ fromJson(inputs.branch).ref }}
650650
- name: Create MSSQL container
@@ -707,7 +707,7 @@ jobs:
707707
runs-on: ubuntu-${{ fromJson(inputs.branch).config.ubuntu_version }}
708708
steps:
709709
- name: git checkout
710-
uses: actions/checkout@v6
710+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
711711
with:
712712
ref: ${{ fromJson(inputs.branch).ref }}
713713
- name: apt
@@ -798,7 +798,7 @@ jobs:
798798
runs-on: ubuntu-${{ fromJson(inputs.branch).config.ubuntu_version }}
799799
steps:
800800
- name: git checkout
801-
uses: actions/checkout@v6
801+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
802802
with:
803803
ref: ${{ fromJson(inputs.branch).ref }}
804804
- name: apt
@@ -851,7 +851,7 @@ jobs:
851851
- name: git config
852852
run: git config --global core.autocrlf false && git config --global core.eol lf
853853
- name: git checkout
854-
uses: actions/checkout@v6
854+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
855855
with:
856856
ref: ${{ fromJson(inputs.branch).ref }}
857857
- name: Setup
@@ -870,7 +870,7 @@ jobs:
870870
timeout-minutes: 50
871871
steps:
872872
- name: git checkout
873-
uses: actions/checkout@v6
873+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
874874
with:
875875
ref: ${{ fromJson(inputs.branch).ref }}
876876
- name: FreeBSD
@@ -886,7 +886,7 @@ jobs:
886886
timeout-minutes: 50
887887
steps:
888888
- name: git checkout
889-
uses: actions/checkout@v5
889+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v5
890890
with:
891891
ref: ${{ fromJson(inputs.branch).ref }}
892892
- name: Solaris
@@ -901,7 +901,7 @@ jobs:
901901
timeout-minutes: 50
902902
steps:
903903
- name: git checkout
904-
uses: actions/checkout@v6
904+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
905905
with:
906906
ref: ${{ fromJson(inputs.branch).ref }}
907907
fetch-depth: 0
@@ -963,7 +963,7 @@ jobs:
963963
mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
964964
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
965965
- name: git checkout benchmarking-data
966-
uses: actions/checkout@v6
966+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
967967
with:
968968
repository: php/benchmarking-data
969969
ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}
@@ -994,7 +994,7 @@ jobs:
994994
${{ github.sha }} \
995995
${{ github.event.pull_request.base.sha }} \
996996
> $GITHUB_STEP_SUMMARY
997-
- uses: actions/upload-artifact@v6
997+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
998998
with:
999999
name: profiles
10001000
path: ${{ github.workspace }}/benchmark/profiles

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ jobs:
4040
all_variations: ${{ steps.set-matrix.outputs.all_variations }}
4141
branches: ${{ steps.set-matrix.outputs.branches }}
4242
steps:
43-
- uses: actions/checkout@v6
43+
- uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
4444
with:
4545
# When running nightly, set fetch-depth to 0 to clone the full
4646
# repository including all branches. This is required to find the
4747
# correct commit hashes.
4848
fetch-depth: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && '0' || '1' }}
4949
- name: Grab the commit mapping
5050
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
51-
uses: actions/cache@v5
51+
uses: actions/cache@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
5252
with:
5353
path: branch-commit-cache.json
5454
# The cache key needs to change every time for the

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
timeout-minutes: 20
3636
steps:
3737
- name: git checkout
38-
uses: actions/checkout@v6
38+
uses: actions/checkout@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v6
3939

4040
- name: Install dependencies
4141
run: |
@@ -53,7 +53,7 @@ jobs:
5353
ccache
5454
5555
- name: ccache
56-
uses: hendrikmuhs/ccache-action@v1.2
56+
uses: hendrikmuhs/ccache-action@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.2
5757
with:
5858
key: "unit-tests-${{hashFiles('main/php_version.h')}}"
5959
append-timestamp: false

0 commit comments

Comments
 (0)