Live data from Hacker News

Gh-actions-lockfile: generate and verify lockfiles for GitHub Actions

gh-actions-lockfile.net

21–28 of 28 posts

Re: Gh-actions-lockfile: generate and verify lockfiles for GitHub Actions

#21

Another (more complete? maintenance, security checks) solution is to allow renovatebot handle this for you. Enable this preset: https://docs.renovatebot.com/presets-helpers/#helperspingith... ..and in the next update cycle, you will see all actions be pinned like this: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

This only handle your actions, not their dependencies (which seems to be the purpose of gh-actions-lockfile)

Re: Gh-actions-lockfile: generate and verify lockfiles for GitHub Actions

#22

From what I see, this does not help with pinning the dependencies and it doesn’t verify the downloaded action has the same content as it used to have. In other words, this is a tiny patch on a big wound. We use commit hashes to pin actions, have the version as a comment (e.g # v4) and renovate will keep both up to date in the PRs. And there is a more or less recently added repository setting to require actions to be…

How does this lock down transitive dependencies? Is it effective if the action you rely on doesn't pin its dependencies?

Re: Gh-actions-lockfile: generate and verify lockfiles for GitHub Actions

#23
post #13

Earlier quoted context omitted.

If that action itself has unpinned dependencies that doesn't accomplish much.

Don't use such actions. Or fork them and commit add the lockfile yourself, if you're cool with the implied maintenance.

> Or fork them and commit add the lockfile yourself

Depending on the action you use, this is no small task. You might as well just switch to something else altogether.

Re: Gh-actions-lockfile: generate and verify lockfiles for GitHub Actions

#24
post #22

From what I see, this does not help with pinning the dependencies and it doesn’t verify the downloaded action has the same content as it used to have. In other words, this is a tiny patch on a big wound. We use commit hashes to pin actions, have the version as a comment (e.g # v4) and renovate will keep both up to date in the PRs. And there is a more or less recently added repository setting to require actions to be…

How does this lock down transitive dependencies? Is it effective if the action you rely on doesn't pin its dependencies?

You don't use actions pulling in unpinned dependencies outside of trusted distro package manager at runtime.

I believe this problem is probably overstated. Can you point us to such an action you are concerned with that has either transitive actions dependency or unlocked npm dependencies where maintainers aren't responsive to addressing PRs to illustrate?

Re: Gh-actions-lockfile: generate and verify lockfiles for GitHub Actions

#25
I have trust issues using actions that are not from official and reputable sources like GitHub official and AWS actions. I don’t know why an ssh action is necessary, seems like a nice way to get your ssh credentials stolen and ssh isn’t that hard.

Re: Gh-actions-lockfile: generate and verify lockfiles for GitHub Actions

#26

Mildly ironic that the quickstart suggests starting with an unpinned action gjtorikian/gh-actions-lockfile@v1 Presumably since it has to run first it must run unpinned?

Arguably, that's exactly the one action that will need to be hash-pinned, since all the consecutive actions will at least be verified against the lockfile.

Right, completely agree! By "must run unpinned" I meant "no way it can make itself run pinned, since it's already running"

Re: Gh-actions-lockfile: generate and verify lockfiles for GitHub Actions

#27
One of the biggest problems with GitHub Actions is that, even with fully transitive locking at the action layer, you still can’t really guarantee hermetic execution: lots of actions do implicit version resolution on tools by default. For example, setup-python, etc. will select a reasonable version based on the constraints you give it, which may end up being the pre-installer runner’s Python, or a newly released patch version, etc.

Fully pinning action references themselves is a step in the right direction, but the ecosystem as a whole probably has expectations that are misaligned with reproducibility/hermeticity, and those expectations will be challenging to overcome.

Post reply on HN