我尝试在我的应用程序中使用 nuxt,但是当我运行“yarn 审计”时,存在一些审计问题,这些问题是 nuxt 的依赖项。
我必须解决这些审核问题吗?如果必须的话,我该如何解决它?
我使用的是 nuxt 2.15.7,我添加了最新的 css-what
但它没有改变。
yarn audit v1.22.10
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ Regular expression denial of service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.1.2 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nuxt │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ nuxt > @nuxt/builder > @nuxt/webpack > webpack > watchpack > │
│ │ watchpack-chokidar2 > chokidar > glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1751 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ Regular expression denial of service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.1.2 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nuxt │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ nuxt > @nuxt/webpack > webpack > watchpack > │
│ │ watchpack-chokidar2 > chokidar > glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1751 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high │ Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ css-what │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.0.1 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nuxt │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ nuxt > @nuxt/builder > @nuxt/webpack > cssnano > │
│ │ cssnano-preset-default > postcss-svgo > svgo > css-select > │
│ │ css-what │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1754 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high │ Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ css-what │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.0.1 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nuxt │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ nuxt > @nuxt/webpack > cssnano > cssnano-preset-default > │
│ │ postcss-svgo > svgo > css-select > css-what │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1754 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high │ Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ css-what │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.0.1 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nuxt │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ nuxt > @nuxt/builder > @nuxt/webpack > │
│ │ optimize-css-assets-webpack-plugin > cssnano > │
│ │ cssnano-preset-default > postcss-svgo > svgo > css-select > │
│ │ css-what │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1754 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high │ Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ css-what │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.0.1 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nuxt │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ nuxt > @nuxt/webpack > optimize-css-assets-webpack-plugin > │
│ │ cssnano > cssnano-preset-default > postcss-svgo > svgo > │
│ │ css-select > css-what │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1754 │
└───────────────┴──────────────────────────────────────────────────────────────┘
6 vulnerabilities found - Packages audited: 1199
Severity: 2 Moderate | 4 High
Done in 1.67s.
$yarn list --pattern css-what
yarn list v1.22.10
├─ <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="92f1e1e1bfe5faf3e6d2a7bca2bca3" rel="noreferrer noopener nofollow">[email protected]</a>
└─ <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0675706169463728352834" rel="noreferrer noopener nofollow">[email protected]</a>
└─ <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="177464643a607f7663572439233925" rel="noreferrer noopener nofollow">[email protected]</a>
最佳答案
由于严重性为中/高
并且是拒绝服务
,因此您实际上不必担心。如果发生重大严重
事件,互联网、Github 和您的同事会向您发出警报。
截至修复此问题时,没有像 npm
中那样的 yarn 审核修复
,但我们可以使用 npm
来修复这些问题或执行以下操作使用 Yarn 手动修复这些问题,这是一篇关于如何实现此目的的好文章:https://javascriptbit.com/yarn-audit-fix-security-issues/
关于vue.js - 我是否必须修复最新 nuxt.js 的审核问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68178057/