Repository navigation
Conversation
Stable and beta release workflows now run npm stage publish. Staged versions are not installable until an npm maintainer approves them with 2FA, so GitHub credentials alone can no longer ship a release. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
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.
Problem
The CLI's release and beta workflows publish to npm as soon as they run. The
npm-publishandnpm-publish-betaenvironments currently have no required reviewers, andmainis unprotected. So any account with write access, or a stolen GitHub token for one, can ship@langfuse/cli/langfuse-cli. The LiteLLM release compromise on Oct 21, 2026 shows that even reviewer gates on GitHub fall to stolen CLI OAuth tokens.Changes
release.ymlandbeta-release.ymlnow runnpm stage publishinstead ofnpm publish. Staged versions are not installable until an npm maintainer approves them with npm 2FA. GitHub credentials cannot do that step.npm stage list.npm stage. Node 24 currently ships npm 11.19.1.MAINTENANCE.mddocuments the new approval step, the recovery path, and the trusted-publisher setup with stage publish only.scripts/release.tshelp text updated.Recovery behavior to review. Staged versions are invisible to
release-guard.tsandbeta-release.ts, so:@langfuse/clifirst and then rerun. The guard sees it as published from the samegitHeadand stages onlylangfuse-cli. A rerun before that approval fails on the already-staged version.Required npm-side setup before merging: both trusted publishers (
release.yml/npm-publishon both packages, andbeta-release.yml/npm-publish-betaon@langfuse/cli) must allow stage publish. Afterwards, remove direct publish from them. Separately, the two environments still need required reviewers and branch/tag policies, whichMAINTENANCE.mdalready says are mandatory.Verification
bun run typecheck: passesbun test:102 pass, 0 failzizmor --offline .github/workflows/: no findings (3 already suppressed, unchanged)scripts/npm-packages.ts. Realnpm@11.19.1 stage publish /tmp/clipk/canonical --ignore-scripts --tag latest --dry-runaccepts the folder and flags; it stopped only on the expected "cannot publish over 1.2.4". Staging, like publishing, turns on provenance automatically under trusted publishing (lib/utils/oidc.js).