3/23/2026 at 7:50:34 PM
"GitHub's own security guidance recommends pinning actions to full commit SHAs as the only truly immutable way to consume an action"Why doesn't GitHub just enforce immutable versioning for actions? If you don't want immutable releases, you don't get to publish an Action. They could decide to enforce this and mitigate this class of issue.
by tkzed49
3/23/2026 at 8:52:05 PM
> Why doesn't GitHub just enforce immutable versioning for actions?I always wish these arguments came with a requirement to include a response to "well, what about the other side of the coin?", otherwise, you've now forced me to ask: well?
The two sides of the coin: Security wants pinned versions, like you have, so that compromises aren't pulled in. Security does not want¹ pinned versions, so that security updates are pulled in.
The trick, of course, is some solution that allows the latter without the former, that doesn't just destroy dev productivity. And remember, …there is no evil bit.
(… I need to name this Law. "The Paradox of Pinning"?)
(¹it might not be so explicitly state, but a desire to have constant updated-ness w/ security patches amounts to an argument against pinning.)
by deathanatos
3/23/2026 at 9:50:17 PM
> it might not be so explicitly state, but a desire to have constant updated-ness w/ security patches amounts to an argument against pinningWhen you want to update, you update the hashes too. This isn’t an issue in any other packaging ecosystem, where locking (including hashing) is a baseline expectation. The main issue is developer ergonomics, which comes back to GitHub Actions providing very poor package management primitives out of the box.
(This is the key distinction between updating and passively being updated because you have mutable pointers to package state. The latter gets confused for the former, but you almost always want the former.)
by woodruffw
3/24/2026 at 12:00:10 AM
Honestly what I really want is the latter (mutable references), but pointing to aliases that I own and update manually (the former).by NewJazz
3/24/2026 at 10:42:01 AM
So, fork the action repository and pull from upstream at your own pace?by ishouldbework
3/24/2026 at 10:53:41 AM
So JFrogby mememememememo
3/24/2026 at 12:32:37 AM
Yeah, that’s essentially what a lockfile would provide. I think GitHub Actions should really have an (official) one.by woodruffw
3/24/2026 at 10:53:00 AM
Auto upgrade to version deemed OK by security team. Basically you need to get updates that patch exploits then wait and be more patient for feature upgrades.by mememememememo
3/23/2026 at 8:56:09 PM
Their question isn't about pinned versions, it's about immutable versions. The question is why it is possible to change what commit "v5" refers to, not "why would you want to write v5".You already don't get updates pulled in with the system unless they swap the version out from under you, which is not a normal way to deploy.
by staticassertion
3/23/2026 at 9:15:20 PM
One of the only useful things my previous employer did was disallow moving tags via hg hooks.by irishcoffee
3/23/2026 at 11:06:24 PM
Version tags should obviously be immutable, and if you want to be automatically updated you can select 1.0.*, if you don't you just pick the version tag.by patmorgan23
3/23/2026 at 9:16:27 PM
It amounts to an argument against pinning in a (IMO) weird world view where the package maintainer is responsible for the security of users' systems. That feels wrong. The user should be responsible for the security of their system, and for setting their own update policy. I don't want a volunteer making decisions about when I get updates on my machine, and I'm pretty security minded. Sure, make the update available, but I'll decide when to actually install it.In a more broad sense I think computing needs to move away from these centralised models where 'random person in Nebraska'[0] is silently doing a bunch of work for everyone, even with good intentions. Decisions should be deferred to the user as much as possible.
by cedws
3/24/2026 at 5:13:25 AM
You can pin a GitHub Action to a SHA, but the GitHub Action can be a Docker one pointing to a mutable Docker image label.Example:
https://github.com/github-community-projects/issue-metrics/b...
> Why doesn't GitHub just enforce immutable versioning for actions?
You can't. They can execute arbitrary code. They can download another bash file via Curl and execute that.
by OptionOfT
3/24/2026 at 6:12:23 AM
> You can't. They can execute arbitrary code. They can download another bash file via Curl and execute that.Presumably you'd check the code of the action before you include it (and then don't use an action with non-pinned versions). This way you know the action won't execute arbitrary code for this version and won't get any other code because of version pinning.
The docker action you linked is ironic in this regard since every other version in the code seems to be pinned except the one you linked to.
by zufallsheld
3/24/2026 at 7:43:48 AM
This recommendation is currently broken. Even when you pin the full commit SHA for an action, that action may still pull in transitive dependencies (other actions) that aren't pinned.by joeig
3/24/2026 at 3:30:17 AM
A better question perhaps is why we’ve allowed ourselves to be so vulnerable by a single provider (GitHub). Supply chain attacks would have a significantly smaller blast radius if people start using their own forges. GitHub as a social network is no longer a good ideaby isodev
3/24/2026 at 1:38:30 AM
Even then, that's only immutable for the workflow config. Many workflows then go on to pull in mutable inputs downstream (eg: default to "latest" version).by allset_
3/23/2026 at 8:56:42 PM
I assume this is because it is modeled after git tags, and at this point it would be a major change to move away from this. But it should probably get started at some point.by staticassertion
3/23/2026 at 9:50:08 PM
GitHub has an opt-in option to enforce immutable tags as part of immutable releases.https://docs.github.com/en/code-security/concepts/supply-cha...
by mburns
3/23/2026 at 10:05:00 PM
Nice, yeah I think they should start to migrate to that behavior by default.by staticassertion
3/23/2026 at 9:33:09 PM
what if you pin it to a version that is compromised for years before finding out?Allowing it to be updated can also fix security problems.
It’s basically all the same arguments as static vs dynamic linking.
Plus, I believe I saw that the one action was getting the latest version of trivy anyway.
by dec0dedab0de
3/24/2026 at 12:40:01 AM
Because the true name of the feature is VisualSourceSafe actions. It's all over the code of the runner if you take a second to look, and the runner, like the rest of the feature, is of typical early 2000s Microsoft quality, which is to say, none at all.by GauntletWizard
3/24/2026 at 1:36:25 AM
GitHub Actions, the feature that was years in the making, and launched in August 2018. Which Microsoft then acquired 2 months later.by glenngillen
3/24/2026 at 2:35:55 AM
Yep, once you start looking into the inner workings, you realize it's just a rebranded Azure Pipelines with a ton of technical debt attached.by silverwind
3/23/2026 at 8:04:10 PM
[dead]by sieabahlpark