Hey Engineering Leaders -- see this setting in your GitHub Org Settings? ⬇️ **"Require actions to be pinned to a full-length commit SHA"** Sounds perfect, right? With the recent GH Action security concerns, we thought so. Flip the switch and your CI/CD pipelines are safe from supply chain attacks we thought. Here's the problem: **this applies to transitive dependencies too.** Your action pins `trunk-io/trunk-action@sha123` -- great. But trunk's action internally uses `peter-evans/find-comment@v3`. That's not SHA-pinned. So GitHub blocks your entire workflow. Your options become: - Allowlist every upstream action org -- defeats the purpose - Fork and maintain your own versions -- not fun - File PRs with every upstream action to get them to SHA-pin their deps -- not fun + good luck I do understand why GH built it this way -- actions aren't packaged artifacts from a registry. They're just YAML files pulling other YAML files. Even if YOU pin to a SHA, the action's own `uses:` references can change underneath you. So GH enforces the whole chain or nothing. We're going to go a different direction: SHA-pin everything we control, use zizmor for enforcement, and file PRs upstream where we can. How is your team handling GH Actions supply chain security? Are you enforcing SHA pinning somehow and limiting the use of marketplace actions, or just trusting Dependabot and hoping for the best? We're figuring this out internally, but I'm curious what others are doing in this realm -- share in the comments below! #github #devops #security #supplychainsecurity #cicd #platformengineering #infrastructure #githubactions
Matt Gowie did you click-ops it or set it in your terraform configuration? 😅 P.S: As I wrote it I noticed it's not in the docs for this release yet - the docs update is already on the main branch but that setting is included on the latest release of the provider! https://github.com/integrations/terraform-provider-github/blob/v6.11.1/github/resource_github_actions_organization_permissions.go#L79
Solution: don't import any unknown GitHub Actions. That easy
Another problem is if that pinned SHA is vulnerable, you have to stay on top of it yourself. By pinning to a sha, you can create a problem by solving a problem. You could keep inheriting that vulnerable version if you don't update routinely. I see teams make this mistake, freeze everything and think that is the secure posture. But they have no plan on keeping their platform up to date.
We just launched a product to help here by forking and automatically pinning and doing other hardening for all the top actions, but yeah this is a complete mess.
Same class of problem on the Gitea Actions side. The platform claims to support the concurrency keyword but silently ignores it. Found out the hard way when parallel runs started stepping on each other in production. Ended up implementing database-level locking as a compensating control. The workflow syntax couldn't enforce it, so the application code had to. Your transitive SHA-pinning issue is the same pattern: platform promises enforcement but the chain breaks at the boundary you don't control. The real question is whether you trust the platform to fix it or build your own enforcement layer and accept the maintenance cost.
While it doesn't solve this exact problem, one thing that I've spent time doing is I created my own supply chain monitoring software that is constantly monitoring and will alert if it detects malicious code. We are also pinning directly to SHAs for third parties but it's worth knowing ahead of time so we can consider if the third party dependency is worth the risk. I'm actually demoing this software tomorrow for the first time with my team since it was a personal project technically, but as someone who helped design the CI/CD pipelines at work I made sure to include their open source ones in the list of a few hundred that I am monitoring (to be expanded this weekend).
GitHub has the feature of Immutable Actions launched last year. However, they haven't really pushed it as a standard. https://docs.github.com/en/actions/how-tos/create-and-publish-actions/using-immutable-releases-and-tags-to-manage-your-actions-releases
I always use frizbee https://github.com/stacklok/frizbee
Nice, you pin-sha setup-nodes ? You enable the sha restricted option. So why setup-nodes still checkout a main branch ? (I let you have a look at setup node for the most curious)
The fact that GitHub still hasn't added any version of lockfiles to GitHub Actions is by far one of their largest failures as an organization.