Software Licenses: The Complete Guide

Every piece of software you download, copy, link against or ship comes with a license, and the license, not the price, decides what you may do with it. This guide lists the licenses you will actually meet, explains what each one allows and demands, shows which projects use them, and ends with practical rules: how to pick one for your own code, how to comply when you use other people's code, and which combinations do not mix.

Published: November 5, 2026 (7531-11-15 in the Bulgarian calendar)

This is an engineering guide, not legal advice. For a product decision with money behind it, show the actual license text to a lawyer.

Contents

  1. The six questions every license answers
  2. The license families
  3. Comparison matrix
  4. Permissive licenses
  5. Public domain and "do whatever you want" licenses
  6. Weak copyleft licenses
  7. Strong copyleft licenses
  8. Network copyleft
  9. License exceptions
  10. Source-available licenses (not open source)
  11. Proprietary software and the "no license" trap
  12. Licenses for content, fonts, hardware, data and AI models
  13. Historical and niche licenses you may still meet
  14. Compatibility: what can be combined with what
  15. How to choose a license for your project
  16. How to apply a license correctly
  17. How to comply when you use other people's code
  18. Contributing to others: CLA, DCO and relicensing
  19. Tools for license scanning and SBOMs
  20. Common mistakes
  21. FAQ
  22. Glossary

1. The six questions every license answers

Licenses look different but they all answer the same handful of questions. Once you can read these off a license, you can place any license you meet.

QuestionWhat it means in practice
May I use, copy, modify and redistribute it?Every open source license says yes to all four, for any purpose, including commercial use. If a license forbids any of these, it is not open source by the Open Source Definition, whatever its marketing says.
Must I keep the copyright and license notice?Almost always yes. This is the one obligation even the loosest licenses keep: ship the author's copyright line and the license text with your copy.
Must I share my source code when I distribute?This is the copyleft question. Permissive licenses: no. Weak copyleft: only the files or library you changed. Strong copyleft: the whole program that includes the code.
Does "distribute" include running it as a web service?For every license except the AGPL and a few source-available ones, no. Running GPL code on your own servers for users over the network is not distribution and triggers nothing. The AGPL was written precisely to close that gap.
Do I get a patent license?Apache 2.0, MPL 2.0, EPL 2.0, GPLv3, LGPLv3 and AGPLv3 contain an explicit patent grant from contributors, usually with a "if you sue over patents you lose the license" clause. MIT and BSD say nothing about patents; most lawyers read an implied grant into them, but it is not written down.
May I use the project's name and logo?No license covers trademarks, and Apache 2.0 says so explicitly. You can fork Firefox's code; you cannot ship the result as "Firefox". Check the project's separate trademark policy.

2. The license families

With those questions in hand, every license falls into one of a few families, ordered from the fewest obligations to the most.

FamilyThe dealMembers
Public domain and equivalentsNo conditions at all, or none beyond keeping a short notice. Nothing is asked of you.CC0, Unlicense, 0BSD, MIT-0, WTFPL, public domain dedication
PermissiveDo anything, keep the notice. You may build proprietary products on it and never release a line.MIT, BSD-2, BSD-3, ISC, Apache 2.0, zlib, Boost, PostgreSQL, PSF, Artistic 2.0, NCSA
Weak copyleftChanges to the licensed files or library must be shared under the same license; your own code around it may stay proprietary.MPL 2.0, LGPL 2.1, LGPL 3.0, EPL 2.0, CDDL, EUPL (partly)
Strong copyleftAny program that incorporates the code and is distributed must be released whole, in source, under the same license.GPL 2.0, GPL 3.0, EUPL 1.2, OSL 3.0
Network copyleftStrong copyleft, plus: offering a modified version over a network counts as distribution, so SaaS operators must publish their changes.AGPL 3.0, OSL 3.0, SSPL (not open source)
Source-availableYou can read and often use the code, but with a restriction (no competing service, no production use, converts to open source after N years) that fails the Open Source Definition.BSL 1.1, SSPL, Elastic License 2.0, RSALv2, Functional Source License, PolyForm, Commons Clause
ProprietaryAll rights reserved except those a contract grants you. "Public on GitHub with no LICENSE file" belongs here, not in open source.EULAs, enterprise agreements, unlicensed repositories

