Skip to content

Commit 7b5f27f

Browse files
authored
ci: add zizmor (#125)
1 parent 0e1deca commit 7b5f27f

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
- name: Checkout repository
1717
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
18+
with:
19+
persist-credentials: false
1820

1921
- name: Setup pnpm
2022
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
@@ -26,7 +28,8 @@ jobs:
2628
with:
2729
node-version: 24
2830
registry-url: https://registry.npmjs.org
29-
cache: pnpm
31+
# disable cache, to avoid cache poisoning (https://docs.zizmor.sh/audits/#cache-poisoning)
32+
package-manager-cache: false
3033

3134
- name: Install dependencies
3235
run: pnpm install --frozen-lockfile

.github/workflows/zizmor.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Zizmor
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- '.github/workflows/**'
11+
12+
permissions: {}
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: ${{ github.ref_name != 'main' }}
17+
18+
jobs:
19+
zizmor:
20+
name: Run zizmor
21+
runs-on: ubuntu-latest
22+
permissions:
23+
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
24+
steps:
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
26+
with:
27+
persist-credentials: false
28+
29+
- name: Run zizmor 🌈
30+
uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6

0 commit comments

Comments
 (0)