我阅读了许多与问题/文章相关的npm audit,其中人们以表格格式提供了npm audit的响应。但是,当我运行npm audit时,我会以纯文本的形式得到响应。
我尝试安装一个库npm-audit-html并获得回答中提供的HTML格式,但这遇到了一个问题:zsh: command not found: npm-audit-html
能否有人解释并帮助解决美化npm audit的反应?目前,我的npm audit响应显示如下所示:
postcss-overflow-shorthand <=2.0.0
Depends on vulnerable versions of postcss
node_modules/postcss-overflow-shorthand
postcss-page-break <=2.0.0
Depends on vulnerable versions of postcss
node_modules/postcss-page-break
postcss-place <=5.0.0
Depends on vulnerable versions of postcss
node_modules/postcss-place
postcss-pseudo-class-any-link <=6.0.0
Depends on vulnerable versions of postcss
node_modules/postcss-pseudo-class-any-link
postcss-reduce-initial <=4.0.3
Depends on vulnerable versions of postcss
node_modules/postcss-reduce-initial
postcss-reduce-transforms <=4.0.2
Depends on vulnerable versions of postcss
node_modules/postcss-reduce-transforms
postcss-replace-overflow-wrap <=3.0.0
Depends on vulnerable versions of postcss
node_modules/postcss-replace-overflow-wrap
postcss-selector-matches *
Depends on vulnerable versions of postcss
node_modules/postcss-selector-matches
postcss-selector-not <=4.0.1
Depends on vulnerable versions of postcss
node_modules/postcss-selector-not
postcss-svgo <=5.0.0-rc.2
Depends on vulnerable versions of postcss
Depends on vulnerable versions of svgo
node_modules/postcss-svgo
postcss-unique-selectors <=4.0.1
Depends on vulnerable versions of postcss
node_modules/postcss-unique-selectors
postcss-url 3.3.0 - 10.0.0
Depends on vulnerable versions of postcss
node_modules/postcss-url
stylehacks <=4.0.3
Depends on vulnerable versions of postcss
node_modules/stylehacks
90 vulnerabilities (84 moderate, 6 high)发布于 2022-08-05 12:08:17
在windows中,我使用npm审核">“将其内容写入json文件中,请参阅下面的命令:
npm audit --json > FOLDER_PATH\FILE_NAME.json发布于 2022-11-18 15:40:37
您发布的npm audit格式是npm 7的一个重大变化。
对输出和数据结构进行了重大重构,以提请注意问题,确定以前没有得到的修补程序类别,并删除未用于任何目的的无关数据。 重大变化:任何使用npm审计输出的工具几乎都需要更新,因为这在可读性和-json输出样式上都发生了重大变化。 来源:https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major
由于输出格式没有正式解释,有一个帖子试图找到它。你可以查看这篇文章以获得更多的细节。
https://stackoverflow.com/questions/70965951
复制相似问题