GitHub Actions lockfiles pin action tags to commits
Original title: Lock Your GitHub Actions
gh-actions-lock records commit SHAs while workflows keep version tags; zizmor 1.32.0 is the first release that accepts lockfiles.
A November 11, 2026 blog post explains GitHub Actions workflow lockfiles as an alternative to hard-coding full commit SHAs. Mutable tags can be repointed at malicious code, so the lockfile stores the commit for each tagged action. The author installs github/gh-actions-lock, generates .github/workflows/actions.lock, and adds a CI job that runs gh actions-lock --verify. Renovate and Dependabot already update lockfiles; zizmor before v1.32.0 still tells users to hash-pin.
- Example lockfile format version is v0.0.3.
- The verify job pins gh-actions-lock to v0.4.1.
- actions/checkout@v7.0.1 and j178/prek-action@v3.1.0 are the sample pins.
- The author runs the check on the ubuntu-slim runner.
- 1.Install gh-actions-lock and commit .github/workflows/actions.lock.
- 2.Verify lockfiles in CI with gh actions-lock --verify.
- 3.Use zizmor v1.32.0 or later if linting locked workflows.
- Vendors
- GitHub
Indicators of compromise
auto-extracted · verify before use · export allAll| Type | Indicator | Context |
|---|---|---|
| sha1 | 3d3c42e5aac5ba805825da76410c181273ba90b1 | : runs-on : ubuntu-latest steps : - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with : persist-credentials : false - uses : j178/p |
| sha1 | 44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d | ith : persist-credentials : false - uses : j178/prek-action@44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d # v3.1.0 Here’s how I set up lockfiles. Install # Install t |
From the original article
3 min read at hugovk.dev
Because GitHub Actions are fetched from Git, the previous advice was to pin to a full SHA instead of a tag. This is because tags are mutable and susceptible to where an attacker points a previously safe tag at malicious code.
By gslin · hugovk.dev
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.