Skip to content

fix(ci): avoid mutable npm CLI in publish workflow#20

Closed
BunsDev wants to merge 1 commit into
mainfrom
codex/fix-mutable-npm@latest-installation-issue
Closed

fix(ci): avoid mutable npm CLI in publish workflow#20
BunsDev wants to merge 1 commit into
mainfrom
codex/fix-mutable-npm@latest-installation-issue

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented Jun 1, 2026

Motivation

  • The npm publish workflows installed an unpinned npm@latest immediately before npm publish --provenance, creating a supply-chain risk by executing a mutable registry-provided CLI in the trusted publishing path.

Description

  • Remove the release-time npm install -g npm@latest step from .github/workflows/npm-publish.yml and replace it with a simple npm --version verification so the workflow uses the npm bundled with actions/setup-node@v6 (Node 24) instead.

Testing

  • Ran rg -n "npm install -g npm@latest|npm@latest" .github/workflows || true and verified there are no remaining occurrences in the workflows and the npm publish --access public --provenance publish step is preserved.

Codex Task

Copilot AI review requested due to automatic review settings June 1, 2026 05:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces supply-chain risk in the npm publishing pipeline by removing a release-time installation of an unpinned npm@latest, ensuring the workflow uses the npm that ships with the Node.js toolchain provisioned by actions/setup-node@v6.

Changes:

  • Removed npm install -g npm@latest from the publish workflow.
  • Replaced the npm setup step with a simple npm --version verification step while preserving npm publish --provenance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented Jun 2, 2026

Closing this in favor of #24.

The mutable npm@latest removal from this PR has been folded into #24 in commit 8d126b0, alongside the manual publish provenance hardening. Keeping the workflow fixes together avoids the merge conflict between the two PRs in .github/workflows/npm-publish.yml.

@BunsDev BunsDev closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants