Open-Source Licence Quiz: Ten Questions for People Who Publish Code

Licences are where developers most often rely on half-remembered rules. Each question below is followed by its answer; read the question, commit to a guess, then check. The answers describe how these licences are generally understood and are not legal advice. For anything that matters commercially, read the licence text itself and ask a lawyer.

Permissive licences

1. Can someone use your package, released under MIT, inside a closed-source commercial product?

Yes. MIT allows use, modification and redistribution for any purpose, provided the copyright notice and permission notice are included with copies or substantial portions of the software.

2. What does Apache-2.0 contain that MIT does not?

An express patent licence from contributors, with a termination clause. Contributors grant a patent licence covering their contributions, and that licence ends for anyone who sues claiming the work infringes a patent. It also requires noting changes in modified files and passing on any NOTICE file.

3. Is putting "license": "MIT" in package.json enough on its own?

Not really. The field is metadata that tools read, but the licence's own condition is that the notice text travels with the software. Ship a LICENSE file containing the full text and your copyright line.

Copyleft licences

4. If an application uses a GPL-3.0 library and is distributed, what generally follows?

The combined work is generally expected to be distributed under GPL-3.0 terms, with source available. This is why many companies avoid strong copyleft dependencies in products they ship.

5. How does the LGPL differ for library users?

It is weaker copyleft aimed at libraries. Software that merely uses an LGPL library can generally be under other terms, while changes to the library itself stay under the LGPL, subject to conditions that let users replace the library.

6. What is the scope of MPL-2.0's copyleft?

File-level. Modified MPL-covered files must remain under the MPL, but they can be combined with files under other licences in a larger work.

7. Does the GPL's obligation trigger for code you only run on your own servers?

Not for GPL-3.0; that is the gap the AGPL-3.0 addresses. The AGPL adds a requirement to offer source to users who interact with the modified program over a network.

Metadata and practice

8. What does the SPDX expression MIT OR Apache-2.0 mean?

The user may choose either licence. AND would mean both apply at once; OR offers a choice. This dual licence is common in the Rust ecosystem.

9. Your repository has no licence file. Can others legally reuse the code?

Generally not beyond what the hosting platform's terms or copyright law allow. With no licence, default copyright applies. Public visibility is not permission, which is why choosealicense.com encourages picking one.

10. Can you relicense your package later?

For code you own entirely, yes; for others' contributions, it depends. Past releases stay available under their original terms. Changing contributed code needs the contributors' agreement unless a CLA or the original licence permits it; see relicensing an open-source package.

Scoring and next steps

Give yourself a point for each answer you got substantially right. With 8 or more, the dependency licence compatibility FAQ is the natural next step. With 5 to 7, read MIT versus Apache-2.0 and the permissive versus copyleft guide. Below 5, start with the glossary and the SPDX identifier how-to. The SPDX License List and the Open Source Initiative publish the full licence texts.

Related pages