ci: enable zizmor to fail PRs (#4556)

* ci: enable zizmor to fail PRs

Enable zizmor (gh actions yaml linter) to fail builds in PRs. Fix any
outstanding linting errors found by this tool.

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

* fix outdated version comments

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

---------

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
This commit is contained in:
Will Murphy 2026-01-16 10:49:00 -05:00 committed by GitHub
parent 5987f46353
commit 3e563d90d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 9 deletions

View File

@ -15,6 +15,8 @@ updates:
- package-ecosystem: gomod - package-ecosystem: gomod
directory: "/" directory: "/"
cooldown:
default-days: 7
schedule: schedule:
interval: "weekly" interval: "weekly"
day: "friday" day: "friday"
@ -34,6 +36,8 @@ updates:
directories: directories:
- "/" - "/"
- "/.github/actions/bootstrap" - "/.github/actions/bootstrap"
cooldown:
default-days: 7
schedule: schedule:
interval: "weekly" interval: "weekly"
day: "friday" day: "friday"

View File

@ -47,7 +47,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 #v3.29.5 uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@ -58,7 +58,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 #v3.29.5 uses: github/codeql-action/autobuild@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
@ -72,4 +72,4 @@ jobs:
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 #v3.29.5 uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9

View File

@ -30,6 +30,7 @@ jobs:
- name: "Run zizmor" - name: "Run zizmor"
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0 uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
with: with:
config-file: .github/zizmor.yml config: .github/zizmor.yml
sarif-upload: true # Disable SARIF upload so the step is a simple pass/fail gate
advanced-security: false
inputs: .github inputs: .github

8
.github/zizmor.yml vendored
View File

@ -1,9 +1,9 @@
rules: rules:
unpinned-uses: unpinned-uses:
ignore: config:
# Allow unpinned uses of trusted internal anchore/workflows actions policies:
- update-anchore-dependencies.yml # anchore/workflows is an internal repository; using @main is acceptable
anchore/*: any
dangerous-triggers: dangerous-triggers:
ignore: ignore:
# Safe use of pull_request_target - only runs trusted scripts from base repo, # Safe use of pull_request_target - only runs trusted scripts from base repo,