一句话:通过大规模实证研究揭示 PyPI 许可证不兼容现状,并提出基于 SMT 的最小代价修复推荐方法 Silence。
现代软件包生态中,复杂的多层依赖图可能引入开源许可证不兼容。针对 PyPI 生态证据不足与修复实践不明的问题,本文开展大规模实证研究:发现 7.27% 的 PyPI 包版本存在许可证不兼容,其中 61.3% 由传递依赖导致;开发者采用迁移、移除、固定版本、更改自身许可证和协商五种修复策略。受此启发,作者提出 Silence,一种基于 SMT 求解器的方法,在包依赖图中推荐代价最小的许可证不兼容修复方案。评估表明,Silence 的建议能匹配 19 个历史真实案例(现有知识库未覆盖的迁移除外),并被五个此前未意识到不兼容问题的热门 PyPI 包开发者接受。
The reuse and distribution of open-source software must be in compliance with its accompanying open-source license. In modern packaging ecosystems, maintaining such compliance is challenging because a package may have a complex multi-layered dependency graph with many packages, any of which may have an incompatible license. Although prior research finds that license incompatibilities are prevalent, empirical evidence is still scarce in some modern packaging ecosystems (e.g., PyPI). It also remains unclear how developers remediate the license incompatibilities in the dependency graphs of their packages (including direct and transitive dependencies), let alone any automated approaches. To bridge this gap, we conduct a large-scale empirical study of license incompatibilities and their remediation practices in the PyPI ecosystem. We find that 7.27% of the PyPI package releases have license incompatibilities and 61.3 % of them are caused by transitive dependencies, causing challenges in their remediation; for remediation, developers can apply one of the five strategies: migration, removal, pinning versions, changing their own licenses, and negotiation. Inspired by our findings, we propose Silence, an SMT-solver-based approach to recommend license incompatibility remediations with minimal costs in package dependency graph. Our evaluation shows that the remediations proposed by Silencecan match 19 historical real-world cases (except for migrations not covered by an existing knowledge base) and have been accepted by five popular PyPI packages whose developers were previously unaware of their license incompatibilities.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2308-05942,
title = {Understanding and Remediating Open-Source License Incompatibilities in the PyPI Ecosystem},
author = {Weiwei Xu and Hao He and Kai Gao and Minghui Zhou},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00175}
}