Skip to content

ci: put the Marketplace publish behind an approval gate - #23

Merged
kkdev92 merged 1 commit into
mainfrom
ci/gate-marketplace-publish
Aug 13, 2026
Merged

ci: put the Marketplace publish behind an approval gate#23
kkdev92 merged 1 commit into
mainfrom
ci/gate-marketplace-publish

Conversation

@kkdev92

@kkdev92 kkdev92 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

The publish job ran with VSCE_PAT and no gate — a GitHub release went straight to the Marketplace with nothing in between.

vscode-ext-kit (npm-publish) and health-data-dotnet (release) have both had a protected environment for this. These three never got one.

What was created

A marketplace-publish environment with:

  • required reviewer — the job waits for approval before it starts
  • deployment ref policy tag: v*

Both mirror the two environments that already exist, which use exactly required_reviewers + tag: v*. The tag pattern is not a guess: every publish run in this repository's history is event=release on a v<version> ref, checked across the full run list for all three repos before setting it. A pattern that did not match would silently block releases instead of gating them.

The environment was created and then read back to confirm the protection rules actually applied, rather than trusting the create call.

What this does not do

VSCE_PAT is still a repository secret, so this gates when the token is used, not which job can name it. Moving it onto the environment needs the token value, so it is left as a follow-up:

  1. Settings → Environments → marketplace-publish → add secret VSCE_PAT
  2. Once a release has published successfully with it, delete the repository-level VSCE_PAT

Worth knowing: the exposure today is narrower than it looks. Secrets are only materialised into steps that reference them, and no other workflow here references VSCE_PAT — so this is defence in depth against a future workflow, not an open hole.

Cost

Every release now needs one approval click before it reaches the Marketplace.

🤖 Generated with Claude Code

The publish job ran with `VSCE_PAT` and no gate: a release published on
GitHub went straight to the Marketplace. vscode-ext-kit and
health-data-dotnet have both had a protected environment for this;
these three never got one.

The `marketplace-publish` environment requires a review before the job
starts, and restricts deployments to `v*` tags. That pattern is not a
guess — every release run in this repository's history is
`event=release` on a `v<version>` tag, and it mirrors the two
environments that already exist.

What this does not do yet: `VSCE_PAT` is still a repository secret, so
this gates when the token is used rather than which job can name it.
Moving it onto the environment needs the token value.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kkdev92
kkdev92 merged commit e3e47d8 into main Aug 13, 2026
8 checks passed
@kkdev92
kkdev92 deleted the ci/gate-marketplace-publish branch August 13, 2026 10:20
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