3. Comparison matrix

The matrix covers the licenses you will meet in nine out of ten dependency trees. "GPL-compatible" means code under that license may be combined into a GPLv3 program; the GPLv2 column differs because Apache 2.0 and GPLv2 do not mix. SPDX identifiers are the short names machines and package managers use.

License SPDX Family Must share source Patent grant GPLv3 compatible GPLv2 compatible Network use is distribution Well-known users
MITMITPermissiveNoNot writtenYesYesNoNode.js, React, Rails, .NET, Angular, Vue, jQuery
BSD 2-ClauseBSD-2-ClausePermissiveNoNot writtenYesYesNoFreeBSD, NetBSD
BSD 3-ClauseBSD-3-ClausePermissiveNoNot writtenYesYesNoGo, Django, Flask, NumPy, Valkey, LLVM (old), Redis before 2024
ISCISCPermissiveNoNot writtenYesYesNoOpenBSD, OpenSSH, BIND 9, the npm default
Apache 2.0Apache-2.0PermissiveNoYes, with retaliationYesNoNoKubernetes, Android, TensorFlow, Kafka, Hadoop, Swift, OpenSearch, OpenSSL 3
zlibZlibPermissiveNoNot writtenYesYesNozlib, SDL 2, Bullet
BoostBSL-1.0PermissiveNoNot writtenYesYesNoBoost C++ libraries, Catch2
UnlicenseUnlicensePublic domainNoNot writtenYesYesNoyoutube-dl, many small tools
CC0 1.0CC0-1.0Public domainNoExplicitly noneYesYesNoData sets, artwork; discouraged for code
0BSD0BSDPublic domainNoNot writtenYesYesNoToybox, parts of Android, many Rust and JS crates
MPL 2.0MPL-2.0Weak copyleft (per file)Modified files onlyYesYesYesNoFirefox, Thunderbird, LibreOffice, OpenTofu, Terraform before 2023, Consul before 2023
LGPL 2.1LGPL-2.1-only / -or-laterWeak copyleft (library)The library, if changedNot writtenYes (or-later)YesNoglibc, FFmpeg (most of it), GTK, libVLC
LGPL 3.0LGPL-3.0-only / -or-laterWeak copyleft (library)The library, if changedYesYesNoNoQt (open source edition), GNU libraries
EPL 2.0EPL-2.0Weak copyleft (module)Modified modulesYesOnly with the secondary-license optionOnly with the secondary-license optionNoEclipse IDE, Jakarta EE, JUnit 5
CDDL 1.0CDDL-1.0Weak copyleft (per file)Modified files onlyYesNoNoNoOpenZFS, illumos, old NetBeans and GlassFish
GPL 2.0GPL-2.0-only / -or-laterStrong copyleftWhole programNot writtenOnly if "or later"YesNoLinux kernel (only), Git, MySQL, WordPress (or later), Qt dual, U-Boot
GPL 3.0GPL-3.0-only / -or-laterStrong copyleftWhole programYesYesNoNoGCC, Bash, GIMP, Ansible, Samba, Emacs, coreutils
AGPL 3.0AGPL-3.0-only / -or-laterNetwork copyleftWhole program, also when served over a networkYesYes (special clause)NoYesNextcloud, Mastodon, Grafana, MinIO, Redis 8 (one of its options), Elasticsearch (option since 2024), Ghostscript, Odoo Community
EUPL 1.2EUPL-1.2Strong copyleft with compatibility listWhole program, also over a networkYesVia its compatibility annexVia its compatibility annexYesEU public-sector software, Joinup projects
BSL 1.1BUSL-1.1Source-availableNoNoNoNoDepends on the "Additional Use Grant"Terraform, Vault, MariaDB MaxScale, Couchbase, Sentry until 2023
SSPL 1.0SSPL-1.0Source-availableWhole service stack if offered as a serviceYesNoNoYes, extremelyMongoDB, Elasticsearch 2021 to 2024
Elastic License 2.0Elastic-2.0Source-availableNoYesNoNoForbids a managed serviceElasticsearch and Kibana (one of their options), Airbyte

