ci: pin pyTooling/Actions/releaser to a SHA instead of the r6 branch#1972
Merged
Conversation
The publish job holds permissions: write-all and passes GITHUB_TOKEN to this third-party action, previously pinned to the mutable r6 branch. Pin to the branch head commit (pyTooling also publishes v6.x tags).
Reviewer's guide (collapsed on small PRs)Reviewer's GuidePins the pyTooling/Actions/releaser GitHub Action in the msbuild publish job from the mutable r6 branch to a specific commit SHA to eliminate supply-chain risk while preserving current behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
im a person not a branch or a tag 😭 |
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.
What this does
.github/workflows/msbuild.yml'spublishjob pins the third-party actionpyTooling/Actions/releaserto the mutable@r6branch (line 73). That job holdspermissions: write-alland passestoken: ${{ secrets.GITHUB_TOKEN }}. This pins it to a full commit SHA instead:Why
@r6is a branch (not a tag) —pyTooling/Actionsmoves it as new 6.x releases land. So whatever that branch points to at run time executes with a write-allGITHUB_TOKENin scope, which could tamper with thelatestrelease artifacts users download. Pinning to a commit SHA closes that moving-target window (the tj-actions/changed-files class of risk) while keeping behavior identical.I pinned to the branch's current head commit so nothing changes functionally.
pyTooling/Actionsalso publishes immutablev6.xtags (e.g.v6.7.0) if you'd prefer a version-style pin — happy to switch to that.One-line change. (The
buildjob'smicrosoft/setup-msbuild@v3holds no secret, so I left it alone.)Disclosure: I used an AI tool to help spot this and prepare the change; I verified the branch-vs-tag distinction and the pinned SHA myself and take responsibility for it.
Summary by Sourcery
CI: