TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do you prioritize the update of vulnerable 3rd party packages?

6 点作者 niros_valtos超过 2 年前
More specifically: 1. How do you know if the vulnerable package is called in a way that it can be exploited? For example, if the package has a critical vulnerability in a method &quot;myFunc&quot; but it is never called by your code, it won&#x27;t be exploitable.<p>2. How do you know if it is safe to upgrade a package and it won&#x27;t break changes? For example, if version 1.2.3 has &quot;myFunc(p1,p2)&quot; and it is called by your code, but the vulnerability was fixed in version 1.2.4, which has &quot;myFunc(p1,p2,p3)&quot;.<p>3. What do you do if the vulnerable package is a sub-package of another package used by your code?

2 条评论

tauwauwau超过 2 年前
There are tools for it, I have seen Contrast Security being used in workplace for Java applications. It reports insecure code and out of date libraries. I have seen it flag some Basic Authentication classes from Spring framework. It can be integrated with the CI&#x2F;CD build pipeline. It also has a Java agent, which monitors runtime API calls to track if any vulnerable class is being accessed at runtime.<p>1. Use some software like Contrast Security to do it for you. Tools like these can tell you if your code accesses some vulnerable class&#x2F;method at runtime. However, you&#x27;ll have to determine whether you want to fix it. For example it has recently started flagging iText 2.1.7 libraries, but we determined that it was not exploitable in our application. It has to be done on case by case basis.<p>2. Only your unit&#x2F;integration tests and QA testing can tell you if it works. Our team creates stories to update libraries, developers work on upgrade, do a superficial test that every thing seems to work and hand it over to QA team. They then test the running application in test environment and give it a go ahead if everything works.<p>3. We try to exclude the sub package (Maven&#x2F;Gradle) and see if it breaks the application, we also try to upgrade the sub package to a newer version. If you&#x27;re lucky, there won&#x27;t be breaking changes. But sometimes, there are breaking changes and you&#x27;ll have to rewrite your code to bring newer version of parent package, which in turn brings newer version of sub package.<p>Bottom line is it&#x27;s hard work, there&#x27;s no magic bullet.<p>I&#x27;m not affiliated with Contrast in anyway, there should be other tools for the same purpose.
cpach超过 2 年前
Related announcement that’s quite interesting IMHO: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=32738555" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=32738555</a>