Lock Your GitHub Actions
Hugo explains how to use GitHub's new workflow lockfiles and the gh-actions-lock CLI tool to secure action versions and transitive dependencies.
summary is enough A quick walkthrough of a new feature, though the comment section contains crucial warnings about its current security limitations.
summary
Hugo walks through setting up GitHub's workflow lockfiles using the gh-actions-lock CLI extension. The feature lets developers use clean version tags in workflows while tracking exact commit hashes and transitive dependencies in an automatically generated lockfile. While this modernizes CI dependency management, commenters highlight major blind spots such as unpinned reusable workflows and Docker images.
key points
- The gh-actions-lock extension generates an actions.lock file, allowing workflows to use version tags while enforcing exact commit SHAs.
- Renovate and Dependabot support lockfiles out-of-the-box for automated dependency updates.
- Security tool maintainers note that reusable workflows, composite action internals, and Docker images are not currently covered by these lockfiles.
who should read it
Developers and DevOps engineers managing GitHub Actions workflows who want to improve supply-chain security.
discussion positive
consensus
Commenters welcome native transitive dependency locking as a major step forward for GitHub Actions security.
pushback
Some critics argue lockfiles add unnecessary complexity compared to simple SHA pinning or copying actions locally, while maintainers point out dangerous implementation gaps.
The advice here is really great (as I'd expect from Hugo), but as the maintainer of zizmor I want to note some caveats with the current iteration of workflow lockfiles:
- They only lock normal action calls. If your workflows invoke other reusable workflows, you need to keep those hash-pinned manually for now.
- Composite actions are not themselves locked. Instead, they get locked transitively through their callsites i.e. the workflows that call them. This makes any individual caller that uses lockfiles safe, but it also makes the current `gh actions-lock` default unsafe (since it removes …
The zizmor maintainer details critical security gaps in the current implementation, including how composite actions and reusable workflows are handled.
Generated by an LLM from the article and thread. Check the sources before relying on it.