Skip to content

CI: Narrow workflow permissions and Marketplace token exposure - #1156

Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits into
mainfrom
cleanup/debugger-tokens-f7a6a74c
Nov 28, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 2 commits into
mainfrom
cleanup/debugger-tokens-f7a6a74c

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

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_PAT rather 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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread build/templates/publish.yml Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 152fd07 into main Nov 28, 2026
16 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the cleanup/debugger-tokens-f7a6a74c branch November 28, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants