在 github 的安全选项卡下有一个 Dependabot 栏。 该列中有更多安全警报。为了修复警报
我们需要增加 package-lock.json 文件中列出的软件包的版本。但我的前辈建议不要将这些更改提交到 github 中。有人有解决此警报问题的想法吗?
您的项目根目录中可能有一个 .github 目录,并且那里有一个文件“dependabot.yml”。尝试使用 flagignore 来忽略一些包:
ignore:
- dependency-name: "express"
# For Express, ignore all Dependabot updates for version 4 and 5
versions: ["4.x", "5.x"]
# For Lodash, ignore all updates
- dependency-name: "lodash"
# For AWS SDK, ignore all patch updates for version updates only
- dependency-name: "aws-sdk"
update-types: ["version-update:semver-patch"]
详情请见github