Skip to content

Commit 07dfa31

Browse files
committed
integrate zizmor in github actions
1 parent 1854f57 commit 07dfa31

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ jobs:
1919
id-token: write
2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
2224
- name: Set up Ruby
2325
uses: ruby/setup-ruby@v1
2426
with:
25-
bundler-cache: true
2627
ruby-version: ruby
2728

2829
- uses: rubygems/release-gem@v1

.github/workflows/rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
1416
- uses: ruby/setup-ruby@v1
1517
with:
1618
ruby-version: 3.4

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- uses: actions/checkout@v4
3030
with:
3131
submodules: true
32+
persist-credentials: false
3233
- uses: ruby/setup-ruby@v1
3334
with:
3435
ruby-version: ${{ matrix.version }}

.github/workflows/zizmor.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 PyPI
12+
runs-on: ubuntu-latest
13+
permissions:
14+
security-events: write
15+
# required for workflows in private repositories
16+
contents: read
17+
actions: read
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
24+
- name: Install the latest version of uv
25+
uses: astral-sh/setup-uv@v5
26+
27+
- name: Run zizmor
28+
run: uvx zizmor --format sarif . > results.sarif
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Upload SARIF file
33+
uses: github/codeql-action/upload-sarif@v3
34+
with:
35+
sarif_file: results.sarif
36+
category: zizmor

0 commit comments

Comments
 (0)