Skip to content

Commit 68ca4f0

Browse files
committed
Fix hardened workflow checks
1 parent eefd163 commit 68ca4f0

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:
@@ -19,4 +19,30 @@ permissions:
1919

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

0 commit comments

Comments
 (0)