Skip to content

Commit 5a64ef0

Browse files
committed
integrate zizmor in github actions
1 parent 36e7226 commit 5a64ef0

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

Diff for: .github/workflows/clang-addresssanitizer.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- uses: actions/checkout@v4
2020
with:
2121
submodules: true
22+
persist-credentials: false
2223
- run: sudo apt install clang libipc-run3-perl
2324
- run: ./bootstrap
2425
- run: ./configure

Diff for: .github/workflows/clang-analyzer.yml

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
1315
- run: sudo apt install clang-tools libipc-run3-perl
1416
- run: ./bootstrap
1517
- run: scan-build ./configure

Diff for: .github/workflows/codeql-analysis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
# a pull request then we can checkout the head.
2525
fetch-depth: 2
2626
submodules: true
27+
persist-credentials: false
2728

2829
# If this run was triggered by a pull request event, then checkout
2930
# the head of the pull request instead of the merge commit.

Diff for: .github/workflows/test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121
with:
2222
submodules: true
23+
persist-credentials: false
2324
- run: sudo apt install libipc-run3-perl
2425
if: ${{ matrix.os == 'ubuntu-latest' }}
2526
- run: brew install autoconf automake libtool
@@ -41,6 +42,7 @@ jobs:
4142
- uses: actions/checkout@v4
4243
with:
4344
submodules: true
45+
persist-credentials: false
4446
- run: cmake -DBUILD_TESTING=ON .
4547
- run: cmake --build .
4648
- run: ctest -V . -C Debug

Diff for: .github/workflows/zizmor.yml

+36
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)