4. Permissive licenses

Permissive licenses ask one thing: keep the notice. They are the default choice for libraries that want maximum adoption, including inside proprietary products. The differences between them are small but real: patents, the NOTICE file, and whether the notice must also appear in binaries.

MIT License

BSD 2-Clause ("Simplified" or "FreeBSD") License

BSD 3-Clause ("New" or "Modified") License

ISC License

Apache License 2.0

zlib License

Boost Software License 1.0

PostgreSQL License

Python Software Foundation License

Artistic License 2.0

University of Illinois / NCSA License

Microsoft Public License (MS-PL)

5. Public domain and "do whatever you want" licenses

A public domain dedication gives up copyright entirely. The trouble is that several countries, including Germany and France, do not let an author waive their rights, so a bare "this is public domain" statement is legally uncertain outside the United States. The licenses below exist to get the same result in a way that works everywhere.

CC0 1.0 Universal

The Unlicense

0BSD (Zero-Clause BSD)

WTFPL

SQLite's public domain

SQLite is the best-known public domain software. Its authors dedicate the code to the public domain and, for companies whose lawyers cannot accept that, sell a Warranty of Title. That sale exists precisely because of the jurisdictional problem described above.

6. Weak copyleft licenses

Weak copyleft draws a boundary around the licensed code. Inside the boundary, changes must be shared under the same license. Outside it, your own code may be proprietary. The licenses differ in where they draw the line: a file, a module, or a library.

Mozilla Public License 2.0

GNU Lesser General Public License 2.1 and 3.0

Eclipse Public License 2.0

Common Development and Distribution License 1.0 / 1.1

7. Strong copyleft licenses

Strong copyleft follows the code wherever it goes. If you distribute a program that contains GPL code, whether linked, copied or compiled in, the recipient must get the complete corresponding source of the whole program under the GPL. The point is to guarantee that users of the software always have the freedom to study and change it. The cost is that proprietary products cannot incorporate it.

GNU General Public License 2.0

GNU General Public License 3.0

European Union Public Licence 1.2

Open Software License 3.0

8. Network copyleft

Under the ordinary GPL, running modified software on your own servers and letting the public use it over the network is not distribution, so you owe nobody the source. Companies built whole businesses on that gap, often called the "ASP loophole". Network copyleft closes it.

GNU Affero General Public License 3.0

9. License exceptions

An exception is extra permission attached to a copyleft license to make it workable in a specific situation. SPDX writes them with WITH: GPL-2.0-only WITH Classpath-exception-2.0.

ExceptionAttached toWhat it allowsWhere you meet it
GCC Runtime Library ExceptionGPLv3Programs compiled with GCC may link the GCC runtime (libgcc, libstdc++) without becoming GPL.Every binary built with GCC
Classpath ExceptionGPLv2Linking your code to the Java class library does not make your code GPL.OpenJDK, which is why Java applications can be proprietary
LLVM ExceptionApache 2.0Removes the Apache 2.0 obligations that would otherwise attach to compiled output, and allows combination with GPLv2.LLVM, Clang, libc++ since 2019
Linux syscall noteGPLv2User-space programs using the kernel's system calls are not derived works.Every application on Linux
Autoconf and Bison exceptionsGPLv3The output of the tool (configure scripts, generated parsers) is not GPL just because the tool is.Any project using autotools or Bison
Font exceptionGPLEmbedding a GPL font in a document does not make the document GPL.Older GNU fonts; most fonts now use the OFL instead
Qt LGPL exceptionLGPL 3Clarifies that using Qt's template and inline code in your application does not trigger the LGPL for your code.Qt open source edition
MySQL FOSS License ExceptionGPLv2Client libraries may be linked into applications under a list of other open source licenses.MySQL connectors

10. Source-available licenses (not open source)

Starting around 2018, a series of venture-backed infrastructure companies moved away from open source licenses because cloud providers were selling hosted versions of their products without contributing back. The replacement licenses let you read, modify and usually run the code, but restrict a specific use, typically "offering it as a competing managed service". None of them is approved by the Open Source Initiative, and most Linux distributions and corporate open source policies treat them as proprietary. Each major switch produced a community fork under a real open source license.

