VS Marketplace Trusted Publishing: delete your extension PAT
Visual Studio Marketplace Trusted Publishing ships VS Code and Visual Studio extensions from GitHub Actions or Azure Pipelines via OIDC, no long-lived PAT.
If you ship a VS Code or Visual Studio extension, there's an Azure DevOps personal access token sitting in your repo secrets right now, and it can push a new version to every user who installed you. Microsoft just made it optional. On October 28, the Visual Studio Marketplace announced Trusted Publishing: publish from GitHub Actions or Azure Pipelines with federated identity, no long-lived PAT.
What actually happened
Trusted Publishing is the same pattern npm and PyPI adopted: your CI proves who it is with OIDC, and the registry hands back a short-lived credential. Per Microsoft's post:
- GitHub Actions: in Marketplace publisher management, open Trusted Publishing and create a policy naming the repo owner, repo and workflow file (an environment is optional). Add
id-token: writeto the publish job and switch the publish command to OIDC. The temporary credential expires after 15 minutes. - Azure Pipelines: no Marketplace policy. Create a Workload Identity Federation service connection backed by an Entra app registration or managed identity, and add that identity to the publisher as Contributor.
- Private repos: a new policy stays temporarily active for 48 hours. The first successful token exchange activates it permanently; if unused, it expires and you can reopen it.
PAT-based publishing keeps working. Microsoft's migration order is the right one: create the policy, add the permission, update the command, verify one OIDC publish, then delete the PAT.
Why it matters for your business
Extensions are a supply-chain target because they run with your developer's full permissions. Attackers know the shortest path is not your code — it's the token that publishes it. That PAT often belongs to whoever set up the pipeline, has no sensible expiry, and outlives their time on the team.
A 15-minute credential bound to one repo and one workflow file is a much smaller thing to lose. If you build an internal extension for your team, or a public one for your customers, this is a one-afternoon change that removes a standing secret.
Two caveats. Pin the policy to the exact workflow that publishes, not a general CI file anyone can edit. And Microsoft's post doesn't say whether this is preview or GA, or whether PATs will be retired — so plan the switch, but don't assume a deadline.
Key takeaways
- Visual Studio Marketplace Trusted Publishing lets GitHub Actions and Azure Pipelines publish VS Code and Visual Studio extensions without a PAT
- GitHub Actions gets a Marketplace credential that expires in 15 minutes; Azure Pipelines uses Workload Identity Federation
- PAT publishing still works — verify one OIDC publish before you delete the token
- Scope the policy to the single publishing workflow file
The token that ships your code deserves more thought than the code review does. We move small teams' release pipelines to OIDC and scoped, short-lived credentials, then hand you a list of what still needs a secret. Start a conversation.
Sources: Microsoft for Developers blog.
- #vs-code
- #trusted-publishing
- #oidc
- #supply-chain
- #github-actions
Tommy Rush — Founder, Rush Commerce
Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More
Get The Rush Report weekly — one email, zero fluff.
Keep reading
Gheist: stolen GitHub tokens hit 850+ accounts, private repos
Wiz's Gheist report: stolen GitHub tokens planted 13,500+ secret-dumping workflow branches. Private repos weren't held. Hunt ci-sync branches, rotate, expire tokens.
Read itOVHcloud CLI backdoored: turn on GitHub release immutability
A hijacked account swapped OVHcloud CLI GitHub releases 0.11.0–0.15.0 for secret-stealing builds. Release immutability was off. Here's the fix.
Read it