Repository navigation
CI: Narrow workflow permissions and Marketplace token exposure - #1156
Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits intoNov 28, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dmitriy Vasyura (dmitrivMS)
marked this pull request as ready for review
November 28, 2026 06:02
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
November 28, 2026 06:02
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The publish step can install unpinned vsce dependencies while VSCE_PAT is in the environment, allowing install scripts to read and exfiltrate the Marketplace token.
1 open issue
What changed in this PR
This PR tightens CI and release security by narrowing workflow permissions and reducing Marketplace token exposure during extension publishing.
Changes:
- Reduces permissions for PR label checks and CodeQL.
- Scopes issue-triage permissions to jobs and disables persisted checkout credentials.
- Passes the Marketplace token through
VSCE_PAT, preserving signed-artifact inputs and stable/pre-release flags.
| File | Description |
|---|---|
build/templates/publish.yml |
Supplies the publishing token through the environment instead of script text or command-line arguments. |
.github/workflows/pr-labels.yml |
Restricts the label checker to pull-request read access. |
.github/workflows/issue-labels.yml |
Removes workflow-wide permissions and disables checkout credential persistence. |
.github/workflows/info-needed-closer.yml |
Removes workflow-wide permissions and disables checkout credential persistence. |
.github/workflows/codeql-analysis.yml |
Removes Actions read access while retaining source-read and scanning-upload permissions. |
Review effort: Max
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Production Marketplace credential and Windows publishing changes need maintainer confirmation in a real release run because the external template chain and authenticated publish flow could not be verified.
No open issues 🎉
1 resolved since last review
Review effort: Max
Alexandru Dima (alexdima)
approved these changes
Nov 28, 2026
Dmitriy Vasyura (dmitrivMS)
deleted the
cleanup/debugger-tokens-f7a6a74c
branch
November 28, 2026 07:51
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 PR label checker only lists labels, so it now requests
pull-requests: read. CodeQL retains source read and scanning-result upload access without Actions read. The two issue-triage jobs still have the issue write permission needed for comments, labels, and closure, but no longer leave their checkout credentials available to the subsequent npm install.The Azure Marketplace publish step now supplies its existing managed-identity token through
VSCE_PATrather than embedding it in a generated PowerShell script or passing it on the command line. Stable and pre-release publishing use the same signed artifacts and flags as before.The publish agent installs VSCE 4.1.1 before requesting the Marketplace token. Both publish modes invoke that installation directly, without running npm in the credentialed step.