arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2207.14711cs.SE
收藏

不一定所有的可支配性都是平等的--基于NPM的生产可支配性实证研究

Not All Dependencies are Equal: An Empirical Study on Production Dependencies in NPM

Jasmine Latendresse, Suhaib Mujahid, Diego Elias Costa, Emad Shihab

摘要:

现代软件系统通常是通过利用其他人以库和包的形式编写的代码来构建的,以加速其开发。虽然使用第三方软件包有很多好处,但软件项目往往依赖于大量的软件包。因此,开发人员面临着通过保持项目依赖性的最新和无安全漏洞来维护项目依赖性的艰巨挑战。然而,在生产环境中,项目依赖关系会对项目的安全性构成威胁,这种情况有多频繁?我们使用Node Package Manager(npm)对100个JavaScript项目进行了实证研究,以量化项目依赖关系发布到生产环境的频率,并分析其特征及其对安全性的影响。我们的结果表明,只有不到1%的已安装依赖项被发布到生产环境。我们的分析表明,软件包的功能不足以决定它是否会被发布到生产环境。事实上,59%的已安装依赖配置为运行时依赖,并没有在生产中使用,而28.2%的依赖配置为开发依赖在生产中使用,揭穿了依赖管理的两个常见假设。调查结果还表明,大多数安全警报针对的是生产中未使用的依赖项,这使得它们极不可能对软件的安全性构成风险。我们的研究揭示了依赖管理更复杂的一面:并非所有的依赖都是平等的。生产中使用的安全性对安全性暴露更敏感,应优先考虑。然而,当前的工具在识别生产依赖性方面缺乏适当的支持。

英文摘要:

Modern software systems are often built by leveraging code written by others in the form of libraries and packages to accelerate their development. While there are many benefits to using third-party packages, software projects often become dependent on a large number of software packages. Consequently, developers are faced with the difficult challenge of maintaining their project dependencies by keeping them up-to-date and free of security vulnerabilities. However, how often are project dependencies used in production where they could pose a threat to their project's security? We conduct an empirical study on 100 JavaScript projects using the Node Package Manager (npm) to quantify how often project dependencies are released to production and analyze their characteristics and their impact on security. Our results indicate that less than 1% of the installed dependencies are released to production. Our analysis reveals that the functionality of a package is not enough to determine if it will be released to production or not. In fact, 59% of the installed dependencies configured as runtime dependencies are not used in production, and 28.2% of the dependencies configured as development dependencies are used in production, debunking two common assumptions of dependency management. Findings also indicate that most security alerts target dependencies not used in production, making them highly unlikely to be a risk for the security of the software. Our study unveils a more complex side of dependency management: not all dependencies are equal. Dependencies used in production are more sensitive to security exposure and should be prioritized. However, current tools lack the appropriate support in identifying production dependencies.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