Lock Your GitHub Actions
Points and comments are a snapshot, not live.
GitHub Actions now supports workflow lockfiles to prevent supply-chain attacks from mutable tags.
GitHub Actions lockfiles are generally available, allowing users to replace SHA-pinned actions with version tags while storing the resolved commit hash in a generated .github/workflows/actions.lock file. The gh-actions-lock CLI extension automates conversion. Dependabot and Renovate support updating the lockfile. GitHub recommends verifying lockfiles in CI. The zizmor security linter v1.32.0 now supports lockfiles. The feature locks direct and transitive action dependencies, addressing a major supply-chain security gap.
What commenters are saying
Several commenters initially missed that lockfiles handle transitive dependencies, the key improvement over SHA-pinning. Some argued it's trading one trust model for another-trusting the lockfile maintainer instead of the repo owner. Others recommended avoiding third-party actions entirely or vendoring action code. zizmor's maintainer noted caveats: lockfiles don't cover reusable workflows, composite action callers, Docker image uses, or interior mutability like npx calls.