Scope WinGet token to the submit step only#358
Open
AndreyVMarkelov wants to merge 1 commit into
Open
Conversation
Move WINGET_CREATE_GITHUB_TOKEN from the winget job's env down to the Submit WinGet manifest step. The secret is only needed when WingetCreate opens the pull request, so the Download WingetCreate step no longer has the token in its environment while fetching and checksumming the tool.
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
Follow-up to #357. Moves
WINGET_CREATE_GITHUB_TOKENfrom thewingetjob'senvdown to theSubmit WinGet manifeststep'senv.Why
The token is only needed when WingetCreate opens the pull request. With it declared at job level it was also present in the environment of the
Download WingetCreatestep, which fetches and checksums an executable over the network. Scoping the secret to the single step that needs it follows least-privilege and reduces its exposure surface.Changes
.github/workflows/release.yml— token declared at step level instead of job level.Verification
throwif the secret is unset) and the WingetCreate invocation both remain within the step that now owns the token, so behavior is unchanged.🤖 Generated with Claude Code