ci: pin third-party action dependencies to commit hashes

This improves CI security by ensuring that action dependencies cannot be
changed by upstream repositories without updating the use of the
dependency in this repo.

Official GitHub-maintained actions are excluded from this requirement
and are left pinned by a tag instead of a commit hash. This action
dependency pinning policy is codified in `.github/zizmor.yml` so that
Zizmor (a static analysis tool for GitHub Actions) doesn't flag these as
unpinned dependencies.

Also add cooldown timer for Dependabot. This fixes these two Zizmor
audits:
* https://docs.zizmor.sh/audits/#dependabot-cooldown
* https://docs.zizmor.sh/audits/#unpinned-uses
This commit is contained in:
Daniel Hast
2026-03-07 14:29:15 -05:00
parent 9734a6ce47
commit d1314018cc
5 changed files with 13 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ jobs:
- name: Create backport PR
id: backport
uses: korthout/backport-action@v4
uses: korthout/backport-action@4aaf0e03a94ff0a619c9a511b61aeb42adea5b02 # v4.2.0
with:
pull_title: "${pull_title}"
label_pattern: "^ci:backport ([^ ]+)$"

View File

@@ -236,7 +236,7 @@ jobs:
OPTS: -Doptimize=ReleaseSafe
steps:
- uses: actions/checkout@v6
- uses: mlugg/setup-zig@v2
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.15.2
- run: sudo apt-get install -y inotify-tools
@@ -256,7 +256,7 @@ jobs:
name: build using zig build (macos 15)
steps:
- uses: actions/checkout@v6
- uses: mlugg/setup-zig@v2
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.15.2
@@ -270,7 +270,7 @@ jobs:
name: build using zig build (windows)
steps:
- uses: actions/checkout@v6
- uses: mlugg/setup-zig@v2
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.15.2

View File

@@ -66,7 +66,7 @@ jobs:
exit $exitCode
- if: ${{ matrix.test == 'old' }}
uses: msys2/setup-msys2@v2
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
with:
update: true
install: unzip