Limit marketplace publishing tokens to the publish steps - #1297
Draft
graygilmore wants to merge 2 commits into
Draft
Limit marketplace publishing tokens to the publish steps#1297graygilmore wants to merge 2 commits into
graygilmore wants to merge 2 commits into
Conversation
vscode-release.yml only publishes to the VS Code Marketplace and Open VSX; npm publishing lives in release.yml and already runs over OIDC. Nothing in this workflow reads NPM_TOKEN, so drop it. Assisted-By: devx/d9810122-2b8f-4f8d-b51b-eb980219e4b6
VSCE_PAT and OVSX_PAT were set at the workflow level, so every step, including pnpm install and the build, could read them. Only the vsce and ovsx publish steps need them, so move the tokens onto those steps. vsce show uses the public gallery API and does not need the PAT. Assisted-By: devx/d9810122-2b8f-4f8d-b51b-eb980219e4b6
graygilmore
force-pushed
the
gg-scope-release-secrets
branch
from
September 11, 2026 23:12
ab176cb to
c05c2be
Compare
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.
The two release workflows set
VSCE_PAT,OVSX_PAT, and (invscode-release.yml)NPM_TOKENat the workflow level, so every step got them, includingpnpm installand the build. Only the last two steps actually publish anything.This PR tightens that up:
NPM_TOKENfromvscode-release.yml. That workflow only publishes to the VS Code Marketplace and Open VSX; npm publishing lives inrelease.ymland already runs over OIDC. Nothing in the workflow reads it.VSCE_PATandOVSX_PATfrom workflow-levelenv:onto thevsce publishandovsx publishsteps in both workflows.vsce show(used to compare marketplace vs. package version) hits the public gallery API and doesn't need the PAT.This is intentionally limited to scoping the existing secrets. How the marketplace publishes authenticate is unchanged.
Tophatting 🎩
There should be no functional changes. The next
release.ymlrun onmainthat ships a VS Code extension version bump should still publish to both marketplaces. If either publish step fails with an auth error, the env didn't make it onto the step.