Closed joycebrum closed 1 year ago
My general practice on other repos has been:
I don't believe it's appropriate for us to pin our python deps (pytest), because python lacks tooling for doing this effectively.
I'd be happy to take a PR on the actions side for this.
because python lacks tooling for doing this effectively
Thats actually true unfortunately. The only way I know of doing it would be using pip-compile to regenerate the hashes to update them, but that's an extra work to keep it up to date :/
My general practice on other repos has been:
- pin to a precise tag for official actions (those under the actions org)
It would be slightly better to hash pin also the official ones too, since they are open source and are exposed to supply chain attacks as any other open source. But it is definitely good to at least minor version pin them. Thanks for that.
FWIW since I left that comment, one of your colleagues sent a PR to another repo of mine migrating it to pinning the actions repos by hash, so now I do the same everywhere.
Description
I would like to also suggest a security practice recommended by the [OpenSSF Scorecard][scorecard-repo] which is to hash pin dependencies to prevent dependency-confusion, typosquatting and tag renaming attacks.
The change would only be applied to GitHub workflows, dockerfiles and shell scripts dependencies.
This means: