GitHub Actions workflow lockfiles are now generally available, and if you have not adopted them yet, March 2026 is the reason you should. That month, attackers hijacked 75 version tags in aquasecurity/trivy-action — the official GitHub Action for one of the most widely-used container security scanners — and silently replaced them with credential-stealing code. Every CI pipeline referencing Trivy by tag pulled malicious scripts for roughly 12 hours, leaking SSH keys, cloud credentials, and Kubernetes secrets before the compromise was caught. Lockfiles, now GA as of October 28, would have stopped that attack cold.
The Tag Problem Is Not New, But It Is Finally Fixed
When you write uses: actions/checkout@v4 in a workflow, you are not pinning to a commit. You are pinning to whatever commit that tag points to right now. Tags are mutable. Attackers who compromise an action maintainer’s credentials can silently move a tag to malicious code, and no one downstream changes a single line in their workflow YAML. Their pipelines just start running attacker-controlled scripts.
The usual answer — pinning to full commit SHAs — works in theory but falls apart in practice. Workflow files filled with 40-character hashes become impossible to review meaningfully. And they only protect direct dependencies: if an action you use internally calls another action via a composite action, those transitive dependencies remain unpinned. The Trivy attack exploited exactly this gap at scale.
What the Lockfile Actually Does
The actions.lock file records the exact commit SHA for every action your workflows reference — direct dependencies and transitive ones inside composite actions. Your YAML stays readable (@v4 stays @v4); the lockfile handles commit resolution separately. When a workflow is onboarded, the Actions runtime executes the locked commit, not whatever the tag currently resolves to. InfoQ has the full GA announcement details.
Setup takes three commands:
# Install the extension
gh extension install github/gh-actions-lock
# Onboard all workflows (generates .github/workflows/actions.lock)
gh actions-lock
# Verify the lockfile is current in CI (use v0.4.0+, not v0.2.0)
gh extension install github/gh-actions-lock --pin v0.4.0
gh actions-lock --verify
Use the --pin v0.4.0 flag when installing for CI verification. The older v0.2.0 silently missed transitive dependencies inside composite actions — a gap that caused runtime failures not visible in PR checks until after merge.
Dependabot integrates cleanly. Add package-ecosystem: github-actions to your .github/dependabot.yml and Dependabot will update both the action reference and the lockfile entry in a single PR, keeping your locks current without manual intervention.
The December 2 Deadline You Should Not Miss
Lockfiles are one half of GitHub’s current CI security push. The other half: starting December 2, 2026, GitHub will block pull_request_target by default in all public repositories.
pull_request_target runs with the base repository’s secrets — it was designed for workflows that need to comment on PRs from forks. The danger is when those workflows also check out and execute code from the untrusted fork. Attackers can craft pull requests that exfiltrate repository secrets through this path. GitHub is closing the gap by making pull_request_target opt-in rather than opt-out.
Two brownout windows will simulate the block before December 2: November 9 and November 16, both from 16:00 to 18:00 UTC. If your public repo workflows use pull_request_target, they will fail during those windows. That is your signal to audit and either refactor the workflow or create an explicit Actions event policy that permits it. Private and internal repositories are not affected.
What Lockfiles Do Not Protect
A lockfile guarantees you run the commit you locked — it does not guarantee that commit is safe. If you lock to a compromised version and never review the lockfile diff when it changes, you are still exposed. Code review on lockfile updates matters. Container image references in workflows are also not covered; use image digests for those. Reusable workflows defined in other repositories need their own lockfiles in those repos. The full implementation guide covers every edge case.
The Window Is Open — Use It
GitHub is tightening CI security defaults across the board. Workflow lockfiles are GA, Dependabot support is live, and the enforcement policy is available for teams on Team or Enterprise plans. The brownout tests give you a preview of December 2 before it arrives. The Trivy attack demonstrated what happens when these mechanisms are absent. Now they exist — the work is adopting them before the next incident removes that choice.

