Skip to content

Commit f727097

Browse files
authored
Merge pull request #116 from planetscale/joem/zizmor-lints
zizmor GHA linting
2 parents 568e025 + 4e8a65a commit f727097

File tree

6 files changed

+46
-1
lines changed

6 files changed

+46
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
21+
with:
22+
persist-credentials: false
2123

2224
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
2325
with:

.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
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
2223
with:

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727
fetch-tags: true
28+
persist-credentials: false
2829

2930
- name: install autotag binary
3031
run: |

.github/workflows/update-data.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2121
with:
2222
ref: ${{ github.head_ref }}
23+
persist-credentials: false
2324

2425
- name: Setup Go
2526
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
@@ -66,7 +67,7 @@ jobs:
6667
name: Commit any changes
6768
uses: planetscale/ghcommit-action@d4176bfacef926cc2db351eab20398dfc2f593b5 # v0.2.0
6869
with:
69-
commit_message: 🤖 upate cloud provider IP ranges ${{ steps.create-branch.outputs.timestamp }}
70+
commit_message: 🤖 update cloud provider IP ranges ${{ steps.create-branch.outputs.timestamp }}
7071
repo: ${{ github.repository }}
7172
branch: ${{ steps.create-branch.outputs.branch }}
7273
env:

.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

zizmor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
rules:
2+
template-injection:
3+
ignore:
4+
- update-data.yaml:77:9

0 commit comments

Comments
 (0)