Skip to content

Commit 7dff9c6

Browse files
authored
Merge pull request #15 from planetscale/joem/zizmor-lints
zizmor GHA linting
2 parents 90e69d5 + 981a0ac commit 7dff9c6

File tree

5 files changed

+47
-18
lines changed

5 files changed

+47
-18
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
18+
with:
19+
persist-credentials: false
20+
1821
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
1922
with:
2023
go-version-file: go.mod
@@ -27,6 +30,9 @@ jobs:
2730
runs-on: ubuntu-latest
2831
steps:
2932
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
33+
with:
34+
persist-credentials: false
35+
3036
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
3137
with:
3238
go-version-file: go.mod

.github/workflows/licensing.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1818
with:
1919
fetch-depth: 0
20+
persist-credentials: false
2021

2122
- run: sudo gem install license_finder
2223
- run: license_finder

.github/workflows/release.yaml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3131
with:
3232
fetch-depth: 0
33+
persist-credentials: false
3334

3435
- name: Calculate new version with autotag
3536
id: autotag
@@ -42,25 +43,8 @@ jobs:
4243
4344
- name: Set up Docker Buildx
4445
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
45-
46-
- name: Cache
47-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
48-
id: cache
49-
with:
50-
path: |
51-
go-pkg-mod
52-
go-build
53-
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }}-v2
54-
55-
- name: inject go caches into docker
56-
uses: reproducible-containers/buildkit-cache-dance@5b6db76d1da5c8b307d5d2e0706d266521b710de # v3.1.2
5746
with:
58-
cache-map: |
59-
{
60-
"go-pkg-mod": "/go/pkg/mod",
61-
"go-build": "/root/.cache/go-build"
62-
}
63-
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
47+
cache-binary: false
6448

6549
- name: Build and push
6650
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6

.github/workflows/validate-renovate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16+
with:
17+
persist-credentials: false
1618

1719
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
1820
with:

.github/workflows/zizmor.yaml

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
21+
with:
22+
persist-credentials: false
23+
24+
- name: Install the latest version of uv
25+
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # 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@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3
34+
with:
35+
sarif_file: results.sarif
36+
category: zizmor

0 commit comments

Comments
 (0)