今天在我的一个存储库中,我收到了此安全通知:
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 安全更新,但无法更新到所需版本。
如何解决这个问题?
本周我在几个存储库中遇到了同样的问题。他们都使用 GitHub 页面生成静态站点,因此 JSON 漏洞可能无关紧要。但是,如果您可以升级远离易受攻击的 kramdown 版本,那就更容易了。
我的存储库的问题是它们使用的github-pagesgem版本早于 207。这些版本需要 kramdown 的易受攻击版本,因此 Dependabot 不会碰它。我不知道为什么 Dependabot 无法更新github-pages。
为了解决这个问题,我使用了bundle update --all命令。bundle update github-pages也有效,尽管在我的项目中它有相同的结果。它安装了一堆更新,并将它们记录在Gemfile.lock文件中。当我提交该更改时,GitHub 上的安全通知消失了。
| 归档时间: |
|
| 查看次数: |
4525 次 |
| 最近记录: |