Skip to content

Commit 66cbf2f

Browse files
authored
Implement Open Source Policy (elixir-lang#14266)
1 parent 901e066 commit 66cbf2f

File tree

4 files changed

+243
-1
lines changed

4 files changed

+243
-1
lines changed

.ort.yml

+10
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ curations:
109109
comment: "Ignored by ScanCode"
110110
detected_license: "NONE"
111111
concluded_license: "Apache-2.0"
112+
- path: "README.md"
113+
reason: "INCORRECT"
114+
comment: "Wrongly identified TSL license"
115+
detected_license: "Apache-2.0 OR NOASSERTION OR LicenseRef-scancode-tsl-2020"
116+
concluded_license: "Apache-2.0"
117+
- path: "OPEN_SOURCE_POLICY.md"
118+
reason: "INCORRECT"
119+
comment: "Wrongly identified NOASSERTION"
120+
detected_license: "NOASSERTION"
121+
concluded_license: "Apache-2.0"
112122

113123
packages:
114124
- id: "SpdxDocumentFile:The Elixir Team:elixir-lang:"

.ort/config/evaluator.rules.kts

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ val whitelistedLicenses = listOf(
2525
// License for the Elixir Logo
2626
"LicenseRef-elixir-trademark-policy",
2727
// License for included Unicode Files
28-
"LicenseRef-scancode-unicode"
28+
"LicenseRef-scancode-unicode",
29+
// DCO for committers
30+
"LicenseRef-scancode-dco-1.1"
2931
).map { SpdxSingleLicenseExpression.parse(it) }.toSet()
3032

3133
fun PackageRule.howToFixDefault() = """

OPEN_SOURCE_POLICY.md

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<!--
2+
SPDX-License-Identifier: Apache-2.0
3+
SPDX-FileCopyrightText: 2021 The Elixir Team
4+
-->
5+
6+
# Open Source Policy
7+
8+
## 1. Introduction
9+
10+
This Open Source Policy outlines the licensing, contribution, and compliance
11+
requirements for all code released under the Elixir project. By adhering to
12+
these guidelines, we ensure that our community, maintainers, and contributors
13+
uphold both legal and ethical standards while fostering a collaborative,
14+
transparent environment.
15+
16+
This policy exists to support and protect the Elixir community. It aims to
17+
balance openness, collaboration, and respect for all contributors’ rights,
18+
ensuring that Elixir remains a trusted and innovative open source project.
19+
20+
## 2. Scope
21+
22+
This policy applies to the Elixir Programming language, located at
23+
https://github.com/elixir-lang/elixir. It covers every file, and contribution
24+
made, including documentation and any associated assets.
25+
26+
## 3. Licensing
27+
28+
All code released by the Elixir team is licensed under the
29+
[Apache-2.0](./LICENSES/Apache-2.0.txt) license. Additionally, the following
30+
licenses are recognized as permissible in this project:
31+
32+
- The Unicode license, as documented at
33+
[LicenseRef-scancode-unicode](./LICENSES/LicenseRef-scancode-unicode.txt)
34+
- The Elixir Trademark Policy, as documented at
35+
[LicenseRef-elixir-trademark-policy](./LICENSES/LicenseRef-elixir-trademark-policy.txt)
36+
37+
These licenses are considered acceptable for any files or code that form part of
38+
an Elixir repository. If a contribution requires a different license, it must
39+
either be rejected or prompt an update to this policy.
40+
41+
## 4. Contributing to Elixir Projects
42+
43+
Any code contributed to Elixir repositories must fall under one of the accepted
44+
licenses (Apache-2.0, Unicode, or Elixir Trademark). Contributions under any
45+
other license will be rejected unless this policy is formally revised to include
46+
that license. All files except those specifically exempted (e.g., certain test
47+
fixture files) must contain SPDX license and copyright headers
48+
(`SPDX-License-Identifier` and `SPDX-FileCopyrightText`). If a file qualifies
49+
for an exception, this must be configured in the ORT (Open Source Review Toolkit)
50+
configuration and undergo review.
51+
52+
Contributions must not introduce executable binary files into the codebase.
53+
54+
Every Elixir project within the organization will have an automated GitHub
55+
Action to enforce these rules. This mechanism aids in detecting non-compliant
56+
licenses or files early in the review process.
57+
58+
## 5. Preservation of Copyright and License Information
59+
60+
Any third-party code incorporated into Elixir projects must retain original
61+
copyright and license headers. If no such headers exist in the source, they must
62+
be added. This practice ensures that original authors receive proper credit and
63+
that the licensing lineage is preserved.
64+
65+
## 6. Objectives
66+
67+
The Elixir project aims to promote a culture of responsible open source usage.
68+
Specifically, our objectives include:
69+
70+
### 6.1 Clearly Define and Communicate Licensing & Compliance Policies
71+
72+
We will identify and document all third-party dependencies, ensure that license
73+
information is communicated clearly, and maintain a project-wide license policy
74+
or compliance handbook.
75+
76+
### 6.2 Implement Clear Processes for Reviewing Contributions
77+
78+
We will provide well-defined contribution guidelines. We implement the
79+
Developer Certificate of Origin (DCO) for additional clarity regarding
80+
contributor rights and obligations.
81+
82+
### 6.3 Track and Audit Third-Party Code Usage
83+
84+
All projects will implement a Software Bill of Materials (SBoM) strategy and
85+
regularly verify license compliance for direct and transitive dependencies.
86+
87+
### 6.4 Monitor and Continuously Improve Open Source Compliance
88+
89+
We will conduct periodic internal audits, integrate compliance checks into
90+
continuous integration (CI/CD) pipelines, and regularly review and refine these
91+
objectives to align with best practices.
92+
93+
## 7. Roles and Responsibilities
94+
95+
### 7.1 Core Team Member
96+
97+
Core Team Members are responsible for being familiar with this policy and
98+
ensuring it is consistently enforced. They must demonstrate sufficient
99+
competencies to understand the policy requirements and must reject or request
100+
changes to any pull requests that violate these standards.
101+
102+
### 7.2 Contributor
103+
104+
Contributors are expected to follow this policy when submitting code. If a
105+
contributor submits a pull request that does not comply with the policy
106+
(e.g., introduces a disallowed license), Core Team Members have the authority to
107+
reject it or request changes. No special competencies are required for
108+
contributors beyond awareness and adherence to the policy.
109+
110+
### 7.3 EEF CISO
111+
112+
The CISO designated by the Erlang Ecosystem Foundation (EEF) provides oversight
113+
on queries and guidance regarding open source compliance or legal matters for
114+
Elixir. The CISO is responsible for checking ongoing compliance with the policy,
115+
escalating potential violations to the Core Team, and involving legal counsel if
116+
necessary. This role does not require legal expertise but does involve
117+
initiating legal or community discussions when needed.
118+
119+
## 8. Implications of Failing to Follow the Program Requirements
120+
121+
If a violation of this policy is identified, the Elixir Core Team will undertake
122+
the following actions:
123+
124+
## 8.1 Review the Codebase for Additional Violations
125+
126+
We will investigate the codebase thoroughly to detect any similar instances of
127+
non-compliance.
128+
129+
## 8.2 Review and Update the Process or Policy
130+
131+
In collaboration with the EEF CISO, the Elixir Core Team will assess the policy
132+
and our internal workflows, making any necessary clarifications or amendments to
133+
reduce the likelihood of recurrence.
134+
135+
## 8.3 Notify and Train Core Team Members
136+
137+
We will ensure that all active Core Team Members are informed about any policy
138+
changes and understand how to apply them in everyday development.
139+
140+
## 8.4 Remove or Replace the Offending Code
141+
142+
If required, we will remove or replace the non-compliant code.
143+
144+
## 9. Contact
145+
146+
The project maintains a private mailing list at
147+
[[email protected]](mailto:[email protected]) for handling licensing
148+
and policy-related queries. Email is the preferred communication channel, and
149+
the EEF CISO will be included on this list to provide assistance and ensure
150+
timely responses. While solutions may take longer to implement, the project
151+
commits to acknowledging all queries within five business days.
152+
153+
## 10. External Contributions of Core Team Members
154+
155+
When Core Team Members contribute to repositories outside Elixir, they do so in
156+
a personal capacity or via their employer. They will not act as official
157+
representatives of the Elixir team in those external contexts.
158+
159+
## 11. Policy Review and Amendments
160+
161+
This policy will be revisited annually to address new concerns, accommodate
162+
changes in community standards, or adjust to emerging legal or technical
163+
requirements. Proposed amendments must be reviewed by the Core Team and, if
164+
necessary, by the EEF CISO. Any significant changes will be communicated to
165+
contributors and made publicly available.
166+
167+
*Effective Date: 2025-02-20*
168+
*Last Reviewed: 2025-02-20*

README.md

+62
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ information, please read our [Security Policy][9].
3131
All interactions in our official communication channels follow our
3232
[Code of Conduct][1].
3333

34+
All contributions are required to conform to our [Open Source Policy][11].
35+
3436
## Bug reports
3537

3638
For reporting bugs, [visit our issue tracker][2] and follow the steps
@@ -213,6 +215,65 @@ into the repository. If you have carefully organized your commits and
213215
believe they should be merged without squashing, please mention it in
214216
a comment.
215217

218+
### Licensing and Compliance Requirements
219+
220+
Please review our [Open Source Policy][11] for complete guidelines on licensing
221+
and compliance. Below is a summary of the key points affecting
222+
**all external contributors**:
223+
224+
- Accepted Licenses: Any code contributed must be licensed under the
225+
`Apache-2.0` license.
226+
- SPDX License Headers: With the exception of approved test fixture files,
227+
all new or modified files in a pull request must include correct SPDX
228+
headers. If you are creating a new file under the `Apache-2.0` license, for
229+
instance, please use:
230+
231+
```elixir
232+
# SPDX-License-Identifier: Apache-2.0
233+
# SPDX-FileCopyrightText: 2021 The Elixir Team
234+
```
235+
236+
- No Executable Binaries: Contributions must **not** include any executable
237+
binary files. If you require an exception (for example, certain test artifacts),
238+
please see the policy on how to request approval and document exceptions.
239+
- Preserving Copyright and License Info: If you copy code from elsewhere,
240+
ensure that **all original copyright and license notices remain intact**. If
241+
they are missing or incomplete, you must add them.
242+
- Failure to Comply: Pull requests that do not meet these licensing and
243+
compliance standards will be rejected or require modifications before merging.
244+
- Developer Certificate of Origin: All contributions are subject to the
245+
Developer Certificate of Origin.
246+
247+
```
248+
By making a contribution to this project, I certify that:
249+
250+
(a) The contribution was created in whole or in part by me and I
251+
have the right to submit it under the open source license
252+
indicated in the file; or
253+
254+
(b) The contribution is based upon previous work that, to the
255+
best of my knowledge, is covered under an appropriate open
256+
source license and I have the right under that license to
257+
submit that work with modifications, whether created in whole
258+
or in part by me, under the same open source license (unless
259+
I am permitted to submit under a different license), as
260+
Indicated in the file; or
261+
262+
(c) The contribution was provided directly to me by some other
263+
person who certified (a), (b) or (c) and I have not modified
264+
it.
265+
266+
(d) I understand and agree that this project and the contribution
267+
are public and that a record of the contribution (including
268+
all personal information I submit with it, including my
269+
sign-off) is maintained indefinitely and may be redistributed
270+
consistent with this project or the open source license(s)
271+
involved.
272+
```
273+
274+
See http://developercertificate.org/ for a copy of the Developer Certificate
275+
of Origin license.
276+
216277
## Building documentation
217278

218279
Building the documentation requires that [ExDoc](https://github.com/elixir-lang/ex_doc)
@@ -256,6 +317,7 @@ and `mix` under the `doc` directory. If you are planning to contribute documenta
256317
[8]: https://groups.google.com/group/elixir-lang-ann
257318
[9]: SECURITY.md
258319
[10]: https://groups.google.com/forum/#!searchin/elixir-lang-ann/%5Bsecurity%5D%7Csort:date
320+
[11]: OPEN_SOURCE_POLICY.md
259321
260322
## License
261323

0 commit comments

Comments
 (0)