Skip to main content

Cloudsoft Zone Build, deploy and scale with practical guides to PHP, Node.js, React, DevOps and AI automation. Explore the guides

Cloudsoft Zone
DevOpsIndustry update

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.

Nilesh Kushvaha

3 min read

Cloudsoft Zone cover: GitHub Actions lockfiles: review and safe adoption
Image: Cloudsoft Zone
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.

ControlWhat it helps withWhat remains
LockfileStable dependency resolutionReview the locked code
DependabotCoordinated update proposalsApprove trustworthy changes
Restricted tokenLimits workflow authorityReview 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

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

  1. Updated workflow lockfile announcement — GitHub
  2. GitHub Actions workflow lockfiles are generally available — GitHub, 2026-10-28
  3. Workflow dependency lockfiles — GitHub

New tools, once a week

One short email listing what joined the directory.

The weekly email about new tools and occasional newsletters. Unsubscribe at any time.

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.

Never published. Used only to contact you about this comment.

Loading the security check…

Comments are moderated before publication.