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 most project dependencies are not released to production. In fact, the majority of dependencies declared as runtime dependencies are not used in production, while some development dependencies are used in production, debunking two common assumptions of dependency management. Our analysis reveals that the functionality of a package is not enough to determine if it will be shipped to production or not. 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.
翻译:现代软件系统往往通过利用他人以图书馆和软件包形式编写的编码来建立现代软件系统,以加速其开发。虽然使用第三方软件包有许多好处,但软件项目往往依赖大量软件包。因此,开发者面临维持项目依赖性的困难,因为他们不断更新项目,没有安全漏洞。然而,在生产过程中使用项目依赖性,从而可能威胁项目安全时,项目依赖性如何经常发生?我们利用节点软件包管理员(npm)对100 JavaScript项目进行一项经验研究,以量化项目依赖性如何经常被释放到生产,并分析其特点及其对安全的影响。我们的结果显示,大多数项目依赖性项目依赖性没有被释放到生产中。事实上,宣布的运行依赖性大多用于生产中,而某些发展依赖性被用于生产,削弱了对依赖性的两种共同假设。我们的分析表明,一个软件包的功能不足以确定它是否被运往生产,而不是运往生产。结论还表明,大多数安全警觉性警报用于生产,而不是用于生产中的高度依赖性。