Skip to content

Commit 60b1337

Browse files
authored
Merge pull request #82 from maxmind/nobeid/github-actions-zizmor
integrate zizmor in github actions
2 parents e4ea4e2 + 5420b66 commit 60b1337

File tree

6 files changed

+39
-0
lines changed

6 files changed

+39
-0
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
# We must fetch at least the immediate parents so that if this is
2121
# a pull request then we can checkout the head.
2222
fetch-depth: 2
23+
persist-credentials: false
2324

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

.github/workflows/go.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
uses: actions/checkout@v4
2727
with:
2828
submodules: true
29+
persist-credentials: false
2930

3031
- name: Get dependencies
3132
run: go get -v -t -d ./...

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
1517
- name: golangci-lint
1618
uses: golangci/golangci-lint-action@v6
1719
with:

.github/workflows/modver.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
fetch-depth: 0
18+
persist-credentials: false
1819
- uses: bobg/[email protected]
1920
with:
2021
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

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

2627
- name: Set up Go
2728
uses: actions/setup-go@v5
2829
with:
2930
go-version: stable
31+
cache: false
3032

3133
- name: Run GoReleaser
3234
uses: goreleaser/goreleaser-action@v6

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