Menu

1 / 4

GitHub Actions Workflow Lockfile: Pin Transitive Deps

DEV Community: github·Mudassir Khan·about 2 hours ago
#LaU5DqDA
#devtogithub#technology#devto#dev#lockfile
Reading 0:00
15s threshold

GitHub just made workflow lockfiles generally available, and the gh actions-lock command finally answers a question that SHA pinning never could: what about the actions your actions call? A GitHub Actions workflow lockfile records exact commits for actions and their transitive dependencies, while your YAML keeps its readable @v4 style references. That's the release. The harder part is rolling it out without freezing CI, and knowing what it still doesn't prove.

TL;DR

A lockfile fixes which commit runs, including the nested actions you never see in your YAML. It's a real upgrade over hand pinning the top level only.

Roll it out one workflow at a time, and add a guard that fails a PR when a uses: line changes without the lockfile changing.

It says nothing about how an action was built or whether your repo is configured safely.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.