GitHub Actions lockfiles: review and safe adoption
GitHub Actions lockfiles pin reviewed action commits. Learn the GA plans, the Require lockfile policy, Dependabot behaviour and what locking does not cover.
3 min read

In this article
GitHub Actions lockfiles entered public preview on 14 October 2026 and became generally available on 28 October 2026 on GitHub Enterprise Cloud, Enterprise Cloud with data residency, Team and Free. Enterprise, organization and repository administrators can enforce adoption with the Require lockfile policy.
The GitHub CLI extension generates .github/workflows/actions.lock for the actions an onboarded workflow uses, including their transitive action dependencies. It does not pin calls to reusable workflows (jobs.<job_id>.uses); GitHub’s documentation says to reference those by full commit SHA. It also does not control other build inputs such as input parameters, secrets or the runner image. Onboarded workflows run recorded commits rather than following a moved tag. Dependabot regenerates the matching lock entry in the same pull request when it updates an onboarded action. Locking a dependency does not establish that its code is trustworthy.
Sources checked on 10 November 2026. Availability and prices can change; confirm the linked primary sources before acting.
Why a tag can change the executed code
A workflow reference such as owner/action@v1 names a tag. If that tag later points to a different commit, an unchanged workflow can execute new code. The security problem is the gap between what a reviewer inspected and what a later run actually uses.
A lockfile makes that resolution visible in the repository. The reviewer must still inspect the proposed commit and its provenance. A malicious dependency that was already present when locked stays malicious; reproducibility is not a substitute for trust.
| Control | What it helps with | What remains |
|---|---|---|
| Lockfile | Stable dependency resolution | Review the locked code |
| Dependabot | Coordinated update proposals | Approve trustworthy changes |
| Restricted token | Limits workflow authority | Review external credential access |
GitHub Actions lockfiles: adopt one workflow first
Choose a low-risk workflow and inventory every action it uses and every reusable workflow it calls. The lockfile covers the actions; pin each reusable-workflow call by full commit SHA. Use the official extension instructions to generate the lockfile and onboarding changes. Inspect the diff before accepting it. Do not hand-write a guessed schema from a blog example.
Run the workflow in a branch without production secrets. Check that every action dependency the workflow uses has a lockfile entry, and run the extension’s check for a stale lockfile. Keep a record of the workflow and lockfile versions used for the run. Expand adoption only after maintainers can explain failures.
Review updates as code changes
An automated update request reduces clerical work; it does not remove the need for review. Inspect the action’s release notes, changed permissions and transitive dependency changes. A small workflow diff can correspond to a large change in executable code.
Require the lockfile and workflow reference to move together. Avoid approving an update solely because a bot created it. If a dependency is compromised, suspend affected workflows and investigate exposed tokens before merely selecting a different version.
Retain least privilege
Set the minimum token permissions the workflow requires. Separate untrusted pull-request validation from jobs that publish releases or access deployment credentials. Review any mechanism that crosses that boundary.
Use environment approvals and short-lived credentials where your platform supports them. Limit the write scope of release jobs and inspect third-party scripts fetched during execution. A pinned action can still download an unpinned executable, so the lockfile is only part of the dependency story.
Who should adopt it first?
Maintainers with several reusable workflows or many third-party actions have a clear reason to pilot it. Teams with strict change controls should evaluate the Require lockfile policy and failure behaviour before enforcing it across every repository.
The useful outcome is a reviewable relationship between dependency changes and execution. Keep the rollout reversible, but do not remove integrity checks merely to make a failing job green. See the GitHub profile for the wider platform context.
Sources and further reading
- Updated workflow lockfile announcement — GitHub, 14 October 2026
- GitHub Actions workflow lockfiles are generally available — GitHub, 28 October 2026
- Workflow dependency lockfiles — GitHub Docs
Image credits
Featured layout: Cloudsoft Zone, CC BY-SA 4.0. No product logos or screenshots are used.
Frequently asked questions
Which plans have GitHub Actions lockfiles?
Since general availability on 28 October 2026: GitHub Enterprise Cloud, Enterprise Cloud with data residency, Team and Free.
Does a lockfile make an action safe?
No. It fixes the reviewed commit; it does not audit that commit or every runtime download.
Should I write the lockfile manually?
Use the official extension and current documentation, then review the generated changes.
Sources
- Updated workflow lockfile announcement — GitHub
- GitHub Actions workflow lockfiles are generally available — GitHub, 2026-10-28
- Workflow dependency lockfiles — GitHub
Read next

TutorialDevOps4 min read
Application error monitoring without logging sensitive data
Set up application error monitoring with safe event fields, release context and verified redaction instead of forwarding customer payloads, tokens and raw exception context.
New tools, once a week
One short email listing what joined the directory.
Comments
No comments yet. Be the first to join the conversation.
Leave a comment
Every comment is read by a moderator before it appears. Your email address is never published; it is used only to contact you about this comment.
More from Cloudsoft Zone

TutorialDevOps5 min read
Application health checks: why uptime monitoring misses real failures
Design application health checks that separate liveness, readiness and real user outcomes, without creating restart storms or dangerous synthetic side effects.
By Nilesh Kushvaha

TutorialDevOps5 min read
Prometheus and Grafana monitoring for Laravel and Node.js applications
Use Prometheus and Grafana to connect private application metrics, host observations and actionable dashboards for Laravel and Node.js production workloads.
By Nilesh Kushvaha

TutorialDevOps5 min read
Production stack monitoring: nginx, PHP-FPM, MySQL, Redis and queue workers
Build production stack monitoring with private nginx and PHP-FPM status, MySQL connection signals, Redis memory context and queue progress instead of process-only checks.
By Nilesh Kushvaha