问题标签 [npm-audit]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
35 浏览

reactjs - Forked a react tutorial repo from github and after npm install found 1 critical issue among others. Just ignore or run npm audit fix?

I am following a tutorial on youtube and forked the repo. After running npm install I get the following:

As I'm not really sure what npm audit fix does I am hesitant in executing the command.

I did run npm audit which gave me a list. Here a snippet :

After reading through some forums people suggest to ignore the alert or to delete the package-lock.json and run npm install again. Haven't tried either of those solutions. Was gonna ask here first before blindly following advice I read in some forum.

Thanks for any help.

0 投票
1 回答
80 浏览

npm - npm audit --parseable 的列名文档?

有谁知道我在哪里可以找到 npm audit --parseable 的列名文档?我可以通过将其与默认的 json 输出进行比较来猜测一半的列是什么,但我不确定一些。例如,最后一列中的 Y/N 输出。

或者,源代码是否可用于 npm 审计?我没有在文档中看到它链接。 https://docs.npmjs.com/cli/v6/commands/npm-audit

我尝试了什么

  • 查看文档
  • npm 审计 --parseable --help
0 投票
12 回答
34763 浏览

angular - Errors after npm audit fix angular 10.0.1

I ran this older 10.0.1 angular project today, and it told me it had a lot of low vulnerabilities and a few high ones. so i ran npm audit fix to fix them. but now when I try to run it, it gives me these errors:

Any ideas how to fix this? I couldn't really find any relatable problems or solutions online.

0 投票
1 回答
100 浏览

javascript - 作为维护者和发布者,如何声明 npm 包中的安全漏洞?

当我在自己发布的一个包中发现安全漏洞时,如何标记一系列易受攻击的版本,以便下游消费者在运行时收到通知npm audit

0 投票
0 回答
526 浏览

npm - npm audit fix --force 不能解决问题

我有一个不久前用react-create-app. 跑步npm install给了我31 vulnerabilities (24 low, 3 moderate, 4 high)。以下是可能有助于调试问题的文件:

运行后的警告npm audit fix --force

包.json

包-lock.json

我试过了:

  • 删除package-lock.jsonnode_modules文件夹并重新运行npm install. 仍然存在完全相同的问题。
  • 使用 .将我所有的软件包更新到最新版本npm-check-updates
  • 清除 npm chachenpm cache clear --force

这些都没有解决任何问题。

PS:创建一个全新的项目npx create-react-app有完全相同的问题,所以它与我的特定应用程序无关,这是一些全球性问题。

0 投票
3 回答
471 浏览

reactjs - Npm审计问题,不断出错

不断遇到这个问题,在我的新 github repo 中,清理缓存,再次安装 npm 但现在似乎没有任何工作,我该怎么办?我怎样才能解决这个问题?

即使我做 npm audit fix 它一次又一次地返回以下代码。

0 投票
0 回答
80 浏览

node.js - npm audit fix 命令无法解决漏洞

我有问题

  1. 了解审计报告
  2. 试图弄清楚如何解决列出的漏洞。

在此处输入图像描述

我已删除package-lock.jsonnode_modules文件并重新运行

而且我仍然无法通过最后几个。

0 投票
0 回答
225 浏览

node.js - NPM 审计未发现漏洞

我有一个 CI 服务,它npm audit在每个构建上运行,并在存在高风险漏洞时发出通知。奇怪的是,当我在npm audit本地运行时 CI 报告高漏洞时,它说found 0 vulnerabilities。过几天就会发现问题...

例如,CI 报告:CVE-2020-7774: The npm package y18n before versions 3.2.2, 4.0.1, and 5.0.5 is vulnerable to Prototype Pollution.

但是在本地开发环境中:
没有问题

CI 和本地都使用 Node15.12.0和 npm 7.6.3

为什么npm audit找不到最新的问题?有什么方法可以强制更新它吗?

npm --verbose audit输出:

在此处输入图像描述

0 投票
0 回答
603 浏览

npm - npm 审核返回 400 错误请求

当我运行 npm audit 我得到

我尝试了以下

但它仍然在发生,我的 npm 版本是 6.14.11,我的节点版本是 v14.16.0

一旦我这样做

有用

知道为什么会这样吗?

0 投票
1 回答
497 浏览

vue.js - 为什么我无法获取最新版本的 postcss

我正在使用vue-cliwhich 具有postcss.

当我运行时,npm audit我收到postcss有漏洞的警告,我必须升级到一些新版本。我该怎么做呢?

我试过了npm update,,,npm update -Dnpm update -D --depth=99但它不起作用。

我还尝试删除vue-cli,它完全删除了所有内容postcss(我检查了它)。但是当我vue-cli再次安装时,旧版本的postcss再次安装。

我还检查了postcss所需的版本vue-cli,它只有比版本更高的要求^7.0.3。但它应该默认安装最新版本,对吗?

我不明白为什么 npm 正在安装旧版本,我也不知道如何将其更新到最新版本。

这是我得到的警告。