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

迈向依赖供应链中可持续且安全的复用:对链路末端 NPM 包的初步分析

Towards Sustainable and Secure Reuse in Dependency Supply Chains: Initial Analysis of NPM packages at the End of the Chain

Nara Institute of Science and Technology(奈良先端科学技术大学院大学);The University of Osaka(大阪大学)

Brittany Anne Reid, Raula Gaikovina Kula

AI总结:

本文初步分析 NPM 中无外部依赖的链路末端包,发现其占关键依赖链逾半数且特征多样,为平衡复用收益与安全可持续实践提供启示。

摘要:

现代软件开发的成功很大程度上可归因于代码复用。通过第三方依赖复用现有功能的能力带来了巨大的生产力提升,但长期以来,主流理念一直是“尽可能多地复用,而不考虑所依赖的是什么”,由此形成了脆弱的依赖链。严重依赖也引发了对弹性和维护的担忧。在这篇愿景论文中,我们研究了挑战典型复用概念的包——即自身没有任何依赖、并承担处于依赖供应链末端责任的包。通过避免依赖,这些位于链路末端的包也可能规避相关风险。我们对被依赖最多的 NPM 包进行的初步分析表明,此类链路末端包在这些关键依赖链中占据相当大的比例(超过 50%)。我们发现,这些链路末端包在特征上存在差异,并非只是可以被轻易替代的包,并给出了五个案例。随后我们自问:维护者是否应当尽量减少外部依赖?我们认为,这些包揭示了关于战略性复用的重要经验——即在依赖生态系统不可否认的收益与可持续、安全的实践之间取得平衡。

英文摘要:

Much of the success of modern software development can be attributed to code reuse. The ability to reuse existing functionality via third-party dependencies has enabled massive gains in productivity, but for a long time the dominant philosophy has been to 'reuse as much as possible, without thought for what is being depended upon', creating fragile dependency chains. Heavy reliance has raised resiliency and maintenance concerns. In this vision paper, we investigate packages that challenge the typical concepts of reuse - that is, packages with no dependencies themselves that bear the responsibility of being at the end of the dependency supply chain. By avoiding dependencies, these packages at the end of the chain may also avoid the associated risks. Our initial analysis of the most depended upon NPM packages shows that such end-of-chain packages make up a significant portion of these critical dependency chain (over 50%). We find that these end-of-chain packages vary in characteristics and are not just packages that can be easily replaced, and present five cases. We then ask ourselves: Should maintainers minimize external dependencies? We argue that these packages reveal important lessons for strategic reuse-balancing the undeniable benefits of dependency ecosystems with sustainable, secure practices.

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

↑