Federal Open Source Licensing (Code.mil Model)
Context & Objectives
Under 17 U.S.C. Section 105, copyright protection is unavailable for works created by United States Government officers or employees as part of their official duties. However:
- International jurisdictions may recognize government copyright under the Berne Convention.
- Third-party/community contributors retain copyright in their own contributions.
- Users and government authors need liability disclaimers ("AS IS").
Following the Code.mil pattern, this workflow transitions repositories (e.g., from GPL or undefined licenses) to an MIT License paired with an INTENT.md statement and explicit federal public-domain notices.
Workflow Steps
Step 1: Contributor & Licensing Audit
-
Run a contributor audit to determine whether non-federal third-party code exists:
git log --format='%an <%ae>' | sort -u
-
Inspect legacy license files (LICENSE, COPYING, LICENSE.txt).
-
Identify whether any non-federal contributions exist in the active codebase:
- If non-federal code is substantial and was licensed under GPL, verify consent from original authors before downgrading to MIT, or replace/rewrite the specific routine.
- If all historical/active maintainers were federal employees acting within their official duties, or if non-federal code has been superseded, proceed directly.
Step 2: Create Root Licensing Files
1. INTENT.md
Create INTENT.md in the repository root:
# Open Source Intent & Licensing
This project is authored and maintained by United States Government employees as part of their official duties, alongside open-source community contributors.
## 1. Domestic Status (United States)
Pursuant to 17 U.S.C. Section 105, works of the United States Government are not eligible for copyright protection within the United States. Work authored by U.S. Government personnel in the scope of employment resides in the public domain domestically.
## 2. International & Permissive Licensing
To ensure clarity across international jurisdictions where foreign copyright may be recognized under international conventions, and to govern contributions from non-federal entities, this software is made available under the terms of the [MIT License](LICENSE.md).
## 3. External Contributions
Any contributions submitted to this project by non-federal contributors are accepted under the terms of the project's MIT License.
## 4. Disclaimer
This software is provided "as is", without warranty of any kind, express or implied. Use of this software does not constitute official endorsement by the U.S. Government or any of its agencies.
2. LICENSE.md
Create or update LICENSE.md in the repository root:
# MIT License
Copyright (c) [YEAR] U.S. Federal Government (in countries where recognized)
Copyright (c) [YEAR] Project Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
### U.S. Government Notice
Portions of this software are a work of the United States Government and are in
the public domain within the United States pursuant to 17 U.S.C. Section 105. For
jurisdictions where copyright may subsist, and for third-party contributions,
the terms of the MIT License above apply.
Step 3: Ecosystem-Specific Adjustments
R Packages (CRAN / Bioconductor)
R package tooling (R CMD check, CRAN automated parsers) expects strict formatting. A raw LICENSE.md alone is insufficient if the DESCRIPTION specifies file LICENSE.
-
Update DESCRIPTION:
Set the License field to:
License: MIT + file LICENSE
-
Generate Top-Level LICENSE File:
CRAN requires this file to contain only two specific key-value lines (YEAR and COPYRIGHT HOLDER). Do not put full markdown or narrative prose in this exact file:
YEAR: [YEAR]
COPYRIGHT HOLDER: U.S. Federal Government (in countries where recognized), package contributors
-
Retain Full Text in LICENSE.md or LICENSE.note:
Leave LICENSE.md (from Step 2) in the repository root or provide a LICENSE.note so developers and package inspectors have access to the complete MIT text and Section 105 rider.
-
Add to .Rbuildignore:
Ensure markdown-only artifacts do not trigger build warnings during R CMD check:
^INTENT\.md$
^LICENSE\.md$
-
Document in NEWS.md and cran-comments.md:
Python Packages (pyproject.toml / setup.cfg)
Step 4: Verification Checklist