Top
Best
New

Posted by gslin 14 hours ago

Lock Your GitHub Actions(hugovk.dev)
274 points | 58 commentspage 2
latexr 13 hours ago|
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.

hobofan 7 hours ago|
Does nobody read the blog post and liked Github release annoucment anymore?

This is a new first-party feature by Github to allow locking of transitive dependencies.

latexr 2 hours ago|||
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.

hobofan 2 hours ago||
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 repeatin 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.

latexr 55 minutes ago||
> 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.

Bnjoroge 6 hours ago|||
Cosign. It’s the entire point of this article and would be obvious if someone read
akoboldfrying 15 minutes ago||
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.

yoy0721 1 hour ago||
[flagged]
aleaph 13 hours ago||
So "SHA pinning with version reference in a comment" with extra steps, got it
sleepytimetea 11 hours ago||
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.
hobofan 7 hours ago||
You can still use the SHA if you want to. What it achieves is transitive pinning (which this post doesn't properly highlight).

Lack of transitive pinning support was the biggest supply-chain security criticism against GHA and I'm glad they are finally tackling it!

edelbitter 10 hours ago|||
SHA pinning on GitHub does not always imply account pinning, even where the account name is explicitly specified along with it.

So some of the extra steps are meaningful. Though I am still not convinced they could not have been implemented in a deliberately backwards-incompatible way to Github action in general, keeping the syntax and removing only the special case that is never both intentional and non-malicious at the same time.

OptionOfT 13 hours ago||
Enforced through GitHub Actions that is :)
carterschonwald 12 hours ago||
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
Pxtl 8 hours ago||
If GitHub really cared about security they could fix this tomorrow by declaring any tag linked to an action immutable.

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.

eviks 5 hours ago|
What tools did you use to get that awfulness?
GodSmasher 3 hours ago||
[flagged]
dharmasthan 7 hours ago||
[flagged]
favori995749721 10 hours ago||
[flagged]
minfazhai 10 hours ago||
[flagged]
numbsafari 10 hours ago|
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.

More comments...