GitHub上的Dependabot工具介绍

      打开GitHub上的一个项目,如NN_Test,依次点击Settings --> Security --> Code security and analysis,界面如下图所示:会有Dependabot相关的设置项

       GitHub上有个用户名为Dependabot:Automated dependency updates built into GitHub,GitHub提供的一个工具,用于自动更新你项目中依赖项,核心项目Dependabot Core:https://github.com/dependabot/dependabot-core。

      Dependabot Core是一个包集合,用于在Ruby、JavaScript、Python、PHP、Elixir、Elm、Go、Rust、Java和.NET中自动更新依赖项。它还可以更新git submodules、 Docker files、and Terraform files:

      (1).在你的项目有其它依赖项的情况下检查可解析的依赖项的最新版本的逻辑(logic);

      (2).为新的依赖版本生成更新清单和锁定文件(generate updated manifest and lockfiles)的逻辑;

      (3).查找更改日志、发行说明和依赖项更新提交(find changelogs, release notes, and commits)的逻辑。

      Dependabot alerts(警报):当在你的项目使用的依赖项中检测到已知漏洞时,Dependabot会生成Dependabot警报。如下图所示:

       Dependabot alerts默认是开启的,可选择关闭:Settings --> Security --> Code security and analysis: 单击Dependabot alerts的Disable按钮。若再次开启,则单击Dependabot alerts的Enable按钮即可。

      Dependabot security updates:Dependabot可以通过自动触发(raise)pull requests以将依赖项更新为安全版本来帮助你修复易受攻击(有漏洞)的依赖项。如下图所示:

      Dependabot security updates默认是开启的,可选择关闭:Settings --> Security --> Code security and analysis: 单击Dependabot security updates的Disable按钮。若再次开启,则单击Dependabot security updates的Enable按钮即可。

      Dependabot version updates:你可以使用Dependabot自动将存储库(your repository)中使用的依赖项和包更新到最新版本,即使它们没有任何已知的漏洞,默认是关闭的。

      (1).启用Dependabot version updates:配置Dependabot版本更新,以便Dependabot自动更新你使用的包:进入项目主页:Settings --> Security --> Code security and analysis:单击Dependabot version updates的Enable按钮,会在master分支的根目录下生成.github/dependabot.yml文件,然后对dependabot.yml文件进行配置,将dependabot.yml文件存放到存储库的.github目录中。dependabot.yml的配置可参考:https://docs.github.com/cn/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

      (2).禁用Dependabot version updates:通过从仓库删除dependabot.yml文件完全禁用版本更新。

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值