我正在尝试修复
我不确定这是否与现有的错误有关,因为警告消息明确指出它无法自动修复。
我该如何解决这些问题?
我尝试了阅读这个相似的SO帖子中的答案,但没有解决任何一个问题。我尝试安装最新的
有没有办法让我确定我明确引入的依赖项(即在package.json的dependencies或devDependencies中)已经隐含地拉取了这个易受攻击的依赖项?消息中提到的包都不存在于我的package.json中。
对于这样一个泛泛而谈(但非常具体)的问题,我很抱歉。任何帮助都将不胜感激!
npm audit
检测到的3个漏洞,但似乎这些漏洞无法通过npm audit fix
自动解决。❯ npm audit fix
npm WARN audit fix ansi-regex@5.0.0 node_modules/npm/node_modules/cli-table3/node_modules/ansi-regex
npm WARN audit fix ansi-regex@5.0.0 is a bundled dependency of
npm WARN audit fix ansi-regex@5.0.0 npm@8.5.0 at node_modules/npm
npm WARN audit fix ansi-regex@5.0.0 It cannot be fixed automatically.
npm WARN audit fix ansi-regex@5.0.0 Check for updates to the npm package.
npm WARN audit fix ansi-regex@3.0.0 node_modules/npm/node_modules/string-width/node_modules/ansi-regex
npm WARN audit fix ansi-regex@3.0.0 is a bundled dependency of
npm WARN audit fix ansi-regex@3.0.0 npm@8.5.0 at node_modules/npm
npm WARN audit fix ansi-regex@3.0.0 It cannot be fixed automatically.
npm WARN audit fix ansi-regex@3.0.0 Check for updates to the npm package.
npm WARN audit fix strip-ansi@4.0.0 node_modules/npm/node_modules/string-width/node_modules/strip-ansi
npm WARN audit fix strip-ansi@4.0.0 is a bundled dependency of
npm WARN audit fix strip-ansi@4.0.0 npm@8.5.0 at node_modules/npm
npm WARN audit fix strip-ansi@4.0.0 It cannot be fixed automatically.
npm WARN audit fix strip-ansi@4.0.0 Check for updates to the npm package.
npm WARN audit fix string-width@2.1.1 node_modules/npm/node_modules/string-width
npm WARN audit fix string-width@2.1.1 is a bundled dependency of
npm WARN audit fix string-width@2.1.1 npm@8.5.0 at node_modules/npm
npm WARN audit fix string-width@2.1.1 It cannot be fixed automatically.
npm WARN audit fix string-width@2.1.1 Check for updates to the npm package.
up to date, audited 1898 packages in 3s
185 packages are looking for funding
run `npm fund` for details
# npm audit report
ansi-regex >2.1.1 <5.0.1
Severity: moderate
Inefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw
fix available via `npm audit fix`
node_modules/npm/node_modules/cli-table3/node_modules/ansi-regex
node_modules/npm/node_modules/string-width/node_modules/ansi-regex
strip-ansi 4.0.0 - 5.2.0
Depends on vulnerable versions of ansi-regex
node_modules/npm/node_modules/string-width/node_modules/strip-ansi
string-width 2.1.0 - 4.1.0
Depends on vulnerable versions of strip-ansi
node_modules/npm/node_modules/string-width
3 moderate severity vulnerabilities
To address all issues, run:
npm audit fix
我不确定这是否与现有的错误有关,因为警告消息明确指出它无法自动修复。
我该如何解决这些问题?
我尝试了阅读这个相似的SO帖子中的答案,但没有解决任何一个问题。我尝试安装最新的
ansi-regex
,但没有任何改变。有没有办法让我确定我明确引入的依赖项(即在package.json的dependencies或devDependencies中)已经隐含地拉取了这个易受攻击的依赖项?消息中提到的包都不存在于我的package.json中。
ansi-regex
在我的package-lock.json中被提及了49次 - 我需要逐个查看并手动调整版本号吗(听起来很危险)。对于这样一个泛泛而谈(但非常具体)的问题,我很抱歉。任何帮助都将不胜感激!