How to Audit Open Source Licences in Your Dependencies
Learn how to read lockfiles and SBOMs, what permissive, copyleft and network copyleft licences mean, and how to set a licence policy for your releases.

How to Audit Open Source Licences in Your Dependencies
Every package you install brings a licence with it, and so does every package that package installs. A typical JavaScript web app has several hundred transitive dependencies; a Python service is not far behind. Most of these licences ask for very little, but a few can create real obligations. A licence audit finds those few before a customer, an investor or a lawyer does. This guide walks through the process with the free SBOM and dependency licence auditor.
What an SBOM is and why customers ask for it
A software bill of materials is an inventory: every component, its version, a package URL that identifies it, and its licence. Two formats dominate. CycloneDX comes from the OWASP community and is popular for security tooling; SPDX is a Linux Foundation standard and also an ISO standard. Large customers and public sector buyers increasingly ask suppliers for one of them, mainly to check for vulnerable components, but the licence field is in the same file.
Where the data comes from
You do not need a special scanner to start. Lockfiles already list exact versions. npm's package-lock.json version 2 and 3 even record each package's declared licence. yarn.lock and requirements.txt list names and versions but no licences, so those packages show as unknown until you add the licence or generate an SBOM with a tool that looks them up. Open all of them together and duplicates are merged into one list.
Licence families in plain language
- Public domain and permissive (CC0, MIT, BSD, Apache-2.0, ISC): use the code freely, keep the copyright and licence notice.
- Weak copyleft (LGPL, MPL, EPL): changes to the library itself must be shared under the same licence, but your own code linked to it usually need not be.
- Strong copyleft (GPL): if you distribute a program that includes GPL code, the whole program must be available under the GPL.
- Network copyleft (AGPL, SSPL): the sharing duty is triggered even when users only use your software over a network.
- Source-available and non-commercial (BUSL, Elastic, CC-BY-NC): readable source, but with use restrictions that are not open source.
Expressions: OR and AND
Packages sometimes offer a choice, written MIT OR Apache-2.0. You may pick either, so the most permissive option counts. MIT AND BSD-3-Clause means both licences apply to different parts, so the strictest part counts. Reading the expression correctly avoids false alarms on dual-licensed packages such as DOMPurify.
Write a policy, not a list of opinions
A policy turns families into decisions: allowed, needs review, denied. A closed-source product shipped to customers commonly allows permissive licences, reviews weak copyleft, and denies strong and network copyleft. A purely internal tool that is never distributed can often allow GPL while still reviewing AGPL. Add exceptions by identifier when your legal team approves a specific licence. Writing this down once means every future audit takes minutes.
Unknown is a finding too
A package with no declared licence is not free to use: by default, copyright law gives you no rights at all. Look at the package's repository for a LICENSE file, record the licence as an override, or replace the package. Keep your overrides with the audit so the next person does not redo the work.
Ship the notices
Permissive licences still have one duty that is often forgotten: include the copyright and licence notice. A third-party notices file grouped by licence, shipped with your app or shown on an About page, covers this for most components.
Make it routine
Run the audit before each release and whenever a dependency is added. A pull request that adds a denied licence is far cheaper to fix on the day it is opened than in the week before a contract is signed.
Limits
An automated audit reads declared licences; it does not read source files for copied code, and a package can declare one licence while bundling files under another. Licence compatibility depends on how software is distributed and linked, which is a legal question. Use the audit to find what needs attention, and ask a qualified lawyer about anything in the review and denied lists.



