Catch the Butterfly: Peeking into the Terms and Conflicts among SPDX Licenses

Tao Liu, Chengwei Liu, Tianwei Liu, He Wang, Gaofei Wu, Yang Liu, Yuqing Zhang

TL;DR

This paper tackles the growing complexity of software licenses by introducing a high-quality, term-granular dataset of 453 SPDX licenses. They propose a standardized set of license terms and a novel conflict model, revealing that while permissive licenses dominate, subtle term differences and copyleft licenses are significant sources of potential legal conflicts.

What Problem Does This Paper Address?

The widespread adoption of third-party libraries (TPLs) in software development, while accelerating innovation, introduces significant legal risks. Developers can inadvertently violate TPL licenses, leading to legal issues. Existing research on license compatibility often relies on limited license sets or low-quality data, hindering accurate analysis. This paper addresses the urgent need for a comprehensive, high-quality dataset of mainstream software licenses with detailed term-level information and conflict analysis to help developers navigate this complex landscape.

Methods

The authors developed a multi-stage methodology to create their dataset and analyze license conflicts:

  • Standardized Term Set Creation: They began by analyzing license terms from three prominent platforms (Choosealicense, TLDRLegal, OpenEuler) and, through differential analysis and consultation with legal experts, derived a standardized set of 22 license terms.
  • SPDX License Labeling: They then meticulously labeled each of the 453 SPDX licenses with these standardized terms, assigning attitudes (permission/prohibition for rights, obligation for obligations). This involved manual inspection and validation by multiple annotators.
  • Improved Conflict Model: They enhanced existing license conflict models by incorporating "copyleft conflicts," which arise from the contagious nature of copyleft licenses. This led to a classification of three major types of license conflicts (C1: right conflicts, C2: obligation conflicts, C3: copyleft conflicts).
  • Empirical Studies: Two empirical studies were conducted:
  • An analysis of similarities, differences, and conflicts among the 453 SPDX licenses to understand licensor concerns.
  • A revisit of license usage and conflicts within the NPM ecosystem, focusing on minority licenses and license evolution.

Datasets

  • SPDX License Dataset: The core contribution is a newly created, high-quality dataset of 453 SPDX licenses, meticulously labeled with 22 standardized terms and their corresponding attitudes. This dataset is made publicly available.
  • NPM Ecosystem Data: For their empirical study on the NPM ecosystem, they collected data from 3.37 million libraries and 35.91 million versions, including license assignments and dependency information.

Key Insights and Ideas

  • The "Butterfly Effect" of Licenses: Even seemingly minor differences in license terms, especially concerning copyleft provisions, can have cascading and significant legal implications across complex dependency chains.
  • Beyond License Names: Relying solely on license names (like MIT or Apache) is insufficient. The true compatibility lies in the granular terms and their specific attitudes (permission/prohibition/obligation).
  • NPM's Illusion of Safety: While the NPM ecosystem is dominated by permissive licenses like MIT, this doesn't eliminate conflict risks. Minority licenses and subtle obligations within popular licenses can still lead to significant incompatibilities.
  • Copyleft's Contagion: Copyleft licenses, due to their "infectious" nature, are a primary driver of severe conflicts (C3), especially when combined with licenses that don't explicitly grant rights like "Use Patent Claims."
  • Data Quality is Paramount: The paper highlights significant inaccuracies in existing license labeling platforms, underscoring the necessity of their meticulously curated dataset for reliable analysis.

Key Results

  • High-Quality Dataset: A dataset of 453 SPDX licenses with 22 standardized terms and attitudes, validated with 83.68% consistency among manual examiners.
  • License Conflict Types: Identified and categorized three major types of license conflicts (C1, C2, C3), with C2 (obligation conflicts) being the most prevalent across SPDX licenses.
  • NPM Ecosystem Findings:
    • MIT and ISC are the dominant licenses, but 17% of NPM packages lack explicit licenses.
  • License changes are rare, with maintainers preferring to stick to permissive licenses like MIT, often due to its explicit "Sublicense" grant.
  • While permissive licenses are common, conflicts arise from obligations like "Include Notice" and "State Changes" (Apache-2.0) and the "Sublicense" right in MIT.
  • Copyleft licenses in dependencies can cause severe C3 conflicts, even in projects dominated by permissive licenses.
  • Conflict Drivers: For C1 conflicts, "Commercial Use" and "Sublicense" are major contributors. For C2 conflicts, obligations like "State Changes," "Give Credit," "Include Notice," and "Disclose Source" are key. "Use Patent Claims" is the dominant term in C3 conflicts.

Limitations and Future Work

  • Limited Term Set: The 22 identified license terms might not cover all specific requirements found in every license.
  • NPM Data Coverage: While extensive, some NPM libraries were excluded due to unparsable license names.
  • Unmentioned Rights: Potential conflicts arising from rights not explicitly mentioned in licenses were excluded due to ongoing controversy but are flagged as a future threat.
  • Questionnaire Participant Seriousness: While one participant was discarded, the consistency of the rest was high, but the "seriousness" of all participants cannot be fully guaranteed.
  • Future Work: The authors suggest refining license conflict models, especially for copyleft licenses, and continuing to investigate the evolution of licenses and their impact on compatibility. They also propose that their dataset can be used to develop automated tools for license identification and conflict detection.

Summary updated

Abstract

The widespread adoption of third-party libraries (TPLs) in software development has accelerated the creation of modern software. However, this convenience comes with potential legal risks. Developers may inadvertently violate the licenses of TPLs, leading to legal issues. While existing studies have explored software licenses and potential incompatibilities, these studies often focus on a limited set of licenses or rely on low-quality license data, which may affect their conclusions. To address this gap, there is a need for a high-quality license dataset that encompasses a broad range of mainstream licenses to help developers navigate the complex landscape of software licenses, avoid potential legal pitfalls, and guide solutions for managing license compliance and compatibility in software development. To this end, we conduct the first work to understand the mainstream software licenses based on term granularity and obtain a high-quality dataset of 453 SPDX licenses with well-labeled terms and conflicts. Specifically, we first conduct a differential analysis of the mainstream platforms to understand the terms and attitudes of each license. Next, we propose a standardized set of license terms to capture and label existing mainstream licenses with high quality. Moreover, we include copyleft conflicts and conclude the three major types of license conflicts among the 453 SPDX licenses. Based on these, we carry out two empirical studies to reveal the concerns and threats from the perspectives of both licensors and licensees. One study provides an in-depth analysis of the similarities, differences, and conflicts among SPDX licenses, revisits the usage and conflicts of licenses in the NPM ecosystem, and draws conclusions that differ from previous work. Our studies reveal some insightful findings and disclose relevant analytical data, which set the stage for further research.
BibTeX
@inproceedings{liu2024catch,
  author = {Tao Liu and Chengwei Liu and Tianwei Liu and He Wang and Gaofei Wu and Yang Liu and Yuqing Zhang},
  title = {{Catch the Butterfly: Peeking into the Terms and Conflicts among SPDX Licenses}},
  booktitle = {SANER},
  year = {2024},
  doi = {10.1109/saner60148.2024.00056},
}
Figure