Hacker News new | ask | show | jobs
by lukasschwab 19 days ago
Are there clear reasons to prefer this over just pinning a commit SHA?
2 comments

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, direct and indirect dependencies both get pinned. (I presume, and haven’t checked yet, but otherwise this feature would be useless)

     Use the gh actions-lock extension for the GitHub CLI to generate .github/workflows/actions.lock for actions and their transitive dependencies.
https://github.blog/changelog/2026-10-28-github-actions-work...
You can keep the information provided by the version number, and if the maintainer is using real SemVer, it's easier to upgrade.
> You can keep the information provided by the version number

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.

So for example, if you see that the patch version only changed, it can be an automatic update. You can have a tool like dependabot which will create PR for it, and it can be automatically merge.

If it's a minor version, depending of your risk appetite, you can either auto-approve it, or manually review it. It's easy for a reviewer with the SemVer to just see that it's supposed to add more features, but no breaking changes.

If it's the major that change, it means there is a breaking change, then it indicates the reviewer that it needs a deeper review.