A free solution to the GitHub Actions supply chain crisis

I wrote a post last year on pinning GitHub actions by commit SHA, where I highlighted 3 issues that come with this move:

  1. Loss of vulnerability alerts (see limitations with Dependabot security alerts)
  2. Higher maintenance costs from managing hashes across all your repositories (neither Renovate nor Dependabot version updates will solve this as you still have to manually verify the influx of action updates you’ll get)
  3. Potential waste of effort as GitHub has released Immutable releases

Yo Dawg, I heard you like GitHub Actions, so I'm releasing immutable releases so you can release a release where the tags can't be re-released

I thought long and hard to come up with this

Given this trade-off, I wouldn’t have judged anyone who stuck with semantic versioning, in the hopes that all their actions would eventually adopt Immutable releases.

Unfortunately time waits for no man. Checkmarx, a renowned brand in the AppSec space, had one of their actions compromised, triggering further downstream incidents.

So, you have to proceed with pinning by commit SHA. What do you do?

Solution

You start by implementing the internal action wrapper I mention in my previous post. That is…

Now you have a single place where you manage all those pesky hashes. Great!

Problem is, you’re still missing out on vulnerability alerts. Enter an earth-shattering idea:

Dependabot Security alerts will thus work on your external dependencies again. Yay!

As with most (all?) things in life, however, you trade one problem for another. The conundrum - how to maintain consistency between the new workflow, and the internal action wrappers? I’ll pause my thinking here though; might write another post to address this if there’s demand.


See all posts >>

Want to talk? I'm on LinkedIn; please add a message when you connect. Alternatively, use this contact form. And, subscribe if you want to be notified about new blog posts.