Skip to content

Commit 2be9245

Browse files
committed
integrate zizmor in github actions
1 parent 484d8b7 commit 2be9245

File tree

7 files changed

+44
-1
lines changed

7 files changed

+44
-1
lines changed

.github/workflows/address-sanitizer.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
submodules: true
21+
persist-credentials: false
2122

2223
- name: Set up Python
2324
uses: actions/setup-python@v5

.github/workflows/clang-analyzer.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616
with:
1717
submodules: true
18+
persist-credentials: false
1819

1920
- name: Install clang-tools
2021
run: sudo apt install clang-tools

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ 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.
3031
- run: git checkout HEAD^2
3132
if: ${{ github.event_name == 'pull_request' }}
32-
33+
3334
# Initializes the CodeQL tools for scanning.
3435
- name: Initialize CodeQL
3536
uses: github/codeql-action/init@v3

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- uses: actions/checkout@v4
2323
with:
2424
submodules: true
25+
persist-credentials: false
2526

2627
- name: Set up QEMU
2728
if: runner.os == 'Linux'
@@ -50,6 +51,7 @@ jobs:
5051
- uses: actions/checkout@v4
5152
with:
5253
submodules: true
54+
persist-credentials: false
5355

5456
- name: Build sdist
5557
run: pipx run build --sdist

.github/workflows/test-libmaxminddb.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
uses: actions/checkout@v4
2929
with:
3030
submodules: true
31+
persist-credentials: false
3132

3233
- name: Set up Python ${{ matrix.python-version }}
3334
uses: actions/setup-python@v5

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
uses: actions/checkout@v4
2323
with:
2424
submodules: true
25+
persist-credentials: false
2526

2627
- name: Set up Python ${{ matrix.python-version }}
2728
uses: actions/setup-python@v5

.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)