Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

CI installs with npm 10, so the allowScripts denials from #2712 do not apply there

未关闭
#2,715 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, node.js, typescript
领域
ci-cd, devops, security

调研方向

Start with .github/workflows/main.yml and inspect the build, coverage, and package jobs that run npm install; compare their setup with the publish job’s pinned npm step. Check AGENTS.md for the exact pin rules and confirm the chosen npm version supports Node 22. Done when every dependency-installing job uses npm 11.19 or later and the affected CI jobs pass without lockfile or peer resolution issues.

由索引模型根据 Issue 内容生成。

描述

chore v2

Problem

#2712 denies the esbuild and fsevents install scripts through allowScripts in each v2 install. npm reads that policy only from 11.19 on. The build, coverage and package jobs in .github/workflows/main.yml use Node 22's bundled npm (10.x) and run npm install with it, so CI still runs both scripts. Copilot raised this on PR #2714.

The verify:install-scripts guard from #2712 reads lockfiles, so it enforces the review decision in CI regardless of npm version. What CI doesn't get is the blocking itself.

Proposed change

Before dependency installation, run npm >= 11.19 in every job that installs dependencies. For example, an exact-pinned npm install -g --ignore-scripts npm@<x.y.z> step, as the publish job already does for OIDC (#2483). Things to check:

  • Whether an exact pin should follow the credentialed-job rules in AGENTS.md (#2484). The package job builds an artifact that a credentialed job downloads.
  • Node 22's floor against the chosen npm version.
  • Whether CI on npm 11 then fails on anything else (lockfile format, peer resolution).

Scoring

Severity 2 (CI behaves as it does today; the scripts are not malicious, only unneeded) + urgency 2 + milestone 1 = 5 → Low.

主要语言
TypeScript
星标
11.1k
派生
1.5k
平均合并
4 小时 14 分钟
30 天内合并 PR
162

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/inspector 的其他 Issue

查看 modelcontextprotocol/inspector 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。