Open-Source License Compliance Guide
This guide provides a comprehensive overview of open-source software (OSS) license compliance. It is designed for developers, legal teams, and compliance officers to understand, implement, and maintain compliance in projects using OSS dependencies. Compliance reduces legal risks, such as license violations leading to lawsuits (e.g., from the Software Freedom Conservancy).
Key Principles:
- Audit Regularly: Scan all dependencies (direct and transitive).
- Document Everything: Maintain a Software Bill of Materials (SBOM) listing components, versions, and licenses.
- Automate Where Possible: Use tools for scanning and notice generation.
- Consult Legal Experts: This guide is informational; tailor to your jurisdiction and use case.
1. License Families
OSS licenses are grouped into families based on compatibility, restrictions, and obligations. Common categorizations (inspired by SPDX and OSI):
| Family | Examples | Key Traits | Compatibility |
|---|
| Permissive | MIT, Apache 2.0, BSD-2/3-Clause, ISC | Minimal restrictions; allows proprietary use, modification, distribution. | High (relicense freely) |
| Weak Copyleft | MPL 2.0, CDDL, EPL 2.0 | Copyleft applies only to modified files; file-level. | Medium (source mods must be shared) |
| Strong Copyleft | GPL-2.0, GPL-3.0, AGPL | Whole program must be shared under same license if combined/distributed. | Low (infects entire work) |
| Network/Cloud | SSPL, BSL 1.0 | Restricts SaaS/cloud use; not always OSI-approved. | Low (vendor-specific) |
| Public Domain | CC0, Unlicense | No copyright; zero obligations. | Highest |
Resources:
2. Obligations by License Family
| Obligation Type | Permissive (MIT, Apache) | Weak Copyleft (MPL) | Strong Copyleft (GPL) |
|---|
| Source Code Availability | No | Modified files: Yes | Entire work: Yes |
| Binary Distribution | Retain notices | Retain notices + mods | Full source + notices |
| Attribution | License text + copyright notice | Same + file headers | Same + full license |
| State Changes | No | Yes (modified files) | Yes (all changes) |
| Patent Grants | Yes (Apache) | Varies | Yes (GPL-3) |
| Warranty Disclaimer | Retain as-is | Retain as-is | Retain as-is |
Common Obligations:
- Retain original copyright notices, license text, and disclaimers.
- Do not remove or alter license headers in source files.
- For dual-licensed (e.g., GPL/MIT), choose one per distribution.
3. Notice and Attribution Requirements
Proper notices prevent infringement claims. Always include:
- LICENSE File: Top-level file with full license text(s) for your project.
- NOTICE File: Aggregate attributions (required by Apache; recommended for all).
Copyright (c) 2023 Your Company. All rights reserved.
This product includes software developed by:
- React (MIT): https://github.com/facebook/react (Copyright Facebook, Inc.)
- Lodash (MIT): https://lodash.com (Copyright JS Foundation)
- Source Headers: Preserve in files, e.g.:
/*
* Copyright (c) 2023 OpenJS Foundation.
* Licensed under MIT License.
* See LICENSE for details.
*/
- Binary Distributions (e.g., Docker images, executables):
- Embed NOTICE/LICENSE in docs or
/usr/share/doc/.
- For apps: "About" screen or bundled text file.
- SBOM Generation: Use SPDX or CycloneDX format for machine-readable notices.
{
"name": "lodash",
"licenseConcluded": "MIT",
"copyrightText": "Copyright jQuery Foundation"
}
Best Practice: Use tools like license-list or FOSSA to auto-generate notices.
4. Copyleft Triggers
Copyleft forces sharing source code. Triggers vary:
| License | Triggers Distribution? | Triggers Modification? | SaaS/Cloud Trigger? | Scope |
|---|
| GPL-2.0 | Yes (binaries) | Yes | No | Whole program |
| GPL-3.0 | Yes | Yes | No | Whole program |
| AGPL | Yes + network use | Yes | Yes (remote access) | Whole program |
| LGPL | Linking OK (dynamic) | Modified lib: Yes | No | Library only |
| MPL 2.0 | No | Modified files: Yes | No | File-level |
Scenarios:
- Internal Use: No trigger (e.g., dev servers).
- Distribution: Binaries/apps → Provide source.
- SaaS: AGPL triggers on user access.
- Avoidance: Use dynamic linking (LGPL), separate processes, or permissive alternatives.
Compatibility Rule: GPL-incompatible with some (e.g., Apache 2.0 + GPL-2.0 needs relicensing).
5. Dependency Scanning
Identify licenses in direct/transitive deps.
Tools (Open-Source/Free Tiers):
| Tool | Language Agnostic? | Key Features | License |
|---|
| FOSSA | Yes | SBOM, policy as code, remediate | CLI Free |
| Snyk OSS | Yes | Vulns + licenses, IDE integration | Free Tier |
| Black Duck / Mend | Yes | Enterprise scanning | Paid |
| OSV-Scanner | Yes | Google OSS vuln DB + licenses | Apache |
| npm audit / pip-audit | No | Package manager built-in | Varies |
| tern / fossology | Yes | Static binary scanning | Apache |
Workflow:
npm ls --json > package-lock.json (or equiv.).
- Scan:
fossa analyze or syft packages . -o cyclonedx-json.
- Review SBOM for unknown licenses.
- Automate in CI/CD: GitHub Actions, Jenkins.
Frequency: On merge/PR, release, quarterly.
6. Remediation Strategies
Fix issues systematically:
-
Inventory Issues:
| Issue Type | Risk Level | Fix Priority |
|---|
| Copyleft in binary | High | Immediate |
| Missing notice | Medium | Next sprint |
| Incompatible combo | High | Fork/relicense |
-
Steps:
- Upgrade/Replace: Pin to compliant version (e.g.,
npm update lodash).
- Remove:
npm uninstall risky-pkg.
- Fork/Relicense: Rare; get upstream approval.
- Static Linking → Dynamic: For LGPL.
- Source Provision: Host tarballs on GitHub Releases.
- Legal Review: For strong copyleft.
-
Timeline Template:
- Day 1: Scan + triage.
- Week 1: Remediate high-risk.
- Month 1: Full compliance + docs.
7. Policy Templates
OSS Compliance Policy Template
[Company Name] Open Source Software Policy
1. Purpose: Ensure legal compliance with OSS licenses.
2. Scope: All projects, products, contributions.
3. Responsibilities:
- Developers: Scan deps, flag issues.
- Release Managers: Generate notices/SBOM.
- Legal: Review high-risk (copyleft >5%).
4. Procedures:
- Pre-commit: Run scanner.
- Release: Verify notices, source availability.
- Annual Audit: Full SBOM review.
5. Prohibited:
- Strong copyleft in proprietary binaries without source offer.
- Removing notices.
6. Tools: FOSSA, Snyk.
7. Violations: [Disciplinary action].
Approved: [Date, Signature]
Approval Workflow Template (GitHub Issue)
Title: OSS Approval Request - [Package/Version]
- Package: lodash@4.17.21
- License: MIT
- Use: Internal lib
- Risks: None
- Alternatives: Underscore (MIT)
[Legal]: Approved ✅
Further Reading:
This guide is CC0 (public domain). Fork, improve, and share! For custom advice, contact legal experts.