Re:Lock Your GitHub Actions
by Already__Taken on Wednesday November 11, 2026 @05:23PM
(#50459589)
Quoting someone else's blog I've forgotten but you're trading the trust in the repo owner not moving a tag for trusting whoever merges the commit hash to have checked that's a release in the repo you want and not _some_ forks commit. All forks on github are the same repo you can pin any commit, merged upstream or not.
Re:Lock Your GitHub Actions
by embedding-shape on Thursday November 12, 2026 @09:37AM
(#50468001)
> As the consumer of an action that becomes really hard to find out unless I take the whole codebase apart.
Maybe it's just me, but I only use (public) Actions I'm able to review in an hour or less, meaning less than 5K LOC or so. Not sure how people are able to just "consume" 3rd party GitHub Actions and not even review what exactly they do, how are people comfortable with the risks this opens up? It's literally supply-chain wild west, but seemingly people continue like it's 2010.
Re:Lock Your GitHub Actions
by SchemaLoad on Wednesday November 11, 2026 @05:29PM
(#50459686)
Are people finding a real need for importing and updating git actions? Aren't they usually just running a one line bash command? I'd just copy paste the action in to your config so it's fully locked and under your control rather than importing some opaque script from a no name github user.
Re:Lock Your GitHub Actions
by Pxtl on Wednesday November 11, 2026 @11:18PM
(#50463026)
A lot of things that should be one bash command turn out to be dozens of lines of incantations and handling edge cases. Microsoft I'm looking in your direction.
Re:Lock Your GitHub Actions
by woodruffw on Wednesday November 11, 2026 @05:45PM
(#50459919)
The advice here is really great (as I'd expect from Hugo), but as the maintainer of zizmor I want to note some caveats with the current iteration of workflow lockfiles:
- They only lock normal action calls. If your workflows invoke other reusable workflows, you need to keep those hash-pinned manually for now.
- Composite actions are not themselves locked. Instead, they get locked transitively through their callsites i.e. the workflows that call them. This makes any individual caller that uses lockfiles safe, but it also makes the current `gh actions-lock` default unsafe (since it removes hash-pins from the composite action itself, meaning that any external caller that invokes the action loses their transitive pinning).
- Other forms of `uses:` clauses, like Docker images, are also not currently locked via the lockfile. And the same for forms of interior mutability (like an action running `npx ...` under the hood, although the latter is fully outside of GitHub's control to prevent. But these mean that you can't assume that a fully locked Actions setup is in fact 100% immutable.
I hope they address these gaps soon, because it's otherwise an excellent (and long-awaited) feature.
Re:Lock Your GitHub Actions
by crote on Thursday November 12, 2026 @04:23AM
(#50464910)
And, the one often forgotten: `runs-on:` also refers to an image, but in practice a huge amount of people will just set it to `ubuntu-latest` and accept whatever GH happens to include that day. In fact, I don't think it is even possible to refer to a specific runner image revision by digest...
Re:Lock Your GitHub Actions
by Arbortheus on Wednesday November 11, 2026 @06:58PM
(#50460831)
Presumably it’s for the transitive dependencies. You pin action X, but that (third party) action doesn’t correctly pin the SHA of action Y, so you still get owned if the mutable tag gets moved to a compromised commit.
But with a lockfile (I presume, and haven’t checked yet, but otherwise this feature would be useless), direct and indirect dependencies both get pinned.
Re:Lock Your GitHub Actions
by sleepytimetea on Wednesday November 11, 2026 @08:46PM
(#50461950)
Yes, I scratched my head trying to understand what this accomplishes. It just puts a tag back instead of a SHA but now moves the SHA (locked in) to a separate file that now needs to be verified ?
I fail to see how this is better or needed.
Re:Lock Your GitHub Actions
by gbraad on Wednesday November 11, 2026 @06:28PM
(#50460461)
I undrrstand this looks cleaner and more intuitive, but you still have the risk of running a workflow with malicious/compromised actions, like manually, or locally with act, if you do not verify the lockfile as part of the workflow or preceded by an extra workflow step. This should be something that the runner ideally should handle (as part of the platform). This still is a workaround, just like the sha pinning. I only use vendor upstream actions, like github's or forks in our own org.
Re:Lock Your GitHub Actions
by latexr on Wednesday November 11, 2026 @06:56PM
(#50460808)
I remember reading (but haven’t verified) that even using a specific SHA instead of a tag isn’t a guarantee with GitHub Actions, because the Action itself may have a dependency which does not pin to a SHA, thus making you vulnerable all the same. This lock file strategy does not appear to guard agains that, it seems to be what we had before but trades a bit more readability in one file for an extra (more complex) lock file. Not a trade-off I want to make (but you do you).
Personally I found the risk of running someone else’s GitHub Action in my repo to not be worth it. Even GitHub’s own Action to checkout repos is way more complex than I need it to be and last I checked had dependencies which could be targeted. I opt instead to not run any third-party Actions (not even GitHub’s official ones) in my repos.
Re:Lock Your GitHub Actions
by akoboldfrying on Thursday November 12, 2026 @07:51AM
(#50466413)
If that is really the "entire point" of the article, it's strange that the article doesn't mention it at all. It simply says you should do a thing differently than the way you used to do it, without explanation. It links to the official GitHub blog post, which, it turns out, does mention transitivity -- but again, TFA itself does not even hint that this "entire point" will be addressed in that linked article.
As I see it, TFA's only value is that link to a better article.
Re:Lock Your GitHub Actions
by latexr on Thursday November 12, 2026 @05:54AM
(#50465503)
I did read the blog post. More than once, in search for info on transitive dependencies. It doesn’t provide it. You’re right that I should’ve clicked through the official blog post, I got link blindness. I did find it strange that transitive dependencies weren’t included, which is why I repeatedly said it seemed it didn’t. Thank you for the correction.
Your snark is unwarranted, though, since the crux of the comment is not using any Action you haven’t built. Lockfiles don’t solve the complexity and trust problem.
Re:Lock Your GitHub Actions
by hobofan on Thursday November 12, 2026 @06:07AM
(#50465583)
Sorry, the snark was meant to be more general. Your comment was one of ~5 of people that apparently didn't pick up on the transitive locking, and repeating outdated now-outdated information. I do think the author did a bad job of highlighting it, so I see how it can be missed.
> Lockfiles don’t solve the complexity and trust problem.
They don't solve it on their own, but they are an important building block, and allow GHA to take the same shape that other package ecosystems have (e.g. npm, Cargo), where trust issues can be worked around to some degree with a combination of consumption-delay + automated security review. Of course, going with a smaller surface area is always preferrable.
Re:Lock Your GitHub Actions
by latexr on Thursday November 12, 2026 @07:11AM
(#50466048)
> Sorry, the snark was meant to be more general.
Fair. I know what it’s like to be frustrated with a general trend, and unfortunately we have to pick one comment to reply to.
> They don't solve it on their own, but they are an important building block
Agreed, it is a good step and I understand why people would want to do it. But I also stand by saying “not a trade-off I want to make (but you do you)”. I mean it in every sense: I still don’t want to do it for myself, but in no way am I claiming my preference is right for everyone.
Re:Lock Your GitHub Actions
by jaggederest on Wednesday November 11, 2026 @07:14PM
(#50461007)
These days setting up a proper system on your build orchestrator of choice is pretty easy, cheaper, and you basically only lose a tiny bit of UI niceness if they report to github anyway
Re:Lock Your GitHub Actions
by klodolph on Wednesday November 11, 2026 @10:39PM
(#50462778)
Just about anything else, tbh. Jenkins is the option I would go for, but that’s a reflection of my personal preferences for self-hosting. Self-hosting has gotten way easier since LLMs can debug things so well, so I’m self-hosting more than ever before even though I have less time available.
You don’t have to go Jenkins, it’s just that GitHub Actions are uniquely bad and I would avoid them.
Re:Lock Your GitHub Actions
by pie_flavor on Wednesday November 11, 2026 @11:00PM
(#50462930)
A Pi is not going to make your Windows and macOS builds. It's also going to have a miserable time running the Rust compiler on your five hundred dependencies.
Re:Lock Your GitHub Actions
by pjc50 on Thursday November 12, 2026 @06:52AM
(#50465871)
> if you don’t personally have a Mac, you should not be making Mac builds of your software
Apple seem to believe this extremely strongly and keep finding new ways to prevent you doing it.
I basically agree, and at work we have a Jenkins master + cluster of build machines. But this does incur substantial sysadmin overhead even if we're using Ansible and all the Windows ones are VMs. (Mac, again, hates being either virtualized or stuck in a rack, and will occasionally insist on someone using the physical display and keyboard on the actual machine to perform updates)
Re:Lock Your GitHub Actions
by pie_flavor on Friday November 13, 2026 @06:50PM
(#50491849)
A 'should' with no explanation? What if I think that I 'should' release, for my tool I want people to use, binaries that run on their computer instead of just mine? Why 'should' this be a web-app? (What's 'old-school' about that?)
Re:Lock Your GitHub Actions
by cedws on Thursday November 12, 2026 @02:34AM
(#50464139)
I'm not saying GHA is much better, but Jenkins is literally swiss cheese, it has vulnerabilities every day of the week. Even just as an internal service not exposed to the internet it's dangerous.
Re:Lock Your GitHub Actions
by whiskybob on Friday November 13, 2026 @07:19AM
(#50482474)
I work at Buddy. The CI product matters less than it looks here, most of that bad histroy is third-party actions pulled by a tag which someone else can move. Plain scripts as every step fix most of it on Buildkite, and also on GitHub itself, which is the cheapest option in my opinion
Re:Lock Your GitHub Actions
by carterschonwald on Wednesday November 11, 2026 @07:47PM
(#50461373)
at this point im seriously pondering how to build a dvcs code forge thats not dog shit, versions its own state, and actually is semantically grounded rather than a rails app gone awry
Re:Lock Your GitHub Actions
by edelbitter on Wednesday November 11, 2026 @09:21PM
(#50462262)
So instead of specifying a SHA1 hash of some commit and change it rarely enough to just check manually, now every developer needs to unsafe-eval some 476 transitive dependencies of the helper that fixes the lockfile? I wonder at which point it gets easier to just have a nice stdlib again, and not deal with tons and tons of version changes in packages across 3 different language ecosystems.
Re:Lock Your GitHub Actions
by numbsafari on Wednesday November 11, 2026 @09:46PM
(#50462430)
Shouldn’t we all just be vibe coding our own actions instead of using the marketplace ones? Is SaaS dead yet, or what?
/s
This is a step in the right direction, but it’s not even close to a complete solution. And what am I doing installing a plugin to use this? It should just be part of GH, so I can install that and not have yet another source of dependency management to lock down.
Re:Lock Your GitHub Actions
by Pxtl on Thursday November 12, 2026 @02:44PM
(#50473098)
Fair point, but still: anything that messes up other users is generally identified as "don't do this outside of personal stuff nobody else has touched, once others have pulled it it's forever."
For example all the history rewriting has that rule -- "don't force push after somebody has pulled that branch".
IMO Github should make Immutable tags mandatory to publish on https://github.com/marketplace
(The previous way to provide general actions immutability, i.e. hash-pinning, had this issue and thus required additional checks.)
As the consumer of an action that becomes really hard to find out unless I take the whole codebase apart.
Maybe it's just me, but I only use (public) Actions I'm able to review in an hour or less, meaning less than 5K LOC or so. Not sure how people are able to just "consume" 3rd party GitHub Actions and not even review what exactly they do, how are people comfortable with the risks this opens up? It's literally supply-chain wild west, but seemingly people continue like it's 2010.
(I simply put a comment with the upstream URL in my repo in case I want to update in the future.)
For those things an action helps.
- They only lock normal action calls. If your workflows invoke other reusable workflows, you need to keep those hash-pinned manually for now.
- Composite actions are not themselves locked. Instead, they get locked transitively through their callsites i.e. the workflows that call them. This makes any individual caller that uses lockfiles safe, but it also makes the current `gh actions-lock` default unsafe (since it removes hash-pins from the composite action itself, meaning that any external caller that invokes the action loses their transitive pinning).
- Other forms of `uses:` clauses, like Docker images, are also not currently locked via the lockfile. And the same for forms of interior mutability (like an action running `npx ...` under the hood, although the latter is fully outside of GitHub's control to prevent. But these mean that you can't assume that a fully locked Actions setup is in fact 100% immutable.
I hope they address these gaps soon, because it's otherwise an excellent (and long-awaited) feature.
But with a lockfile (I presume, and haven’t checked yet, but otherwise this feature would be useless), direct and indirect dependencies both get pinned.
The old way of just writing this in a comment on the same line seems fine to me -- intuitive and much more concise.
> if the maintainer is using real SemVer, it's easier to upgrade
Could you elaborate on this? I didn't see how yet.
Lack of transitive pinning support was the biggest supply-chain security criticism against GHA and I'm glad they are finally tackling it!
Personally I found the risk of running someone else’s GitHub Action in my repo to not be worth it. Even GitHub’s own Action to checkout repos is way more complex than I need it to be and last I checked had dependencies which could be targeted. I opt instead to not run any third-party Actions (not even GitHub’s official ones) in my repos.
This is a new first-party feature by Github to allow locking of transitive dependencies.
As I see it, TFA's only value is that link to a better article.
Your snark is unwarranted, though, since the crux of the comment is not using any Action you haven’t built. Lockfiles don’t solve the complexity and trust problem.
> Lockfiles don’t solve the complexity and trust problem.
They don't solve it on their own, but they are an important building block, and allow GHA to take the same shape that other package ecosystems have (e.g. npm, Cargo), where trust issues can be worked around to some degree with a combination of consumption-delay + automated security review. Of course, going with a smaller surface area is always preferrable.
Fair. I know what it’s like to be frustrated with a general trend, and unfortunately we have to pick one comment to reply to.
> They don't solve it on their own, but they are an important building block
Agreed, it is a good step and I understand why people would want to do it. But I also stand by saying “not a trade-off I want to make (but you do you)”. I mean it in every sense: I still don’t want to do it for myself, but in no way am I claiming my preference is right for everyone.
You don’t have to go Jenkins, it’s just that GitHub Actions are uniquely bad and I would avoid them.
Same for Windows.
I may be a little old-school about this.
And yes, you should have a Mac for local testing of you target OSX, but it's still useful to have an easy way to run a matrix of platforms in CI.
Jenkins is fine but hard to call it better than GH actions, subjectively.
Apple seem to believe this extremely strongly and keep finding new ways to prevent you doing it.
I basically agree, and at work we have a Jenkins master + cluster of build machines. But this does incur substantial sysadmin overhead even if we're using Ansible and all the Windows ones are VMs. (Mac, again, hates being either virtualized or stuck in a rack, and will occasionally insist on someone using the physical display and keyboard on the actual machine to perform updates)
Works completely fine and no github bill.
https://josh-ops.com/posts/github-dependabot-for-actions/
/s
This is a step in the right direction, but it’s not even close to a complete solution. And what am I doing installing a plugin to use this? It should just be part of GH, so I can install that and not have yet another source of dependency management to lock down.
I endose this article.
They don't because they don't.
Anybody who's ever moved a git tag knows the ergonomics of doing so are so awful that you're obviously not supposed to be doing it.
For example all the history rewriting has that rule -- "don't force push after somebody has pulled that branch".
Deleting/recreating git tags has same behaviour.