Menu

What Are GitHub Actions Lockfiles, and Do They Replace SHA Pinning?
πŸ“°

What Are GitHub Actions Lockfiles, and Do They Replace SHA Pinning?

DEV Community: cicdΒ·Alisa HesterΒ·3 days ago
#qANlLS8O
#devtocicd#devto#dev#using#actions
Reading 0:00
15s threshold

Your SDK release workflow runs when someone pushes a version tag. Its steps read actions/checkout@v4 , actions/setup-node@v4 , and actions/attest-build-provenance@v1 . Each @v4 or @v1 is a git ref in another team's repository. The commit it points to can change after your team reviewed the workflow, and nothing in your repository records which commit was reviewed.

The usual fix is to pin every action to a full commit SHA, as the Lullabot architecture decision record requires. Teams keep those pins current with Renovate, Dependabot, pinact , or ratchet , and frizbee converts tags to SHAs. That fixes the lines you can see. Andrew Nesbitt pointed out the gap: a SHA pin locks only the outer action, and a helper action it calls by tag can still change.

GitHub's workflow dependency lockfile moves pinning into one machine-generated file per repository. For each onboarded workflow, it records the ref, the resolved commit, and the source repository's identity, transitive actions included.…

Continue reading β€” create a free account

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