Skip to content

Home / Blog / Security

Does GitHub Actions have a lockfile? What actions.lock pins and where it stands

Yes: workflow lockfiles went generally available on 28 October 2026. What .github/workflows/actions.lock pins, what it leaves to you, and the dated timeline.

Yes. GitHub Actions workflow lockfiles became generally available on 28 October 2026, 2 weeks after a public preview began on 14 October, on Enterprise Cloud (including with data residency), Team and Free plans. A file at .github/workflows/actions.lock, written by the gh actions-lock extension, pins a commit SHA to every action your workflows use, transitive dependencies included, and the locked commit is what runs.

In short
  • Workflow lockfiles were generally available from 28 October 2026, 2 weeks after the public preview began on 14 October.
  • The file is .github/workflows/actions.lock, written by the gh actions-lock extension and never edited by hand.
  • It pins a commit SHA to every action, transitive dependencies included, and the locked commit is what runs.
  • It does not pin reusable workflow calls, and does not control inputs, secrets or the runner image.
  • It is available on Enterprise Cloud, Enterprise Cloud with data residency, Team and Free plans.

Some pages lag its status: the extension’s own README carried a public preview warning until release 0.4.1 on 2 November. This page is the dated record, read from GitHub’s own pages on the date this post was last checked, with what the lockfile covers and what it leaves to you.

Is the GitHub Actions lockfile still in preview?

No. GitHub moved it to general availability on 28 October 2026. The roadmap that announced it in March described a dependencies: section inside the workflow YAML, and what shipped is a separate file instead, so anything written about the March design describes a different form of it. The timeline:

DateWhat happenedWhere it is written
26 March 2026, revised 30 MarchGitHub's security roadmap announces workflow dependency locking as a dependencies: section in workflow YAML, with a preview in 3 to 6 months and general availability at 6 months.GitHub blog, the 2026 security roadmap
14 October 2026Public preview. The design that shipped is a separate file, .github/workflows/actions.lock, written by the gh actions-lock extension. A Require lockfile policy is in preview too.GitHub changelog, workflow lockfiles in public preview
28 October 2026Generally available, with the preview's capabilities, on GitHub Enterprise Cloud, Enterprise Cloud with data residency, Team and Free.GitHub changelog, workflow lockfiles are generally available
2 November 2026gh-actions-lock 0.4.1. Its release notes include "Update README to remove public preview warning".gh-actions-lock releases
When this post was last checkedGitHub's concept page says nothing about preview or general availability. The 28 October changelog is the status.Workflow dependency lockfiles

What does actions.lock pin, and what does it not?

QuestionAnswer
Where it lives.github/workflows/actions.lock, in the repository.
Who writes itgh actions-lock, a GitHub CLI extension. It should never be edited by hand.
What it pinsA commit SHA for every action your workflows depend on, including transitive dependencies.
What runsThe locked commit. Allowed-actions policies check the locked commit too.
Reusable workflow calls (jobs.<job_id>.uses)Not pinned. Pin those by full SHA yourself.
Local actions and container imagesNot locked, according to the extension's README: a container image without an @sha256: digest only gets a warning. Pin images by digest.
Input parameters, secrets and the runner imageNot controlled.
Whether a dependency is safeNot determined: "Locking does not determine whether the dependency itself is safe."
The SHA pinning policyA lockfile satisfies the Require actions to be pinned to a full-length commit SHA policy for onboarded workflows, and GitHub says it supersedes SHA pinning for repositories that adopt it.
DependabotA version update for an action in an onboarded workflow regenerates the matching lockfile entry in the same pull request.
Making it mandatoryEnterprise, organization and repository administrators can turn on the Require lockfile policy.
PlansGitHub Enterprise Cloud, Enterprise Cloud with data residency, Team and Free.
AdoptionPer workflow: one at a time or all at once. An onboarded workflow needs a lockfile entry for every dependency.

The gap that matters most is reusable workflows: a lockfile pins the actions you call, and not the reusable workflows you call. A line such as uses: your-org/shared/.github/workflows/build.yml@v2 is still a tag, so pin it to a full commit SHA. And a lockfile guards against a dependency changing under you. It does nothing about a dependency that was already bad when you locked it, so review what you lock.

How do I turn the lockfile on?

Install the extension, run it once, and commit what it writes. These are the commands from the extension’s README, which we copied and did not run, because running them needs a repository we would be changing:

gh extension install github/gh-actions-lock
gh actions-lock               # onboard or fix: writes .github/workflows/actions.lock
git add .github/workflows/
gh actions-lock --verify      # in CI: the same checks, and nothing is written
gh actions-lock --relock      # move floating refs such as v4 to their current commits

The README says to run it again after you add a workflow or change any uses: line, and it carries a warning worth repeating: a lockfile change that moves a floating ref back to an older commit is not detected, so read the lockfile’s diff in review, or pin exact tags.

Does a lockfile replace pinning actions to a SHA?

For a repository that adopts it, GitHub says yes: it calls the lockfile the strongest protection available, and says it supersedes SHA pinning for repositories that adopt it. Your workflow files can keep readable tags such as actions/checkout@v7 while the locked commit is what runs. Until a workflow is onboarded, and for reusable workflow calls always, the SHA is still the control. The rest of the hardening checklist, including the tj-actions/changed-files compromise, is in our security hardening post, and the choice of where a job runs is a separate decision, covered in what to ask a third-party runner service. A lockfile guards what a job runs, not the machine it runs on: for that, see what an ephemeral runner is and whether self-hosted runners are safe on a public repository. Every size we run, with its memory, disk and rate a minute, is on our managed GitHub Actions runners page.

Sources

Frequently asked questions

Does GitHub Actions have a lockfile?

Yes. A file at .github/workflows/actions.lock, written by the gh actions-lock extension, pins a commit SHA to every action your workflows use, transitive dependencies included. The locked commit is what runs. It became generally available on 28 October 2026.

Is the GitHub Actions lockfile generally available?

Yes, since 28 October 2026, on GitHub Enterprise Cloud, Enterprise Cloud with data residency, Team and Free. The public preview ran from 14 October. GitHub's concept page itself states no status, so the changelog is the source.

Does actions.lock pin reusable workflows?

No. GitHub's page says it does not pin calls to reusable workflows, the uses: line of a job, so pin those by full commit SHA yourself. It also does not control input parameters, secrets or the runner image.

How do I check in CI that actions.lock is current?

Run gh actions-lock --verify, which makes the same checks as a fix run and writes nothing, according to the extension's README. Run gh actions-lock again after you add a workflow or change any uses: line, and review the lockfile's diff.

Move your CI onto our runners with one line

Change one line, watch your own build, then decide.

Connect GitHub

Card required. You pay only for the minutes your jobs run.

.github/workflows/ci.yml
jobs: test:removed: runs-on: ubuntu-latestadded: runs-on: runnersio-4vcpu-ubuntu-2604 steps: - uses: actions/checkout@v4 - run: make testadded: build:added: runs-on: runnersio-32vcpu-ubuntu-2604