Skip to content

Commit

Permalink
Merge pull request #256 from Project-MONAI/vchang/license-scan
Browse files Browse the repository at this point in the history
Enable license header scan
  • Loading branch information
mocsharp committed Jul 25, 2022
2 parents b8177b4 + c57e6e7 commit 019d018
Show file tree
Hide file tree
Showing 290 changed files with 4,555 additions and 626 deletions.
16 changes: 15 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

.github/
.docs/
.demos/
Expand Down Expand Up @@ -58,4 +72,4 @@ bld/
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
!*.[Cc]ache/
16 changes: 15 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# Copyright 2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# editorconfig.org

# top-most EditorConfig file
root = true

# Copyright File Header
file_header_template = SPDX-FileCopyrightText: © [year file created] - [last year file modified], MONAI Consortium\nSPDX-License-Identifier: Apache License 2.0
file_header_template = SPDX-FileCopyrightText: [year file created] - [last year file modified], MONAI Consortium\nSPDX-License-Identifier: Apache License 2.0
dotnet_diagnostic.IDE0073.severity = error

# Default settings:
Expand Down
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Description

Fixes # .

A few sentences describing the changes proposed in this pull request.

### Status
**Ready/Work in progress/Hold**

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not applicable items -->
- [ ] Non-breaking change (fix or new feature that would not break existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing functionality to change).
- [ ] New tests added to cover the changes.
- [ ] All tests passed locally.
- [ ] [Documentation comments](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/documentation-comments) included/updated.
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
# SPDX-License-Identifier: Apache License 2.0
# Copyright 2021-2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build Project

Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
# SPDX-License-Identifier: Apache License 2.0
# Copyright 2021-2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: CodeQL

Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/license-scanning.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
# SPDX-License-Identifier: Apache License 2.0
# Copyright 2021-2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: License Finder

Expand Down Expand Up @@ -47,6 +58,9 @@ jobs:

- name: Perform License Scanning
run: license_finder -r

- name: Check License Header
uses: apache/skywalking-eyes@main

- name: Check this step to see how to resolve failure
if: ${{ failure() }}
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
# SPDX-License-Identifier: Apache License 2.0
# Copyright 2021-2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Publish and scan

Expand All @@ -26,7 +37,7 @@ jobs:
export VERSION=`cat VERSION`
./build.sh
docker tag monai/workflow-manager:$VERSION monai/workflow-manager:${{ github.sha }}
- name: Scan image with Azure Container Scan
uses: Azure/container-scan@v0
with:
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
# SPDX-License-Identifier: Apache License 2.0
# Copyright 2021-2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Security Scanning

Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
# SPDX-License-Identifier: Apache License 2.0
# Copyright 2021-2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Tests & Sonarscanner/CodeCov

Expand Down Expand Up @@ -44,9 +55,9 @@ jobs:
run: |
find ~+ -type f -name "*.Tests.csproj" | \
xargs -L1 dotnet test -v=minimal --results-directory "./results" \
--collect:"XPlat Code Coverage" --settings "./coverlet.runsettings"
--collect:"XPlat Code Coverage" --settings "./coverlet.runsettings"
working-directory: ./tests

- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -235,8 +246,8 @@ jobs:
- name: Download code coverage from unit tests
uses: actions/download-artifact@v3
with:
name: code-coverage-reports
name: code-coverage-reports

- name: End SonarScanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -251,7 +262,7 @@ jobs:
- name: Download code coverage from unit tests
uses: actions/download-artifact@v3
with:
name: code-coverage-reports
name: code-coverage-reports

- name: Run CodeCov analysis
uses: codecov/codecov-action@v2
Expand Down
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Created by https://www.toptal.com/developers/gitignore/api/aspnetcore,dotnetcore,visualstudio,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=aspnetcore,dotnetcore,visualstudio,visualstudiocode

Expand Down
53 changes: 53 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

header:
license:
spdx-id: Apache-2.0
copyright-owner: MONAI Consortium

paths-ignore:
- 'LICENSE'
- 'VERSION'
- '.github/**/*.md'
- '**/*.log'
- '**/bin/**'
- '**/obj/**'
- '**/*.json'
- '**/*.nswag'
- '**/*.ruleset'
- '**/*.feature.cs'
- 'src/.sonarlint/**'
- 'src/coverlet.runsettings'
- 'src/.vs'

comment: on-failure

# license-location-threshold specifies the index threshold where the license header can be located,
# after all, a "header" cannot be TOO far from the file start.
license-location-threshold: 80

language:
VSSoluation:
extensions:
- ".sln"
comment_style_id: AngleBracket
GherkinFeature:
extensions:
- ".feature"
comment_style_id: Hashtag
Config:
extensions:
- ".conf"
comment_style_id: Hashtag
15 changes: 13 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<!--
SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
SPDX-License-Identifier: Apache License 2.0
~ Copyright 2021-2022 MONAI Consortium
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

# Contributor Covenant Code of Conduct
Expand Down
42 changes: 27 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<!--
SPDX-FileCopyrightText: � 2021-2022 MONAI Consortium
SPDX-License-Identifier: Apache License 2.0
~ Copyright 2021-2022 MONAI Consortium
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

- [Introduction](#introduction)
- [Communicate with us](#communicate-with-us)
- [The contribution process](#the-contribution-process)
- [Preparing pull requests](#preparing-pull-requests)
- [Checking the coding style](#checking-the-coding-style)
- [C# Coding Style](#c-coding-style)
- [License information](#license-information)
- [License Scanning](#license-scanning)
- [Test Projects](#test-projects)
- [Building the documentation](#building-the-documentation)
- [Automatic code formatting](#automatic-code-formatting)
- [Signing your work](#signing-your-work)
- [Submitting pull requests](#submitting-pull-requests)
- [Branching](#branching)
- [Begin with Your Contribution Journey with a Pull Request](#begin-with-your-contribution-journey-with-a-pull-request)
- [When You Are Ready to Merge](#when-you-are-ready-to-merge)
- [Release a new version](#release-a-new-version)


Expand Down Expand Up @@ -88,8 +89,19 @@ An [EditorConfig](https://editorconfig.org "EditorConfig homepage") file (`.edit
All source code files should start with this paragraph:

```
// SPDX-FileCopyrightText: © [YEAR]-[YEAR] MONAI Consortium
// SPDX-License-Identifier: Apache License 2.0
// Copyright 2022 MONAI Consortium
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```

##### License Scanning
Expand Down
Loading

0 comments on commit 019d018

Please sign in to comment.