GitHub上的Dependabot工具介绍

x33g5p2x  于2022-07-26 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(346)

    打开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文件完全禁用版本更新。

相关文章

微信公众号

最新文章

更多