Skip to content

Commit 7bec72b

Browse files
authored
Adopt zizmor GitHub Actions security scanning tool (#60)
1 parent e683098 commit 7bec72b

File tree

5 files changed

+42
-4
lines changed

5 files changed

+42
-4
lines changed

.github/workflows/check-dist.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
- name: Checkout
3535
id: checkout
3636
uses: actions/checkout@v4
37+
with:
38+
persist-credentials: false
3739

3840
- name: Setup Node.js
3941
id: setup-node

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
- name: Checkout
2626
id: checkout
2727
uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
2830

2931
- name: Setup Node.js
3032
id: setup-node

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
2123
- uses: actions/setup-python@v5
2224
- uses: pre-commit/[email protected]
2325
with:

.github/workflows/update-action-tag.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ name: Update Tag
33
on:
44
workflow_dispatch:
55

6-
permissions:
7-
contents: write
8-
id-token: write
9-
106
jobs:
117
update-tag:
128
name: Update Tag
139
runs-on: ubuntu-latest
1410
environment: release
11+
permissions:
12+
contents: write
13+
id-token: write
1514

1615
steps:
1716
- uses: actions/create-github-app-token@v1
@@ -23,6 +22,7 @@ jobs:
2322
- uses: actions/checkout@v4
2423
with:
2524
token: ${{ steps.app-token.outputs.token }}
25+
persist-credentials: false
2626

2727
- name: Setup
2828
uses: ./setup

.github/workflows/zizmor.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
jobs:
10+
zizmor:
11+
name: zizmor latest via Cargo
12+
runs-on: ubuntu-latest
13+
permissions:
14+
security-events: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
20+
- name: Setup Rust
21+
uses: actions-rust-lang/setup-rust-toolchain@v1
22+
- name: Get zizmor
23+
run: cargo install zizmor
24+
- name: Run zizmor 🌈
25+
run: zizmor --format sarif . > results.sarif
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Upload SARIF file
29+
uses: github/codeql-action/upload-sarif@v3
30+
with:
31+
sarif_file: results.sarif
32+
category: zizmor

0 commit comments

Comments
 (0)