Dependabot 无法创建拉取请求,因为一个或多个其他依赖项需要与此更新不兼容的版本

Max*_*ima 5 github

今天在我的一个存储库中,我收到了此安全通知:

The kramdown gem before 2.3.0 for Ruby processes the template option inside Kramdown documents by default, which allows unintended read access (such as template="/etc/passwd") or unintended embedded Ruby code execution (such as a string that begins with template=" string://<%= `).

 NOTE: kramdown is used in Jekyll, GitLab Pages, GitHub Pages, and Thredded Forum.
Run Code Online (Sandbox Code Playgroud)

我尝试创建 dependentabot 安全更新,但无法更新到所需版本。

如何解决这个问题?

Don*_*kby 3

本周我在几个存储库中遇到了同样的问题。他们都使用 GitHub 页面生成静态站点,因此 JSON 漏洞可能无关紧要。但是,如果您可以升级远离易受攻击的 kramdown 版本,那就更容易了。

我的存储库的问题是它们使用的github-pagesgem版本早于 207。这些版本需要 kramdown 的易受攻击版本,因此 Dependabot 不会碰它。我不知道为什么 Dependabot 无法更新github-pages

为了解决这个问题,我使用了bundle update --all命令bundle update github-pages也有效,尽管在我的项目中它有相同的结果。它安装了一堆更新,并将它们记录在Gemfile.lock文件中。当我提交该更改时,GitHub 上的安全通知消失了。