Skip to content

Commit 5abb8ba

Browse files
committed
Harden existing workflows to pass zizmor (pedantic)
Pin actions to commit SHAs (latest releases), add concurrency limits, and set persist-credentials: false on read-only checkouts.
1 parent adf48db commit 5abb8ba

3 files changed

Lines changed: 26 additions & 8 deletions

File tree

.github/workflows/continuous-integration.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
- push
55
- pull_request
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
permissions:
812
contents: read
913

@@ -34,14 +38,16 @@ jobs:
3438
experimental: false
3539

3640
steps:
37-
- uses: actions/checkout@v6
41+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42+
with:
43+
persist-credentials: false
3844

39-
- uses: shivammathur/setup-php@v2
45+
- uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
4046
with:
4147
php-version: "${{ matrix.php-version }}"
4248
coverage: none
4349

44-
- uses: ramsey/composer-install@v4
50+
- uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
4551
with:
4652
dependency-versions: highest
4753

.github/workflows/lint.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
- push
55
- pull_request
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
permissions:
812
contents: read
913

@@ -20,9 +24,11 @@ jobs:
2024
- "nightly"
2125

2226
steps:
23-
- uses: actions/checkout@v6
27+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
2430

25-
- uses: shivammathur/setup-php@v2
31+
- uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
2632
with:
2733
php-version: "${{ matrix.php-version }}"
2834
coverage: none

.github/workflows/phpstan.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
- push
55
- pull_request
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
permissions:
812
contents: read
913

@@ -20,14 +24,16 @@ jobs:
2024
- "8.3"
2125

2226
steps:
23-
- uses: actions/checkout@v6
27+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
2430

25-
- uses: shivammathur/setup-php@v2
31+
- uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
2632
with:
2733
php-version: "${{ matrix.php-version }}"
2834
coverage: none
2935

30-
- uses: ramsey/composer-install@v4
36+
- uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
3137
with:
3238
dependency-versions: highest
3339

0 commit comments

Comments
 (0)