Skip to content

Commit 4c69881

Browse files
authored
Merge pull request maxmind#185 from maxmind/nobeid/github-actions-zizmor
integrate zizmor in github actions
2 parents 2bf351e + 69edc31 commit 4c69881

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ jobs:
2323
# We must fetch at least the immediate parents so that if this is
2424
# a pull request then we can checkout the head.
2525
fetch-depth: 2
26+
persist-credentials: false
2627

2728
# If this run was triggered by a pull request event, then checkout
2829
# the head of the pull request instead of the merge commit.
2930
- run: git checkout HEAD^2
3031
if: ${{ github.event_name == 'pull_request' }}
31-
32+
3233
# Initializes the CodeQL tools for scanning.
3334
- name: Initialize CodeQL
3435
uses: github/codeql-action/init@v3

.github/workflows/release.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: Build
2324
run: pipx run build

.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: 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 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+
with:
27+
enable-cache: false
28+
29+
- name: Run zizmor
30+
run: uvx zizmor --format plain .
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)