CI: Hash-pin all actions, apply other suggestions from zizmor#482
Open
woodruffw wants to merge 3 commits into
Open
CI: Hash-pin all actions, apply other suggestions from zizmor#482woodruffw wants to merge 3 commits into
woodruffw wants to merge 3 commits into
Conversation
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello! Apologies for the cold PR.
I'm opening this in my capacity as one of uv's maintainers; we have a set of downstreams (including
deadpool!) that we depend on, and we'd like to ensure their CI/CD processes are as hermetic and secure as possible (within the limits of GitHub's platform).To that effect, this PR contains a few different commits that aim to make
deadpool's CI more secure. None of these changes fix vulnerabilities; they're purely defense-in-depth changes that will make a future Trivy-style compromise less fruitful for an attacker.To summarize:
pinact run -v. I've also added a Dependabot config (with a cooldown setting) that will keep your actions (and their hash-pins/version comments up to date). However, if you'd prefer to not have Dependabot, another option here would be to automate these bumps withpinactlocally yourselves: https://github.com/suzuki-shunsuke/pinactactions/checkout's default credential-persistence behavior withpersist-credentials: false, where possible.permissionsto{}, wherever possible. I've also moved all non-empty permissions into their respective jobs rather than setting them at the entire workspace level.Most of the above was detected automatically with zizmor, which you can integrate into GitHub Actions if you'd like. I've left that out of this PR however, since not every project wants another thing running in CI. But let me know if you'd like it and I'd be happy to send a follow-up PR!
Last but not least, please let me know if there's any other information I can provide. All of the above was 100% human written and reviewed 🙂