A software license is the legal document that grants you permission to use, copy, modify and share a piece of software, along with its conditions. Without a license, code is by default all rights reserved, even if it is publicly visible.
Why it matters
Using a dependency means accepting its license. Permissive licenses such as MIT and Apache 2.0 allow commercial use and modification with few conditions, mainly keeping the copyright notice. Copyleft licenses such as the GPL require that distributed derivative works also be released under the same license. Violating terms can force you to remove or open your own code.
Example
| License | Type | Key condition |
|---|---|---|
| MIT | Permissive | Keep the copyright notice |
| Apache 2.0 | Permissive | Keep notices, includes a patent grant |
| GPL | Copyleft | Share derivative works under the GPL |
Check the project's LICENSE file, and for legal questions ask a lawyer.
Common mistakes
- Assuming public code on GitHub is free to reuse when it has no license.
- Mixing incompatible licenses in one product.
- Ignoring the licenses of transitive dependencies.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.