SwitchFromToFork that stayed open
MongoDB, 2018AGPLv3SSPLFerretDB (Apache 2.0, a MongoDB-compatible layer on PostgreSQL)
Redis modules, 2018AGPLApache 2.0 + Commons Clause, later RSALNone needed at the time; the modules were separate
Elasticsearch and Kibana, 2021Apache 2.0SSPL or Elastic License 2.0OpenSearch (Apache 2.0, AWS, now under the Linux Foundation)
HashiCorp Terraform, Vault, Consul, Nomad, 2023MPL 2.0BSL 1.1OpenTofu (MPL 2.0, Linux Foundation); OpenBao for Vault
Redis, 2024BSD-3RSALv2 or SSPLValkey (BSD-3, Linux Foundation); Redis itself added an AGPLv3 option in 2025
Sentry, 2023BSL 1.1Functional Source LicenseNone; FSL converts to Apache 2.0 after two years

Business Source License 1.1

Server Side Public License 1.0

Elastic License 2.0

Redis Source Available License v2

Functional Source License

Commons Clause

PolyForm licenses

Fair Source

"Fair Source" is a label, not a license. It describes software published under a source-available license with a delayed conversion to open source, such as the FSL or BSL. Projects use the term to signal that the restriction is temporary.

11. Proprietary software and the "no license" trap

Copyright applies automatically. A repository on GitHub with no LICENSE file is not free to use, copy or fork for any purpose beyond what GitHub's own terms grant (viewing and forking within GitHub). This surprises people constantly. Code posted without a license is "all rights reserved", and a company that copies it into a product has no defence. If you find such code and want to use it, ask the author to add a license.

Proprietary licenses, meaning EULAs and commercial agreements, grant exactly what they say and nothing more. The common clauses to look for: per-seat or per-core limits (see our Licensing Check Before a Migration), no reverse engineering, no redistribution, no benchmarking without consent, audit rights, and automatic renewal. The economics of choosing between a proprietary product and an open source one are covered in Vendor and Licensing Comparison.

Dual licensing combines the two worlds. The same code is offered under a copyleft license (usually GPL or AGPL) to the public and under a commercial license to customers who cannot or will not comply with the copyleft terms. Qt, MySQL, Ghostscript, iText, MongoDB before 2018 and Oracle Berkeley DB all use or used this model. It works only when a single entity holds the copyright, which is why such projects require a contributor agreement.

12. Licenses for content, fonts, hardware, data and AI models

Creative Commons (text, images, audio, video)

Creative Commons licenses are built from four conditions that can be combined. CC itself says they are not suitable for software: they lack patent terms, say nothing about source code, and the NC and ND variants are not free. Use them for documentation, images and data, not for code.

LicenseConditionsFree culture?Typical use
CC0None (public domain dedication)YesData sets, government publications, stock photos
CC BY 4.0AttributionYesOpen access papers, open data, documentation; the closest CC equivalent to MIT
CC BY-SA 4.0Attribution, ShareAlikeYesWikipedia, OpenStreetMap's map tiles, Stack Overflow answers; the copyleft of content
CC BY-ND 4.0Attribution, NoDerivativesNoOpinion pieces and official texts that must not be altered
CC BY-NC 4.0Attribution, NonCommercialNoEducational material; "non-commercial" is famously undefined and causes disputes
CC BY-NC-SA 4.0Attribution, NonCommercial, ShareAlikeNoCourse material, MIT OpenCourseWare
CC BY-NC-ND 4.0Attribution, NonCommercial, NoDerivativesNoThe most restrictive; effectively "you may share this unchanged for free"

One consequence worth knowing: code pasted from Stack Overflow is CC BY-SA 4.0. Strictly read, copying a non-trivial snippet into a proprietary product requires attribution and, under ShareAlike, could require releasing the containing work. In practice short snippets are treated as unprotectable, but the obligation to attribute is real.

GNU Free Documentation License

A copyleft license for manuals, with awkward "invariant sections" that cannot be changed. Wikipedia started under it and migrated to CC BY-SA in 2009 because the GFDL was impractical for a wiki. GNU manuals still use it. For new documentation, CC BY-SA or CC BY is simpler.

