Workflow dependency lockfile (actions.lock)
Why Tier 1
Decides exactly which commit of every action, direct or transitive, runs in the repository's workflows, with their secrets. Changing it is as powerful as changing the workflows.
A lockfile at .github/workflows/actions.lock, generated with the gh actions-lock extension, that pins every action a workflow uses to a commit. GitHub's docs say it supersedes SHA pinning for repositories that adopt it.
Available on: Free, Team, Enterprise Cloud, EMU. Source
Attack path
Mutable tags let an attacker who takes over an action change what runs everywhere it is used, as in tj-actions/changed-files. The lockfile closes that, but anyone who can change it can point a locked action at a malicious commit, and workflows that are not in the lockfile are still exposed.
Mitigations
- CODEOWNERS in place, required on sensitive paths
- Review lockfile diffs like code, and protect the file with code owners
- Onboard every workflow, not only some
Detect
Nothing in the organization or enterprise audit log shows this. Review it on a schedule instead.