Public domain license
Usually, software is protected by copyright, meaning that use of the software requires permission from the individual who created the software, or the person who holds the copyright. This does not apply to work in the public domain, however; software under this license category can be used or modified by anyone, without restriction.
It’s important to note though that even if a component is free and has no associated legal requirements, you should still ensure that it is secure before incorporating it into your own codebase.
Permissive licenses have very few requirements regarding how the software can be used and distributed. This is the most common type of license used with open source software. Examples include the MIT license.
Copyleft licenses, also known as restrictive or reciprocal licenses, allow for modification and distribution of the open source code, so long as you meet the requirements for redistribution of whatever you create with the code. Examples include the GNU Affero General Public License.
There are various scopes to copyleft licenses. Some allow you to release just the code you modified, while others require that you release the entire application under the same license as the open source code you used to create it.
A weak copyleft license is designed to allow linking to open source libraries with little obligation. If software dynamically links to a GNU Lesser General Public License (LGPL)–licensed library, the entire work can be distributed under any license, even a proprietary license, with minimal requirements. Static linking and modifying the library is more complicated. And using the LGPL-licensed component in other ways comes with copyleft obligations. Other weak copyleft licenses (including the MPL, CDDL, and Eclipse) occupy a place between permissive and copyleft.
The copyright holder of open source code can also make their software available under different licenses depending on the type of user. With dual licensing, a copyright holder could, for example, use a combination of a restrictive open source license plus a commercial license, thereby making it easy for developers to get their hands on the code and try it out, but obligate them to adhere to the commercial license in the event of actually using the code in their own products (perhaps having to pay for the commercial license to use it).
It’s important to understand that unlicensed code does not mean that the code is automatically public domain. Even when code is released without a specific license, there may still be obligations you must meet in order to use it.
By default, unlicensed code comes with copyrights. To use it, you must have explicit permission. You should treat unlicensed code like proprietary code—that is, pretend it’s not open source.