Skip to content

Commit 3c26ec7

Browse files
committed
Fix hardened workflow checks
1 parent 82c1c83 commit 3c26ec7

3 files changed

Lines changed: 32 additions & 4 deletions

File tree

.github/workflows/mutation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
services:
4343
postgres:
44-
image: postgres:17
44+
image: postgres:17 # zizmor: ignore[unpinned-images]
4545
env:
4646
POSTGRES_USER: root
4747
POSTGRES_PASSWORD: root

.github/workflows/rector-cs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ on:
1111
- '.php-cs-fixer.dist.php'
1212

1313
permissions:
14-
contents: write
14+
contents: read
1515

1616
concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: true
1919

2020
jobs:
2121
rector:
22+
permissions:
23+
contents: write # Required to commit automated Rector and CS fixes.
2224
uses: yiisoft/actions/.github/workflows/rector-cs.yml@master
2325
with:
2426
php: '8.1'

.github/workflows/zizmor.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: GitHub Actions Security Analysis with zizmor 🌈
1+
name: GitHub Actions Security Analysis with zizmor
22

33
on:
44
push:
@@ -15,4 +15,30 @@ permissions:
1515

1616
jobs:
1717
zizmor:
18-
uses: yiisoft/actions/.github/workflows/zizmor.yml@master
18+
name: Run zizmor
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
23+
with:
24+
persist-credentials: false
25+
26+
- name: Create zizmor configuration
27+
run: |
28+
cat > .zizmor-shared.yml <<'YAML'
29+
rules:
30+
unpinned-uses:
31+
config:
32+
policies:
33+
"yiisoft/*": any
34+
YAML
35+
36+
- name: Run zizmor
37+
uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6
38+
with:
39+
advanced-security: false
40+
annotations: true
41+
config: .zizmor-shared.yml
42+
inputs: .github
43+
min-severity: high
44+
persona: 'pedantic'

0 commit comments

Comments
 (0)