fix(deps): bump nanoid to 3.3.18 to resolve GHSA-2v37-7h3g-55p8 - #5638
Closed
feitianbubu wants to merge 1 commit into
Closed
fix(deps): bump nanoid to 3.3.18 to resolve GHSA-2v37-7h3g-55p8#5638feitianbubu wants to merge 1 commit into
feitianbubu wants to merge 1 commit into
Conversation
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.
问题
CI 的 Security Scan(frontend-security)目前在所有 PR 上失败:
pnpm audit --prod报出 nanoid 的 high 级通告 GHSA-2v37-7h3g-55p8(custom generators can loop indefinitely when size is zero),且该通告不在.github/audit-exceptions.yml白名单中,check_pnpm_audit_exceptions.py退出 1。命中的是 postcss 的传递依赖
nanoid@3.3.17(< 3.3.18 受影响,3.3.18 已修复)。修改
仅更新
frontend/pnpm-lock.yaml:nanoid 3.3.17 → 3.3.18(postcss 的版本范围^3.3.16允许,无需改 package.json,也无需加审计白名单)。验证
pnpm@9 install --frozen-lockfile全新安装通过(与 CI 相同的 pnpm 大版本)。pnpm audit --prod --audit-level=high --json+check_pnpm_audit_exceptions.py,输出Audit exceptions validated.,nanoid 不再出现在审计结果中。