Skip to content

Limitations

Detection is package-level

license-audit reads what's declared in package metadata: PEP 639 fields, the legacy License field, trove classifiers. It does not scan the contents of LICENSE or NOTICE files to identify a license, and it can't detect bundled or vendored code whose license differs from the package's declaration. For file-level scanning, use ScanCode.

Packages built from the project are its own code

A package installed from a directory inside the project (the directory holding its pyproject.toml), such as a uv workspace member or a path dependency under the project root, counts as part of the project and isn't audited; its own dependencies are. Third-party code installed that way is skipped like any vendored code, so install it from an index or a wheel to have it audited.

OSADL coverage is finite

The OSADL compatibility matrix covers about 120 well-known open-source licenses. A handful of common permissive licenses its data leaves out are classified built-in: CC0-1.0, CNRI-Python, ZPL-2.1, CC-BY-4.0, Python-2.0.1, MIT-Modern-Variant, and BSD-3-Clause-Clear. Any other valid SPDX license outside the data is detected but classifies as unknown; record your judgement in [tool.license-audit.license-classifications] to resolve it (an entry there also overrides a built-in category). A license with a category but no matrix entry, a built-in one or one OSADL categorizes without rating its compatibility (OFL-1.1, CC-BY-SA-3.0, AGPL-1.0), raises no conflicts, and recommendations rest on its category as they do for a classified license: a weak-copyleft one limits them to permissive and weak-copyleft licenses, and a stronger one withholds them. Strings that aren't SPDX at all produce "Unknown" verdicts; use [tool.license-audit.overrides] to assign SPDX identifiers manually when detection fails.

Compatibility reads OSADL for libraries

The OSADL matrix answers whether code under one license can be incorporated into a work under another. license-audit applies it the way Python dependencies are combined, as separately distributed libraries:

  • A permissive or weak-copyleft dependency (MIT, LGPL, MPL) never constrains a permissive or weak-copyleft outbound license, because its obligations stay with its own files.
  • A strong- or network-copyleft dependency (GPL, AGPL) makes the combined work copyleft, so it needs a strong- or network-copyleft outbound license, and every other dependency is held to the matrix verdict for that license.

OSADL marks some combinations "Check dependency": they work or not depending on how the code is combined (GPL-2.0-only with LGPL-2.1, AGPL-3.0 with GPL-3.0). These never fail check, but they aren't recommended outright; when they are the only fit, recommend lists them as needing review and check warns.

A WITH exception form OSADL has no entry for is checked as its base license when the base is strong or network copyleft (GPL-2.0-or-later WITH Bootloader-exception as GPL-2.0-or-later), matching its category: an exception only adds permissions, so the base is a safe upper bound. If an exception frees your project from the base's terms, record that in [tool.license-audit.license-classifications]. Exception forms of permissive and weak-copyleft licenses constrain nothing.

One verdict departs from OSADL: PSF-2.0 (typing-extensions, among others) counts as usable in GPL-family works, as the FSF's license list states, where OSADL says it is not. The matrix is otherwise a strict reading of compatibility, so treat its conflicts as a default guardrail, not a final answer.

License strings on PyPI are messy

PyPI packages use inconsistent license strings. license-audit normalizes 60+ common aliases to SPDX identifiers. Strings it can't map (e.g. Proprietary License) are reported verbatim and flagged as an unknown category rather than collapsed to UNKNOWN, and the Markdown report's Licenses Requiring Review section includes their license text so you can verify the terms. Use overrides to assign a canonical SPDX identifier once you've confirmed it.

You must provision the environment first

license-audit reads an already-installed environment; it does not resolve or install dependencies. Run uv sync, poetry install, pip install -e ., or equivalent before auditing. Only what's installed is audited: a dependency the project requires that isn't installed fails the check rather than passing unread, but optional extras and dependency groups you didn't install are left out (see required dependencies).

Environment markers track the audited environment

Dependency markers are evaluated for the audited virtualenv's Python version, read from its pyvenv.cfg, and for the current platform. Dependencies that are conditional on a different platform aren't included.

The output is informational, based on OSADL data. Real license compatibility depends on how you distribute, how you link, and what jurisdiction you're in. Treat anything this tool generates as a starting point for legal review, not the final answer.