Skip to content

Limit marketplace publishing tokens to the publish steps - #1297

Draft
graygilmore wants to merge 2 commits into
mainfrom
gg-scope-release-secrets
Draft

Limit marketplace publishing tokens to the publish steps#1297
graygilmore wants to merge 2 commits into
mainfrom
gg-scope-release-secrets

Conversation

@graygilmore

@graygilmore graygilmore commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The two release workflows set VSCE_PAT, OVSX_PAT, and (in vscode-release.yml) NPM_TOKEN at the workflow level, so every step got them, including pnpm install and the build. Only the last two steps actually publish anything.

This PR tightens that up:

  • Removes NPM_TOKEN from vscode-release.yml. That workflow only publishes to the VS Code Marketplace and Open VSX; npm publishing lives in release.yml and already runs over OIDC. Nothing in the workflow reads it.
  • Moves VSCE_PAT and OVSX_PAT from workflow-level env: onto the vsce publish and ovsx publish steps 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.yml run on main that 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.

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
graygilmore force-pushed the gg-scope-release-secrets branch from ab176cb to c05c2be Compare September 11, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant