Npm依赖项审核错误,除了最新的依赖项版本外,还更新了cloud-s4-sdk-pipeline

use*_*455 5 sap-cloud-sdk

我们切换到了cloud-s4-sdk-pipeline的最新版本(21)。新功能可以正常工作,但是除了最新的依赖版本之外,我们还会收到npm依赖审核错误。

调查结果摘要

•  High Arbitrary File Overwrite vulnerability found in dependency "tar", see https://npmjs.com/advisories/803 for details.
•  High Code Injection vulnerability found in dependency "js-yaml", see https://npmjs.com/advisories/813 for details.
•  Moderate Regular Expression Denial of Service vulnerability found in dependency "mime", see https://npmjs.com/advisories/535 for details.
•  Moderate Regular Expression Denial of Service vulnerability found in dependency "underscore.string", see https://npmjs.com/advisories/745 for details.
•  Moderate Prototype Pollution vulnerability found in dependency "lodash", see https://npmjs.com/advisories/782 for details.
•  Moderate Denial of Service vulnerability found in dependency "js-yaml", see https://npmjs.com/advisories/788 for details.
Run Code Online (Sandbox Code Playgroud)

您有类似的问题吗?有解决方案吗?

flo*_*e77 1

从 v20 到 v21 的主要变化之一是我们现在正在审核可以在您的项目中找到的所有 package.json 文件(对于 Whitesource 扫描也是如此)。

我认为您的项目就是这种情况,因此会弹出新的审计结果。

我建议您npm audit --fix在 package.json 的目录中本地执行并提交生成的 package-lock.json。如果这也不能解决您的问题,最后一个解决方案是将这些 npm 审核问题在 pipeline_config.yaml 中标记为“已审核”,如此处所述