Fonts

Hardware designs

Data

AI models and weights

Model weights are a new category and the licensing is unsettled. Whether weights are copyrightable at all is untested in court; licensors act as if they are. The main patterns:

13. Historical and niche licenses you may still meet

LicenseWhat to know
OpenSSL / SSLeay (dual)Used by OpenSSL 1.x. Contains an advertising clause, hence GPL-incompatible; distributions carried a "system library" exception for it. OpenSSL 3.0 moved to Apache 2.0 in 2021, which resolved the problem.
JSON LicenseMIT plus "The Software shall be used for Good, not Evil." That sentence makes it non-free (the FSF, Debian and the OSI all reject it) and unusable by IBM, who famously asked Douglas Crockford for an exemption to do evil. Avoid.
Vim License"Charityware": GPL-compatible, asks you to consider donating to children in Uganda. Vim itself is the only notable user.
Ruby LicenseRuby is dual-licensed under the Ruby license and BSD-2. Use the BSD-2 option.
PHP License 3.01Permissive with a clause forbidding use of "PHP" in derived product names. GPL-incompatible due to that clause. Applies to the PHP interpreter, not to your PHP code.
Sleepycat LicenseBerkeley DB until version 6, which switched to AGPLv3. Strong copyleft requiring source of "the software that uses the DB software".
Academic Free License 3.0The permissive sibling of the OSL by the same author. GPL-incompatible. Rare.
Eclipse Distribution LicenseDespite the name, it is just BSD-3-Clause. Eclipse projects use it for code meant to be freely embedded.
W3C Software Notice and LicensePermissive, for W3C reference implementations and specifications.
Blue Oak Model License 1.0.0A modern plain-English permissive license written by lawyers to fix defects in MIT and BSD. Technically excellent, rarely used, so expect questions from legal reviewers.
Mulan PSL v2A permissive license drafted in China, OSI-approved, bilingual Chinese and English with both texts authoritative. Common in Chinese open source projects.
CeCILL 2.1A French GPL-compatible copyleft license drafted under French law, from CEA, CNRS and Inria. CeCILL-B and CeCILL-C are the permissive and LGPL-like variants.
LaTeX Project Public LicensePermissive with a requirement that modified files be renamed or clearly marked, so documents keep rendering the same everywhere.
Beerware"If we meet some day, and you think this stuff is worth it, you can buy me a beer in return." Treat as public domain. Poul-Henning Kamp's FreeBSD code.
BSD 4-ClauseThe original BSD license with the advertising clause: every advertisement mentioning the software had to credit the University of California. GPL-incompatible; Berkeley itself rescinded the clause in 1999. If you find it in a dependency, check whether the author has re-licensed under BSD-3.
Artistic License 1.0The original Perl license. The FSF considers it too vague to be a free license on its own, which is why Perl is dual-licensed with the GPL. Artistic 2.0 fixed the problems.
Netscape Public License and Mozilla Public License 1.1The licenses Mozilla started under in 1998; the NPL gave Netscape special rights over contributions. Mozilla relicensed everything to MPL 2.0 in 2012. MPL 1.1 is GPL-incompatible unless the project used the MPL/GPL/LGPL tri-license, which Firefox did for years.
Microsoft Reciprocal License (MS-RL)Weak copyleft by file, GPL-incompatible. Historical.

14. Compatibility: what can be combined with what

Two licenses are compatible when code under both can be combined into one program and distributed without violating either. The rules of thumb:

Code underMay be included in a project underMust not be included in
MIT, BSD, ISC, 0BSD, zlib, UnlicenseAnythingNothing (keep notices)
Apache 2.0Apache 2.0, MPL 2.0, LGPLv3, GPLv3, AGPLv3, proprietaryGPLv2-only, LGPLv2.1-only
MPL 2.0MPL 2.0, LGPL, GPL, AGPL, proprietary (files stay MPL)Nothing, unless marked incompatible with secondary licenses
LGPL 2.1LGPL 2.1+, GPLv2, GPLv3, AGPLv3, proprietary (dynamic linking)Static proprietary builds without relink files
LGPL 3.0LGPL 3, GPLv3, AGPLv3, proprietary (dynamic linking)GPLv2-only
GPLv2-onlyGPLv2GPLv3, AGPLv3, Apache 2.0 projects, proprietary
GPLv2-or-laterGPLv2, GPLv3, AGPLv3Proprietary, permissive projects
GPLv3GPLv3, AGPLv3GPLv2-only, proprietary, permissive projects
AGPLv3AGPLv3 (and combined with GPLv3 per section 13)Everything else
CDDLCDDL, proprietaryAny GPL project
SSPL, BSL, ELv2Treat as proprietaryAny open source project

