Developers reach for a library, see "open source", and move on. That phrase covers licences with very different obligations — and the difference is usually discovered years later, by a lawyer, during due diligence.

The Only Question That Matters

Every open source licence grants broadly the same permissions: use it, modify it, share it, including commercially. What separates them is what you owe in return.

That obligation sits on a spectrum from "keep the copyright notice" to "release your entire application under these same terms". Everything else is detail.

The Four You Will Actually Meet

LicenceWhat you must doDoes it affect your own code?
MITKeep the copyright notice and licence textNo
Apache 2.0Notice, state changes, plus an explicit patent grantNo
GPLRelease your distributed work under GPL, with sourceYes, on distribution
AGPLSame as GPL, and also when users reach it over a networkYes, including SaaS

Permissive: MIT and Apache

These let you build closed, commercial products on top with essentially no constraint beyond attribution. The practical difference between them is patents: Apache 2.0 includes an express patent grant from contributors and terminates it if you sue over patents. MIT is silent on patents. For most projects either is fine; Apache is preferred where patent exposure is a real concern.

Copyleft: GPL

The obligation triggers on distribution. If you ship software containing GPL code — as a download, an installer, an appliance, embedded in a device — the work you distribute must also be GPL, with source made available.

The critical subtlety is that this can reach your own code. How far depends on how tightly you combine things: linking a GPL library into your application is generally treated as creating a derivative work, while running a separate GPL program as a standalone process generally is not. This boundary is genuinely contested in places, which is itself a reason for caution.

AGPL, and why policies single it out

Ordinary GPL has a gap: run modified code on your own servers and let users reach it over the web, and you have not distributed anything, so no obligation arises. AGPL closes that. If users interact with your modified version over a network, you must offer them the corresponding source.

For a SaaS company that can mean publishing the application itself, which is why many organisations maintain a blanket refusal. It is not that AGPL is unreasonable — it is doing precisely what it was designed to do.

Where Teams Get Caught

  • Transitive dependencies. Your dependency has dependencies. A copyleft licence can arrive four levels deep, via a package nobody chose deliberately.
  • Dual licensing. Some projects offer AGPL for free and a commercial licence for a fee. That is a business model, not a trap, but it means "free" may not apply to you.
  • Licence changes. A project can relicense future versions. The version you adopted keeps its terms; the upgrade may not.
  • "Source available" is not open source. Several popular licences restrict competing commercial use. The code is readable and the terms are not open. Read them.
  • Assets are licensed too. Fonts, icons and images in a repository frequently carry different terms from the code.

The common thread is that none of this hurts until someone checks — typically an acquirer, an enterprise customer, or a procurement review. The cost is a deal delayed, not usually a lawsuit.

A Policy That Takes an Hour to Set Up

  1. Keep an inventory. Generate a dependency list with licences automatically in your build. You cannot manage what you have not listed.
  2. Agree an allow list — typically MIT, Apache 2.0, BSD and similar — and a review list for anything copyleft.
  3. Fail the build on an unexpected licence. A warning nobody reads is not a control.
  4. Ship your attributions. Most permissive licences require the notice to travel with the product. A licences page or an about screen satisfies this.
  5. Write down the decision when you do accept a copyleft dependency, with the reasoning. Due diligence goes far better when the answer is documented rather than reconstructed.

If you are weighing dependencies against building from scratch, our guide to build versus buy covers the other side of that decision, and our DevOps tooling roundup includes options for generating the dependency inventory automatically in your pipeline.

This is general information about how these licences are written, not legal advice. For anything commercially significant, have a qualified lawyer review your specific use.

Key Takeaways

  • All mainstream licences permit commercial use — the difference is what you owe back.
  • MIT and Apache ask for attribution; Apache adds a patent grant.
  • GPL obligations trigger on distribution and can reach your own code.
  • AGPL extends that to network use, which is why SaaS firms avoid it.
  • Most problems arrive via transitive dependencies and surface during due diligence.

Written by the WritePures newsroom. Spotted something that needs updating? Tell our editors.