compiled fast-glob bundles an outdated picomatch

未关闭 适合新手
#104 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript, nodejs

调研方向

从 pnpm-lock.yaml 开始,其中 picomatch 在 micromatch 下被固定为 2.3.1;同时查看生成的打包文件 compiled/fast-glob/index.js。将锁文件中的 picomatch 升级到 2.3.2,然后运行 pnpm prebundle 重新生成打包文件。当打包文件包含 splitTopLevel 和 DEFAULT_MAX_EXTGLOB_RECURSION,并且锁文件解析到 picomatch 2.3.2 时,即完成。

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

描述

Hi, [email protected] (current latest) ships compiled/fast-glob/index.js, prebundle's own ncc build of fast-glob 3.3.3, which dist/index.js imports. That build inlines micromatch 4.0.8 with picomatch 2.3.1. pnpm-lock.yaml on main still resolves [email protected] → [email protected] → [email protected], and the committed compiled/fast-glob was last regenerated on 2025-10-28 ("chore: update compiled packages").

picomatch 2.3.1 is covered by two published advisories (list below), both fixed in 2.3.2. fast-glob is only a devDependency and picomatch is not declared at all, so npm audit and SCA tools cannot see this copy, for you or for projects that install prebundle.

Suggested fix: update picomatch in pnpm-lock.yaml to 2.3.2 (within micromatch's ^2.3.1), run pnpm prebundle to regenerate compiled/fast-glob, and publish.

Static reproduction (2026-11-25):

  1. npm pack [email protected] && tar xzf prebundle-1.6.5.tgz
  2. grep -c 'const picomatch = (glob, options, returnState = false)' package/compiled/fast-glob/index.js → 1 (picomatch 2.x entry point)
  3. grep -c 'splitTopLevel' package/compiled/fast-glob/index.js → 0 (extglob guard added in 2.3.2)
  4. grep -c 'DEFAULT_MAX_EXTGLOB_RECURSION' package/compiled/fast-glob/index.js → 0 (constant added in 2.3.2)
Advisories

picomatch 2.3.1:

  • CVE-2026-33671 / GHSA-c2c7-rcm5-vvqj: ReDoS via extglob quantifiers (fixed 2.3.2)
  • CVE-2026-33672 / GHSA-3v7f-55p6-f55p: method injection in POSIX character classes causes incorrect glob matching (fixed 2.3.2)
主要语言
JavaScript
星标
28
派生
6
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

rstackjs/prebundle 的其他 Issue

查看 rstackjs/prebundle 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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