15. How to choose a license for your project

Work through these in order. Most projects are done after the second question.

  1. Are you contributing to an existing ecosystem? Use its license. A Rust crate is MIT or Apache 2.0; a Linux kernel module is GPLv2; a Django app is BSD-3; a WordPress plugin is GPLv2-or-later; an Eclipse plugin is EPL 2.0. Fighting the ecosystem costs you users.
  2. Do you mind if someone makes it proprietary? If no, pick MIT (simplest) or Apache 2.0 (if patents could matter or a company is behind it). If you do mind, continue.
  3. Is it a library? Pick MPL 2.0. Changes to your files come back, and proprietary applications can still use it. Pick LGPL only if your ecosystem expects it.
  4. Is it an application that users run locally? Pick GPLv3. Anyone who ships it must ship the source.
  5. Is it a server, a SaaS product or a database? Pick AGPLv3. Anyone who runs a modified copy for the public must publish their changes. Decide now whether you will also sell commercial licenses; if so, you need a CLA from day one.
  6. Do you want to forbid competitors from hosting it? Then you have left open source. Be honest about it, use FSL or BSL with a short conversion clock, and expect the community to treat the project as proprietary.
  7. Is it a sample, a snippet or a tutorial? Pick 0BSD or CC0 so nobody has to carry a notice for ten lines of code.
  8. Is it not code? Documentation: CC BY 4.0 or CC BY-SA 4.0. Fonts: OFL 1.1. Data: CC BY 4.0, CC0 or ODbL. Hardware: CERN-OHL.

