Repository navigation
chore(ci): publish to the Marketplace via OIDC Trusted Publishing - #501
Merged
Merged
Conversation
Switch the Marketplace step from the VSCODE_PAT secret to `vsce publish --oidc`. Azure DevOps retires Global PATs on 2027-01-27, and the publisher's Trusted Publishing policy (mtskf/quoll, publish.yml, no environment) now owns authentication. The existing workflow-level `id-token: write` already covers the job; the header comment now names both of its consumers. Open VSX is unchanged.
…h job Workflow-level id-token: write exposed the Trusted Publishing credential to every step, including the third-party SBOM action and the build toolchain. Split publish.yml into build (gates, SBOM, package, audit, attest, upload) and publish (needs: build; first-party actions plus pnpm/action-setup only; downloads the attested .vsix and publishes to Marketplace, then Open VSX). Top-level permissions are now contents: read only. Tests pin the per-job permissions, the publish job's action allowlist and the artifact hand-off.
With a file-level Trusted Publishing policy, a token minted in build is as good as one minted in publish, so build's id-token grant handed publish authority to anchore/sbom-action and the build toolchain. Build now holds contents: read only and uploads the audited .vsix with its SBOM; publish attests the downloaded bytes before either registry step. Tests pin the new permission sets, step order (download, attest, Marketplace, Open VSX), the Open VSX command, and the absence of continue-on-error on both registry steps.
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
Publish to the VS Code Marketplace with OIDC Trusted Publishing (
vsce publish --oidc) instead of theVSCODE_PATsecret. Azure DevOps retires Global PATs on 2027-01-27; the publisher's Trusted Publishing policy (owner mtskf, repo quoll, workflow publish.yml, no environment) now owns auth.Changes
publish.ymlMarketplace step: add--oidc, drop theVSCE_PAT: ${{ secrets.VSCODE_PAT }}env, rewrite the step comment to explain the auth model and why.id-token: write(already workflow-level, so it covers thepublishjob) is now documented as serving both Sigstore attestation and the Marketplace OIDC exchange.OVSX_PAT); only its comment, which pointed at the removed rationale above it, is made standalone.token-liveness.yml, any secret,scripts/deploy.sh(local manual publish).Verification
@vscode/vsce4.0.0 (lockfile-pinned) implements--oidc(out/oidc.js, registered inout/main.jswith.hideHelp(true), so it is absent from--help). It needs onlyGITHUB_ACTIONS=trueplus theACTIONS_ID_TOKEN_REQUEST_URL/TOKENthatid-token: writeprovides — no azure/login action. It exchanges the token (audiencemarketplace.visualstudio.com) at/_apis/gallery/tokenfor the publisher in the manifest.pnpm exec vsce publish --oidc --packagePath /nonexistent.vsixparses the flag locally (fails only on the missing file).pnpm vitest run test/buildgreen (250 tests).Test Plan
v*release: confirm the "Publish to VS Code Marketplace" step succeeds via OIDC (cannot be proven before a real publish).🤖 Generated with Claude Code
https://claude.ai/code/session_01XMxzpaDPos6QWGgnGQ7rTZ