Skip to content

Commit 5e62127

Browse files
authored
ci: add zizmor (#1232)
1 parent 4150285 commit 5e62127

7 files changed

Lines changed: 50 additions & 1 deletion

File tree

.github/workflows/ci-rsc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
28+
with:
29+
persist-credentials: false
2830
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
2931
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3032
with:
@@ -60,6 +62,8 @@ jobs:
6062
fail-fast: false
6163
steps:
6264
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
65+
with:
66+
persist-credentials: false
6367
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
6468
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
6569
with:

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
steps:
4343
- name: Checkout
4444
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
45+
with:
46+
persist-credentials: false
4547

4648
- name: Install pnpm
4749
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
@@ -101,6 +103,7 @@ jobs:
101103
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
102104
with:
103105
fetch-depth: 0
106+
persist-credentials: false
104107

105108
- name: Install pnpm
106109
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
23+
with:
24+
persist-credentials: false
2325
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
2426
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2527
with:

.github/workflows/publish.yml

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

1921
- name: Install pnpm
2022
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
@@ -55,7 +57,7 @@ jobs:
5557
run: pnpm build
5658

5759
- name: Publish package
58-
run: npm i -g npm@^11.5.2 && pnpm run ci-publish ${{ github.ref_name }}
60+
run: npm i -g npm@^11.5.2 && pnpm run ci-publish "$GITHUB_REF_NAME"
5961

6062
- if: steps.tag.outputs.isAlpha == 'false' && steps.tag.outputs.pkgName != 'plugin-rsc'
6163
uses: ArnaudBarre/github-release@4fa6eafe8e2449c7c1c5a91ae50de4ee34db0b40 # v1.5.0

.github/workflows/release-continuous.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
steps:
2020
- name: Checkout code
2121
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
22+
with:
23+
persist-credentials: false
2224

2325
- name: Install pnpm
2426
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
@@ -39,4 +41,5 @@ jobs:
3941
run: pnpm build
4042

4143
- name: Publish
44+
# zizmor: ignore[use-trusted-publishing]
4245
run: pnpm dlx pkg-pr-new@0.0 publish --pnpm --compact './packages/*' './packages/plugin-react-swc/dist'

.github/workflows/semantic-pull-request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Semantic Pull Request
22

33
on:
4+
# zizmor: ignore[dangerous-triggers]
5+
# SAFETY: pull_request_target is used here because:
6+
# - The workflow does NOT check out PR code
7+
# - Only PR title is read
8+
# - No PR-supplied code is executed
49
pull_request_target:
510
types:
611
- opened

.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@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3

0 commit comments

Comments
 (0)