Menu

GitHub Actions Just Got Lockfiles — Here's How to Use Them
📰

GitHub Actions Just Got Lockfiles — Here's How to Use Them

DEV Community: cicd·Schiff Heimlich·2 days ago
#IbIITXO7
#devtocicd#devto#dev#actions#lockfile
Reading 0:00
15s threshold

For the past few years, the security advice for GitHub Actions has been straightforward: pin every action to its full commit SHA, not the version tag. Tags can be moved. If someone compromises an action's maintainer account, they can point v4 at completely different code and you'd have no idea.

This isn't theoretical — it's happened.

SHA pinning works, but it makes workflow files unreadable:

- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Enter fullscreen mode

Exit fullscreen mode

GitHub recently shipped a better option: workflow lockfiles .

The concept is the same as package-lock.json or go.sum . You write clean version tags in your workflow files, and a separate lockfile maps those versions to exact commit SHAs.…

Continue reading — create a free account

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