ci: add permissions and pin actions to full commit SHAs - #1270
Open
XananasX7 wants to merge 1 commit into
Open
Conversation
All 6 non-fuzz workflow files were missing a top-level permissions block and used mutable tag references. Add permissions: contents: read and pin every uses: to its full commit SHA (tag kept as comment): actions/checkout: @v6 -> @df4cb1c069e1874edd31b4311f1884172cec0e10 actions/checkout: @v4 -> @34e114876b0b11c390a56381ad16ebd13914f8d5 actions/upload-artifact: @v6 -> @b7c566a772e6b6bfb58ed0dc250532a479d7789f msys2/setup-msys2: @v2 -> @66cd2cce69caa17b53920067426061ca1de3a884 cygwin/cygwin-install-action: @master -> @781ea34f8c7c28e794b807fb7120e93bfdac3089 vmactions/dragonflybsd-vm: @v1 -> @4ba8127bd95c94b66fc4b885e37c99955ba308ea vmactions/freebsd-vm: @v1 -> @a6de9343ef5747433d9c25784c90e84998b9d69a vmactions/netbsd-vm: @v1 -> @99816dccf75edf233ed6cd00a159e3a5b85ea373 vmactions/omnios-vm: @v1 -> @7f2be0b927aad1a78498c8aeeac4c4ce1fabd322 vmactions/openbsd-vm: @v1 -> @fcf799d7ce9c305ad89eabef1fb2fa5c1c42d0ee vmactions/solaris-vm: @v1 -> @d30dd6c228c8661ade859e36ead7660b9a62efcc
Contributor
|
Adding more restrictive permissions to CI workflows and pinning to commit SHAs should be separate PRs as pinning to commit SHAs is discouraged by project maintainers as already pointed out in other similar PRs that were recently created. There are several issues with pinning workflow actions to commit SHAs due to how the CI runners are updated. One of them is that essentially each runner has minimum version requirements that can't be satisfied if the actions are pinned to commit SHAs and will eventually break the CI runs causing unnecessary maintainability burden. |
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.
All 6 non-fuzz workflow files were missing a top-level
permissions:block and used mutable tag references (@v6,@master,@v1, etc.).Add
permissions: contents: readto each workflow (principle of least privilege).Pin all
uses:to full commit SHAs (tags kept as comments):actions/checkout@v6/@v4@df4cb1c0/@34e11487actions/upload-artifact@v6@b7c566a7msys2/setup-msys2@v2@66cd2ccecygwin/cygwin-install-action@master@781ea34fvmactions/dragonflybsd-vm@v1@4ba8127bvmactions/freebsd-vm@v1@a6de9343vmactions/netbsd-vm@v1@99816dccvmactions/omnios-vm@v1@7f2be0b9vmactions/openbsd-vm@v1@fcf799d7vmactions/solaris-vm@v1@d30dd6c2Qualifies under the Google Open Source Patch Rewards Program.