Two useful sites: choosealicense.com (GitHub's guide, short) and opensource.org/licenses (the authoritative list of what counts as open source). The FSF keeps a commented list with GPL compatibility for each license.

Whatever you choose, do not write your own. A custom license is a liability for every user who has to get it reviewed, and most "I just removed one clause" licenses have unintended effects. The one legitimate customisation is an exception attached to a standard license.

16. How to apply a license correctly

  1. Add a LICENSE file at the root of the repository containing the full, unmodified license text. GitHub, GitLab and package registries detect it from there. Name it LICENSE or LICENSE.txt; for the GPL family COPYING is traditional.
  2. Fill in the copyright line where the license has one: Copyright (c) 2026 Your Name or Company. A year range is fine; do not bother updating it every January.
  3. Declare it in the package metadata. The license field in package.json, pyproject.toml, Cargo.toml, composer.json, the pom, the gemspec. Use the SPDX identifier exactly: MIT, Apache-2.0, GPL-3.0-or-later, not "GPL" or "GPLv3".
  4. Add SPDX headers to source files. One comment line at the top of each file: SPDX-License-Identifier: Apache-2.0. The Linux kernel, LLVM and most large projects do this; it lets scanners classify every file without guessing. The REUSE specification from the FSFE standardises the layout and has a linter.
  5. For Apache 2.0, consider a NOTICE file with attribution lines you want downstream to carry. Keep it short; everything in it becomes an obligation for your users.
  6. For GPL or AGPL, write "or later" or "only" explicitly in the header and metadata. Silence creates arguments later.
  7. For dual licensing, say so in the README and name both licenses: "Licensed under either MIT or Apache 2.0, at your option" is the Rust convention, with both files present.
  8. Mention the license in the README in one line, with a link to the file.
  9. Do not change the license text. If you need extra permission, add a separate exception file and reference it. If you need extra restriction, you are no longer using that license and must not call it by its name.

SPDX license expressions cover the combinations: MIT OR Apache-2.0 for dual licensing, GPL-2.0-only WITH Classpath-exception-2.0 for an exception, Apache-2.0 AND MIT for a package that contains parts under each. The full identifier list is at spdx.org/licenses.

17. How to comply when you use other people's code

Compliance is a function of two things: what license the code is under, and whether you distribute it. Internal use, meaning your own employees running it on your own machines, triggers no obligations under any open source license. Distribution means giving a copy to someone outside your legal entity: selling a device with the code on it, publishing an app, shipping a container image to a customer, pushing an image to a public registry, or (AGPL only) letting the public use a modified version over the network.

Permissive dependencies (MIT, BSD, ISC, Apache 2.0)

Weak copyleft dependencies (MPL, LGPL, EPL)

Strong copyleft dependencies (GPL, AGPL)

Keep an inventory

You cannot comply with licenses you do not know you have. Generate a software bill of materials (SBOM) in the build, in SPDX or CycloneDX format, with the license of each component. The tools in section 19 do this. Review it at every release and whenever a dependency changes its license, which happens more often than people expect, as section 10 shows.

18. Contributing to others: CLA, DCO and relicensing

When you contribute code to a project, the project needs to know it has the right to distribute your contribution under its license. There are two mechanisms, and the choice tells you something about the project.

The practical consequence is relicensing. A project can change its license only with the consent of every copyright holder, or if a CLA gave the owner the right to do it unilaterally. HashiCorp, Elastic, Redis and MongoDB could switch to source-available licenses because contributors had signed CLAs. Projects without CLAs, like the Linux kernel, are effectively locked to their license forever, which some maintainers consider a feature. If you contribute substantial work to a CLA project, understand that the owner may later take it proprietary; the open version you contributed to remains open, but the future does not.

Employees: your employer usually owns code you write on the job, and in many contracts code you write at home on the same subject too. Check before contributing, and expect company-backed projects to require a corporate CLA signed by someone authorised to sign for the company.

19. Tools for license scanning and SBOMs

ToolWhat it doesNotes
ScanCode ToolkitScans source trees and detects licenses, copyrights and package metadata by text matching.Open source, the reference scanner; slow on big trees, very accurate.
OSS Review Toolkit (ORT)Resolves dependencies for many package managers, scans, evaluates against policy rules, generates reports and SBOMs.Open source, used by large companies for full compliance pipelines.
FOSSA, Snyk, Black Duck, MendCommercial dependency scanners with license policy enforcement in CI.Pick one if you need audit trails and a legal team dashboard.
licenseeDetects a repository's license from its LICENSE file; this is what GitHub uses for the license badge.Ruby gem.
REUSE toolChecks that every file has an SPDX header and every license is in LICENSES/.From the FSFE; a good lint for your own projects.
pip-licenses, license-checker (npm), cargo-deny, go-licenses, license-maven-pluginPer-ecosystem tools that list the license of every installed dependency and can fail the build on a forbidden one.Cheap to add to CI; they trust package metadata, so verify surprises with ScanCode.
Syft, TrivyGenerate SBOMs from container images and file systems, including license fields.Trivy also does vulnerability scanning in the same run.
ClearlyDefinedCrowd-curated license and attribution data for popular packages.Useful when metadata is missing or wrong.
tl;drLegalPlain-English summaries of licenses: can, cannot, must.Good first look; not a substitute for the text.

20. Common mistakes

21. FAQ

Can I use GPL software commercially?

Yes. Every open source license allows commercial use. The GPL restricts how you may distribute it, not whether you may charge for it. Red Hat built a company selling GPL software.

Can I use GPL software in my company without publishing anything?

Yes, as long as you do not distribute it outside the company. Internal use is not distribution. For AGPL, running a modified copy that the public interacts with over the network is the exception.

Does running MIT or Apache code in my SaaS product obligate me to anything?

Technically a SaaS product is not distributed, so even the notice requirement is arguably not triggered. Publishing a licenses page anyway is good manners and costs nothing.

If I use an MIT library, must my project be MIT?

No. Permissive licenses impose nothing on the containing work. Your project can be proprietary, GPL or anything else, as long as the MIT notice is kept.

If I use an MPL library, must my project be MPL?

No. Only the MPL files themselves, and files you created from them, must stay MPL. Your own files are yours.

If I use a GPL library, must my project be GPL?

If you distribute the combination, yes. If you keep it internal, no. If the library is LGPL and you link dynamically, no.

What happens if I violate a license?

The license terminates and you are infringing copyright. In practice the copyright holder or an organisation like the Software Freedom Conservancy writes to you, you fix it, and the GPLv3 reinstates your license if you cure within 30 days. Court cases are rare but real: Artifex vs Hancom (Ghostscript), the BusyBox cases, and in 2024 the Vizio case in California, which recognised that users can enforce the GPL as third-party beneficiaries.

Can a project change its license?

Only with every copyright holder's consent or a CLA that grants the right. The old versions remain under the old license forever; nobody can take back a license already granted on code already released. That is why forks of relicensed projects are legal.

Is a license a contract?

Courts in the United States have treated open source licenses as both licenses and contracts depending on the claim (Jacobsen v. Katzer, Artifex v. Hancom). In Germany the GPL has been enforced repeatedly as a valid license. Practically, assume it is enforceable.

Which license do most projects use?

MIT, by a wide margin, then Apache 2.0, then GPLv3 and BSD-3. Copyleft's share has fallen steadily since 2010 as company-backed projects came to dominate.

What does "copyleft" actually mean?

A copyright license that uses the author's exclusive rights to require that derivative works carry the same freedoms. The word is a pun on copyright; the GPL is the canonical example.

What is "OSI-approved" and why does it matter?

The Open Source Initiative reviews licenses against the Open Source Definition and keeps a list of those that pass. Corporate policies, Linux distributions and funding bodies often say "OSI-approved licenses only", so a project on a non-approved license, however permissive, is excluded from them.

22. Glossary

TermMeaning
CopyleftA license requirement that derivative works be released under the same license.
PermissiveA license with no copyleft requirement; only notices must be kept.
Derived work, derivative workA work based on another copyrighted work. What counts as one for software is the central unresolved question of copyleft.
Distribution, conveyingGiving a copy to another party. GPLv3 says "convey" to avoid national differences in the word "distribute".
Corresponding sourceGPL term for everything needed to build and install the program from source, excluding system libraries and tools.
Mere aggregationPutting independent programs on the same medium or in the same distribution; does not make them one work.
LinkingCombining compiled code into one executable (static) or at load time (dynamic). The LGPL draws its line here.
TivoizationShipping GPL software on a device that refuses to run modified versions, named after TiVo. GPLv3 forbids it for consumer products.
Patent grantA promise not to sue users of the software over patents the contributor holds that cover their contribution.
Patent retaliationLoss of the license by anyone who sues the project's users for patent infringement.
SPDXSoftware Package Data Exchange: the standard list of license identifiers and the SBOM format of the Linux Foundation.
SBOMSoftware Bill of Materials: a machine-readable list of every component in a product with version and license.
CLAContributor License Agreement, signed once, granting the project owner rights over contributions.
DCODeveloper Certificate of Origin, a per-commit sign-off certifying the right to submit the code.
Dual licensingOffering the same code under two licenses, usually copyleft to the public and commercial to paying customers.
Source-availableSoftware whose source you may read but whose license fails the Open Source Definition.
OSIOpen Source Initiative, keeper of the Open Source Definition and the approved license list.
FSFFree Software Foundation, author of the GPL family and keeper of the free software definition.
Free softwareSoftware that grants the four freedoms: run, study, modify, share. The same set of licenses as open source, described from an ethics rather than a development-method standpoint.
Public domainWorks with no copyright, either expired or dedicated. Not a license; some countries do not allow dedication.
NOTICE fileAn Apache 2.0 file carrying attribution text that must be passed on with distributions.
Change DateBSL term for the date a release converts to open source.
ExceptionExtra permission attached to a license for a specific case, such as linking a runtime library.

Licence texts referenced: opensource.org, gnu.org/licenses, mozilla.org/MPL, apache.org, creativecommons.org, spdx.org. Project license facts are as published by each project at the date above; projects change licenses, so check the LICENSE file of the version you use.