ci: follow workflow best practices with scoped permissions and pinned sha versions - #65
Merged
Conversation
Address zizmor findings in the Test workflow: - Pin actions to full-length commit SHAs (2x High unpinned-uses) - Add least-privilege top-level permissions: contents: read (Medium) - Set persist-credentials: false on checkout (Low artipacked) Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg
marked this pull request as ready for review
August 27, 2026 08:19
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.
Summary
Hardens the
Testworkflow against the findings fromzizmor(GitHub Actions security linter, v1.29.0):unpinned-uses) — actions were referenced by floating tag; now pinned to the exact commit the tag points to, with the version as a trailing comment:actions/checkout→3d3c42e5aac5ba805825da76410c181273ba90b1# v7.0.1actions/setup-java→dd06d9cba3e5552c54d9f8ea23572deb30010f7c# v6.0.0excessive-permissions) — added a top-levelpermissions: contents: readblock. This test workflow only checks out code and runs tests, so read is sufficient.persist-credentials: falseon checkout (Lowartipacked) — prevents the checkout token from persisting into the runner where it could leak via artifacts.No version upgrades — each action stays on its currently-referenced major, just pinned.
dependencies.ymlwas already clean (pinned + scoped) and is untouched.Testing
zizmor --offline .github/workflows, before → after:10 findings (6 suppressed): 0 informational, 1 low, 1 medium, 2 highNo findings to report. Good job! (5 suppressed)All 4 targeted findings resolved.