@@ -16,6 +16,9 @@ concurrency:
1616 group : extract-identifiers-${{ github.ref }} # will be canceled on subsequent pushes
1717 cancel-in-progress : true
1818
19+ permissions :
20+ contents : read
21+
1922jobs :
2023 extract :
2124 name : " Extract identifiers"
@@ -38,23 +41,28 @@ jobs:
3841 - " phpstan/phpstan-mockery"
3942
4043 steps :
44+ - name : Harden the runner (Audit all outbound calls)
45+ uses : step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
46+ with :
47+ egress-policy : audit
48+
4149 - name : " Checkout"
42- uses : actions/checkout@v4
50+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4351
4452 - name : " Checkout"
45- uses : actions/checkout@v4
53+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4654 with :
4755 repository : ${{ matrix.repository }}
4856 path : " identifier-extractor/repo"
4957
5058 - name : " Install PHP"
51- uses : " shivammathur/setup-php@v2 "
59+ uses : " shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 " # v2
5260 with :
5361 coverage : " none"
5462 php-version : " 8.1"
5563
5664 - name : " Install Extractor dependencies"
57- uses : " ramsey/composer-install@v3 "
65+ uses : " ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 " # v3
5866 with :
5967 working-directory : " identifier-extractor"
6068
@@ -74,35 +82,42 @@ jobs:
7482 REPO : ${{ matrix.repository }}
7583 BRANCH : ${{ steps.branch-name.outputs.name }}
7684
77- - uses : actions/upload-artifact@v4
85+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7886 with :
7987 name : identifiers-${{ steps.repo-name.outputs.name }}
8088 path : identifier-extractor/${{ steps.repo-name.outputs.name }}.json
8189
8290 merge :
91+ permissions :
92+ contents : write # for stefanzweifel/git-auto-commit-action to push code in repo
8393 name : " Merge and commit identifiers"
8494 needs : extract
8595
8696 runs-on : " ubuntu-latest"
8797
8898 steps :
99+ - name : Harden the runner (Audit all outbound calls)
100+ uses : step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
101+ with :
102+ egress-policy : audit
103+
89104 - name : " Checkout"
90- uses : actions/checkout@v4
105+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
91106 with :
92107 token : ${{ secrets.PHPSTAN_BOT_TOKEN }}
93108
94109 - name : " Install PHP"
95- uses : " shivammathur/setup-php@v2 "
110+ uses : " shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 " # v2
96111 with :
97112 coverage : " none"
98113 php-version : " 8.1"
99114
100115 - name : " Install Extractor dependencies"
101- uses : " ramsey/composer-install@v3 "
116+ uses : " ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 " # v3
102117 with :
103118 working-directory : " identifier-extractor"
104119
105- - uses : actions/download-artifact@v4
120+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
106121 with :
107122 pattern : identifiers-*
108123 path : identifier-extractor/tmp
@@ -112,7 +127,7 @@ jobs:
112127 run : " php merge.php > ../website/src/errorsIdentifiers.json"
113128
114129 - name : Import GPG key
115- uses : crazy-max/ghaction-import-gpg@v6
130+ uses : crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
116131 with :
117132 gpg_private_key : ${{ secrets.GPG_PHPSTANBOT_PRIVATE_KEY }}
118133 passphrase : ${{ secrets.GPG_PHPSTANBOT_KEY_PASSPHRASE }}
@@ -121,7 +136,7 @@ jobs:
121136 git_commit_gpgsign : true
122137
123138 - name : " Commit changes"
124- uses : " stefanzweifel/git-auto-commit-action@v5 "
139+ uses : " stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 " # v5.2.0
125140 id : " commit"
126141 with :
127142 commit_message : " Update errors identifiers"
0 commit comments