Docker 安全扫描检测到 gradle 7.4.1 中的漏洞
使用 gradle 7.4.1 创建 docker 映像会触发安全扫描,显示漏洞 CVE-2020-36518。如何更新 gradle 包中的这个特定 jar 文件?
Creating a docker image with gradle 7.4.1 triggers the security scan which shows vulnerability CVE-2020-36518. How can this particular jar file within the gradle package be updated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我只是拒绝这个安全问题,并解释说不可能利用该漏洞,因为 Gradle 构建在受控输入上隔离运行,并且任何潜在攻击者都无法访问。
(当然,假设是这种情况,并且您没有自定义 Gradle 插件来使用 Jackson 从 Gradle 类路径读取不受信任的 JSON 文档。但即便如此,您所面临的风险也只是构建中的拒绝服务.)
在外部工具中摆弄 jar 文件很容易导致以后难以调试的问题。但如果你愿意,你可以为他们创建一个问题,询问他们是否可以撞上杰克逊版本以避免像这样的安全扫描带来不必要的噪音。 这里有一个示例。
I would just reject the security issue, explaining that it is not possible to exploit the vulnerability as the Gradle build runs isolated on controlled input, and is not accessible by any potential attackers.
(Assuming this is the case, of cause, and you don't have a custom Gradle plugin that reads untrusted JSON documents using Jackson from the Gradle classpath. But even then, all you are risking is a denial-of-service on the build.)
Fiddling around with jar files in external tools could easily lead to problems hard to debug later. But if you like, you could create an issue for them, asking if they could bump the Jackson version to avoid unnecessary noise from security scans like this. There is an example of that here.