Severity
Low
Short Description
(Experimental) An ambiguous license classifier was found.
Packages
View packages with this alert.Suggestion
A specific license or licenses should be identified
The Ambiguous License Classifier alert focuses on identifying cases where PEP 301 license classifiers in Python packages are too vague or ambiguous to be certain which specific license applies. PEP 301 classifiers are metadata used in PyPI packages to indicate the license under which the package is distributed. However, some of these classifiers are not specific enough, leading to potential confusion about the exact licensing terms.
For example, the classifier License :: OSI Approved :: BSD License indicates that the package uses a BSD license, but it doesn't clarify which one. The BSD family includes licenses like the BSD 2-Clause License, BSD 3-Clause License, and others, each with slightly different terms. This lack of specificity creates uncertainty about which rules apply when using, modifying, or distributing the software.
PEP 639 proposes using SPDX identifiers for precise license specification. This would allow developers to specify the exact license, such as License-Expression: BSD-3-Clause
.
While PEP 639 has been accepted, the transition to SPDX identifiers is still ongoing.
In the Python ecosystem, many older packages still use these vague classifiers, and Socket's Ambiguous Classifier alert helps flag these packages for further review. It serves as a signal to double-check the licensing information before proceeding with the package, ensuring you're not at risk of violating any unknown license terms.
If you encounter a dependency with this alert, here are some recommended actions:
LICENSE
file within the source code repository. This is often where the exact license is detailed, even if the classifier is ambiguous.Here's a common example of the Ambiguous License Classifier alert flagging multiple files where the License :: OSI Approved :: BSD License classifier is used.
The Ambiguous License Classifier alert is triggered when a package's license classifier is unclear. PEP 301 classifiers were an attempt by the Python ecosystem to do license identification. They created a closed universe of license classifiers, some of which were ambiguous in that they identify more than one license without any additional information.
For example, the PEP 301 classifier License :: OSI Approved :: BSD License does not specify which of the many BSD licenses applies, nor does it specify whether would-be licensees must abide by the terms of all BSD licenses, or whether they can choose any of the BSD licenses. These classifiers are still common in PyPI packages and need to be analyzed.
Currently this alert only applies to the Python ecosystem but support may be expanded in the future.
PEP 301 – Package Index and Metadata for Python
Python Package Index (PyPI) – Classifiers