Skip to content

Commit 43fafe3

Browse files
committed
Update CONTRIBUTING with license/package scanning info
Signed-off-by: Victor Chang <[email protected]>
1 parent 00304a1 commit 43fafe3

File tree

1 file changed

+65
-13
lines changed

1 file changed

+65
-13
lines changed

CONTRIBUTING.md

Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
<!--
2-
SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
3-
SPDX-License-Identifier: Apache License 2.0
2+
~ Copyright 2021-2022 MONAI Consortium
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
415
-->
516
- [Introduction](#introduction)
617
- [Communicate with us](#communicate-with-us)
@@ -77,18 +88,59 @@ An [EditorConfig](https://editorconfig.org "EditorConfig homepage") file (`.edit
7788
All source code files should start with this paragraph:
7889

7990
```
80-
// Copyright <YEAR FROM-YEAR TO> MONAI Consortium
81-
// Licensed under the Apache License, Version 2.0 (the "License");
82-
// you may not use this file except in compliance with the License.
83-
// You may obtain a copy of the License at
84-
// http://www.apache.org/licenses/LICENSE-2.0
85-
86-
// Unless required by applicable law or agreed to in writing, software
87-
// distributed under the License is distributed on an "AS IS" BASIS,
88-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89-
// See the License for the specific language governing permissions and
90-
// limitations under the License.
91+
/*
92+
* Copyright YYYY[-YYYY] MONAI Consortium
93+
*
94+
* Licensed under the Apache License, Version 2.0 (the "License");
95+
* you may not use this file except in compliance with the License.
96+
* You may obtain a copy of the License at
97+
*
98+
* http://www.apache.org/licenses/LICENSE-2.0
99+
*
100+
* Unless required by applicable law or agreed to in writing, software
101+
* distributed under the License is distributed on an "AS IS" BASIS,
102+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
103+
* See the License for the specific language governing permissions and
104+
* limitations under the License.
105+
*/
106+
91107
```
108+
A CI step (Check License Header) scans the entire repository to ensure all files include the license mentioned above text.
109+
110+
Please refer to [skywalking-eyes](https://github.com/apache/skywalking-eyes) on how to execute the tool locally and use the [.licenserc.yaml](./.licenserc.yaml) to configure scanning options.
111+
112+
###### License Scanning
113+
114+
We operate under the Apache 2.0 license, meaning we can only use packages with specific permissive licenses. Below are the lists of permits we can/maybe can allow.
115+
116+
**Green list** (Can be committed without approval)
117+
118+
- MIT
119+
- Apache 2.0
120+
- Dotnet
121+
122+
**Amber list** (Requires approval from the maintainers)
123+
124+
- BSD
125+
126+
**Red list** (Cannot be used)
127+
128+
- Anything other than the above
129+
130+
No matter the license of the new package that is added, you will notice that the CI license scanner (Perform License Scanning step) will fail and state that the dependency needs approval. This CI step is to ensure that no packages slip through unchecked. When this happens, if your package's license is on the green-list, you can add it to the allow-list at [doc/dependency_decision.yml](./doc/dependency_decisions.yml) with the below template.
131+
132+
```yaml
133+
- - :approve
134+
- PackageName
135+
- :who: YourName (YourUsername)
136+
:why: LicenseName - CorrectLicenceURL
137+
:versions: []
138+
:when: CurrentDate/Time e.g. 2022-04-14 09:14:32
139+
```
140+
141+
If your package is on the Amber list, please make a maintainer aware and let them go through the review process before adding it to the allowlist.
142+
143+
If your package is on the Red list, you will have to look for another package that achieves the same aim with a more permissive license.
92144
93145
#### Test Projects
94146

0 commit comments

Comments
 (0)