License compliance for research software
Choosing a license is a decision; staying compliant is engineering.
Every dependency in the tree grants rights under conditions, and a
project distributing software must satisfy all of them at once -
which is checkable, automatable and routinely neglected in research
code. This skill covers the audit-and-verify side of licensing;
license basics (what MIT/GPL/Apache mean, adding a LICENSE file,
licensing docs and data) live in rseng-licensing. One boundary stated
up front: an agent can analyze, flag and prepare, but consequential
calls - relicensing, dual-licensing contracts, anything with
commercial stakes - belong with the institution's legal or tech
transfer office. Say so when the stakes warrant it.
Auditing the dependency tree
Inventory before judgment:
- Enumerate licenses of ALL transitive dependencies with a tool, not
by hand: pip-licenses (Python), the equivalent per ecosystem
(license-checker for npm, cargo-license), or ScanCode Toolkit for
a thorough multi-language scan that reads actual file texts rather
than trusting declared metadata.
- Treat "declared vs actual" skeptically: packages misdeclare;
vendored files and copied snippets carry their own licenses; data
and models bundled in the repo have licenses too
(rseng-data-management).
- Flag the findings in three buckets: fine (compatible), obligations
(compatible but with duties - attribution, notices, source offers),
and conflicts (incompatible or unknown/unlicensed). "No license
found" means all rights reserved and is a conflict, not a shrug.
- Record the audit result (a license inventory file or SBOM with
license fields - rseng-security's SBOM practice carries license data
naturally) so the next audit is a diff, not a redo.
Compatibility analysis
The mental model that resolves most questions:
- Direction matters: compatibility means "may I combine this
dependency into a work distributed under MY license". Permissive
code (MIT/BSD/Apache) flows into almost anything; copyleft code
pulls the combined work toward its own terms.
- Strong copyleft (GPL family): distributing a work that links or
combines GPL code requires the whole to be GPL-compatible; GPLv2-
only vs GPLv3 is a real incompatibility to check, and Apache-2.0
is compatible with GPLv3 but not GPLv2.
- Weak copyleft (LGPL, MPL, EPL): obligations attach to the covered
files/library, not the whole work - dynamic linking against LGPL
is generally fine for any project; modifying the LGPL library
itself is not.
- Network use: AGPL triggers source obligations on network service
use - relevant the moment research software becomes a hosted
service.
- Non-commercial and academic-only licenses (CC-NC variants,
homegrown academic licenses) are incompatible with OSI open source
and block downstream reuse; flag them loudly in dependencies and
discourage them for new projects (rseng-licensing explains why).
- When a genuine conflict exists, the options in order: replace the
dependency (rseng-software-reuse to find alternatives), isolate it
behind a process/service boundary, seek an exception from its
author, or change the project's own license. Present options with
trade-offs; do not silently pick.
Authoritative references for specific pairs: the FSF license list
and the EU Joinup Licensing Assistant's compatibility checker beat
folklore; cite them when a pairing is contested.
Suggesting a license (constraint-driven)
Recommend from constraints, not fashion. Ask or infer: what do the
dependencies already require (a GPL dependency decides the question
for distributed works)? Does the institution or funder have a
policy? Is commercial adoption desired (permissive lowers friction)
or is reciprocity the goal (copyleft)? Is the artifact a library
(LGPL/MPL/permissive keep adopters) or an application? Then suggest
one license with a one-paragraph rationale and the runners-up -
choosealicense.com framing works well for users; rseng-licensing
covers the fuller decision guidance. Never leave a repository
unlicensed while the decision pends; that blocks everyone.
Dual and multi-licensing
- Dual licensing offers the same code under two licenses: commonly
copyleft-or-commercial (revenue model requiring copyright
concentration - every contributor must agree via CLA or
assignment, which changes community dynamics -
rseng-community-governance), or license-choice offers like "MIT OR
Apache-2.0" (adopter-friendly, common in some ecosystems).
- Express it precisely with SPDX expressions:
MIT OR Apache-2.0
(recipient chooses), MIT AND CC-BY-4.0 (different artifacts
under different terms - code vs docs/data is the research-typical
case). Put the expression in package metadata and per-file tags.
- Relicensing an existing project requires consent of all copyright
holders; enumerate contributors (git history) and treat it as a
months-long consent project, not an edit. This is a
route-to-legal-office decision.
Verifiable compliance: SPDX, REUSE and CI
Make license state machine-checkable:
- Per-file SPDX tags (
SPDX-License-Identifier: Apache-2.0) plus
LICENSES/ directory per the REUSE specification; reuse lint
then verifies the whole repository mechanically - the license
analogue of a test suite.
- Enforce policy in CI (rseng-ci-cd): a license-audit step that fails
on new dependencies outside the allowlist, and reuse lint where
adopted. Policy-as-code prevents the quiet arrival of an
incompatible dependency two years before anyone notices.
- Fulfill obligations at release time (rseng-publishing-releasing):
ship required notices (Apache NOTICE files aggregated, copyright
lines preserved), include dependency license texts where
distribution requires them, and keep binary/container
distributions in mind - an image distributes everything inside it.
- Record AI-assisted audits and license changes in aidecl.yaml
(rseng-ai-declaration); license history is provenance.
Working with this skill
This skill is source-independent: its authority is the SPDX and
REUSE specifications, the FSF and OSI license references and the
tool documentation linked below. It complements rseng-licensing
(fundamentals and first license choice).
Learn more (verified):
Related skills
Check whether any of these applies before moving on:
- rseng-ci-cd - policy-as-code license gates
- rseng-community-governance - CLA implications of dual licensing
- rseng-dependency-management - license axis of intake vetting
- rseng-licensing - first license choice basics
- rseng-publishing-releasing - notice obligations at release
- rseng-security - SBOM carries license data
1---2name: rseng-license-compliance3description: Covers license compliance engineering: auditing the full dependency tree's licenses, compatibility analysis (permissive vs weak vs strong copyleft, GPL interactions, combining and linking), dual and multi-licensing, SPDX expressions and REUSE-compliant repositories, attribution and NOTICE obligations, and license policy in CI. Use when the user asks whether dependencies' licenses are compatible, wants a license audit, considers dual licensing or relicensing, must satisfy GPL/LGPL obligations, mentions SPDX, REUSE, NOTICE files or license scanners, or needs a license recommendation under real constraints. (License basics and first-time license choice: rseng-licensing.)4license: CC-BY-4.05---67# License compliance for research software89Choosing a license is a decision; staying compliant is engineering.10Every dependency in the tree grants rights under conditions, and a11project distributing software must satisfy all of them at once -12which is checkable, automatable and routinely neglected in research13code. This skill covers the audit-and-verify side of licensing;14license basics (what MIT/GPL/Apache mean, adding a LICENSE file,15licensing docs and data) live in rseng-licensing. One boundary stated16up front: an agent can analyze, flag and prepare, but consequential17calls - relicensing, dual-licensing contracts, anything with18commercial stakes - belong with the institution's legal or tech19transfer office. Say so when the stakes warrant it.2021## Auditing the dependency tree2223Inventory before judgment:2425- Enumerate licenses of ALL transitive dependencies with a tool, not26 by hand: pip-licenses (Python), the equivalent per ecosystem27 (license-checker for npm, cargo-license), or ScanCode Toolkit for28 a thorough multi-language scan that reads actual file texts rather29 than trusting declared metadata.30- Treat "declared vs actual" skeptically: packages misdeclare;31 vendored files and copied snippets carry their own licenses; data32 and models bundled in the repo have licenses too33 (rseng-data-management).34- Flag the findings in three buckets: fine (compatible), obligations35 (compatible but with duties - attribution, notices, source offers),36 and conflicts (incompatible or unknown/unlicensed). "No license37 found" means all rights reserved and is a conflict, not a shrug.38- Record the audit result (a license inventory file or SBOM with39 license fields - rseng-security's SBOM practice carries license data40 naturally) so the next audit is a diff, not a redo.4142## Compatibility analysis4344The mental model that resolves most questions:4546- Direction matters: compatibility means "may I combine this47 dependency into a work distributed under MY license". Permissive48 code (MIT/BSD/Apache) flows into almost anything; copyleft code49 pulls the combined work toward its own terms.50- Strong copyleft (GPL family): distributing a work that links or51 combines GPL code requires the whole to be GPL-compatible; GPLv2-52 only vs GPLv3 is a real incompatibility to check, and Apache-2.053 is compatible with GPLv3 but not GPLv2.54- Weak copyleft (LGPL, MPL, EPL): obligations attach to the covered55 files/library, not the whole work - dynamic linking against LGPL56 is generally fine for any project; modifying the LGPL library57 itself is not.58- Network use: AGPL triggers source obligations on network service59 use - relevant the moment research software becomes a hosted60 service.61- Non-commercial and academic-only licenses (CC-NC variants,62 homegrown academic licenses) are incompatible with OSI open source63 and block downstream reuse; flag them loudly in dependencies and64 discourage them for new projects (rseng-licensing explains why).65- When a genuine conflict exists, the options in order: replace the66 dependency (rseng-software-reuse to find alternatives), isolate it67 behind a process/service boundary, seek an exception from its68 author, or change the project's own license. Present options with69 trade-offs; do not silently pick.7071Authoritative references for specific pairs: the FSF license list72and the EU Joinup Licensing Assistant's compatibility checker beat73folklore; cite them when a pairing is contested.7475## Suggesting a license (constraint-driven)7677Recommend from constraints, not fashion. Ask or infer: what do the78dependencies already require (a GPL dependency decides the question79for distributed works)? Does the institution or funder have a80policy? Is commercial adoption desired (permissive lowers friction)81or is reciprocity the goal (copyleft)? Is the artifact a library82(LGPL/MPL/permissive keep adopters) or an application? Then suggest83one license with a one-paragraph rationale and the runners-up -84choosealicense.com framing works well for users; rseng-licensing85covers the fuller decision guidance. Never leave a repository86unlicensed while the decision pends; that blocks everyone.8788## Dual and multi-licensing8990- Dual licensing offers the same code under two licenses: commonly91 copyleft-or-commercial (revenue model requiring copyright92 concentration - every contributor must agree via CLA or93 assignment, which changes community dynamics -94 rseng-community-governance), or license-choice offers like "MIT OR95 Apache-2.0" (adopter-friendly, common in some ecosystems).96- Express it precisely with SPDX expressions: `MIT OR Apache-2.0`97 (recipient chooses), `MIT AND CC-BY-4.0` (different artifacts98 under different terms - code vs docs/data is the research-typical99 case). Put the expression in package metadata and per-file tags.100- Relicensing an existing project requires consent of all copyright101 holders; enumerate contributors (git history) and treat it as a102 months-long consent project, not an edit. This is a103 route-to-legal-office decision.104105## Verifiable compliance: SPDX, REUSE and CI106107Make license state machine-checkable:108109<!-- REUSE-IgnoreStart -->110- Per-file SPDX tags (`SPDX-License-Identifier: Apache-2.0`) plus111 LICENSES/ directory per the REUSE specification; `reuse lint`112 then verifies the whole repository mechanically - the license113 analogue of a test suite.114<!-- REUSE-IgnoreEnd -->115- Enforce policy in CI (rseng-ci-cd): a license-audit step that fails116 on new dependencies outside the allowlist, and reuse lint where117 adopted. Policy-as-code prevents the quiet arrival of an118 incompatible dependency two years before anyone notices.119- Fulfill obligations at release time (rseng-publishing-releasing):120 ship required notices (Apache NOTICE files aggregated, copyright121 lines preserved), include dependency license texts where122 distribution requires them, and keep binary/container123 distributions in mind - an image distributes everything inside it.124- Record AI-assisted audits and license changes in aidecl.yaml125 (rseng-ai-declaration); license history is provenance.126127## Working with this skill128129This skill is source-independent: its authority is the SPDX and130REUSE specifications, the FSF and OSI license references and the131tool documentation linked below. It complements rseng-licensing132(fundamentals and first license choice).133134Learn more (verified):135 - https://spdx.org/licenses/ - SPDX license list and identifiers136 - https://reuse.software - REUSE specification and tooling137 - https://www.gnu.org/licenses/license-list.html - FSF license138 list and GPL-compatibility notes139 - https://opensource.org/licenses - OSI-approved licenses140 - https://choosealicense.com - license chooser141 - https://interoperable-europe.ec.europa.eu/collection/eupl/solution/licensing-assistant/find-and-compare-software-licenses -142 EU Joinup Licensing Assistant compatibility checker143 - https://github.com/aboutcode-org/scancode-toolkit - ScanCode144 Toolkit license scanner145 - https://github.com/raimon49/pip-licenses - pip-licenses146 dependency license reporting147148<!-- related-skills:begin -->149150## Related skills151152Check whether any of these applies before moving on:153154- rseng-ci-cd - policy-as-code license gates155- rseng-community-governance - CLA implications of dual licensing156- rseng-dependency-management - license axis of intake vetting157- rseng-licensing - first license choice basics158- rseng-publishing-releasing - notice obligations at release159- rseng-security - SBOM carries license data160161<!-- related-skills:end -->