Skip to content

Commit ab3f776

Browse files
committed
Update ORT Scanner
1 parent 57c254f commit ab3f776

File tree

9 files changed

+196
-85
lines changed

9 files changed

+196
-85
lines changed

.github/workflows/ort/action.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ runs:
6262
# Override Default Evaluator Rules
6363
cp .ort/config/evaluator.rules.kts "$HOME/.ort/config/evaluator.rules.kts"
6464
65+
# Add Package Configurations
66+
mkdir -p "$HOME/.ort/config/package-configurations/SpdxDocumentFile/The Elixir Team"
67+
for FILE in .ort/package-configurations/*.yml; do
68+
COMPONENT="$(basename "$FILE")"
69+
cp "$FILE" "$HOME/.ort/config/package-configurations/SpdxDocumentFile/The Elixir Team/$COMPONENT"
70+
sed -i -E \
71+
"s/(\"SpdxDocumentFile:The Elixir Team:.+:)\"/\1${ELIXIR_VERSION}\"/" \
72+
"$HOME/.ort/config/package-configurations/SpdxDocumentFile/The Elixir Team/$COMPONENT"
73+
done
74+
6575
# Set Version in SPDX & Config
6676
sed -i "s/# elixir-version-insert/versionInfo: '${ELIXIR_VERSION}'/" project.spdx.yml
6777
sed -i -E "s/(\"SpdxDocumentFile:The Elixir Team:.+:)\"/\1${ELIXIR_VERSION}\"/" .ort.yml
@@ -80,7 +90,9 @@ runs:
8090
id: ort
8191
uses: oss-review-toolkit/ort-ci-github-action@1805edcf1f4f55f35ae6e4d2d9795ccfb29b6021 # v1.1.0
8292
with:
83-
image: ghcr.io/oss-review-toolkit/ort-minimal:54.0.0
93+
# TODO: Put official image once available
94+
# https://github.com/oss-review-toolkit/ort/pull/10502
95+
image: ghcr.io/maennchen/ort-minimal:sha-109b2d5
8496
run: >-
8597
labels,
8698
cache-dependencies,

.ort.yml

Lines changed: 56 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33

44
excludes:
55
paths:
6-
- pattern: "lib/elixir/pages/**/*"
7-
reason: "DOCUMENTATION_OF"
8-
comment: "Documentation"
9-
- pattern: "lib/elixir/scripts/**/*"
10-
reason: "BUILD_TOOL_OF"
11-
comment: "Build Tool"
12-
- pattern: "lib/ex_unit/examples/**/*"
13-
reason: "EXAMPLE_OF"
14-
comment: "Example"
15-
- pattern: "lib/*/test/**/*"
16-
reason: "TEST_OF"
17-
comment: "Tests"
186
- pattern: "man/*"
197
reason: "DOCUMENTATION_OF"
208
comment: "Documentation"
@@ -25,8 +13,64 @@ excludes:
2513
reason: "BUILD_TOOL_OF"
2614
comment: "Documentation"
2715

16+
# Unfortunately we'll have to repeat all package level excludes here
17+
# Make sure to keep them in sync with the package configuration in
18+
# .ort/package-configurations
19+
- pattern: "lib/*/pages/**/*"
20+
reason: "DOCUMENTATION_OF"
21+
comment: "Documentation"
22+
- pattern: "lib/*/test/**/*"
23+
reason: "TEST_OF"
24+
comment: "Tests"
25+
- pattern: "lib/*/scripts/**/*"
26+
reason: "BUILD_TOOL_OF"
27+
comment: "Build Tool"
28+
- pattern: "lib/*/examples/**/*"
29+
reason: "EXAMPLE_OF"
30+
comment: "Example"
31+
2832
curations:
2933
license_findings:
34+
# Version File
35+
- path: "VERSION"
36+
reason: "NOT_DETECTED"
37+
comment: "Apply Trademark Policy to VERSION file"
38+
detected_license: "NONE"
39+
concluded_license: "Apache-2.0"
40+
41+
# Wrongly Identified
42+
- path: ".gitignore"
43+
reason: "INCORRECT"
44+
comment: "Ignored by ScanCode"
45+
detected_license: "NONE"
46+
concluded_license: "Apache-2.0"
47+
- path: ".gitattributes"
48+
reason: "INCORRECT"
49+
comment: "Ignored by ScanCode"
50+
detected_license: "NONE"
51+
concluded_license: "Apache-2.0"
52+
- path: "CONTRIBUTING.md"
53+
reason: "INCORRECT"
54+
comment: "Wrongly identified TSL license"
55+
detected_license: "Apache-2.0 OR NOASSERTION OR LicenseRef-scancode-tsl-2020"
56+
concluded_license: "Apache-2.0"
57+
- path: "OPEN_SOURCE_POLICY.md"
58+
reason: "INCORRECT"
59+
comment: "Wrongly identified NOASSERTION"
60+
detected_license: "NOASSERTION"
61+
concluded_license: "Apache-2.0"
62+
63+
# Unfortunately we'll have to repeat all package level license curations here
64+
# Make sure to keep them in sync with the package configuration in
65+
# .ort/package-configurations
66+
67+
# Test Fixtures
68+
- path: "lib/*/test/fixtures/**/*"
69+
reason: "NOT_DETECTED"
70+
comment: "Apply default license to test fixtures"
71+
detected_license: "NONE"
72+
concluded_license: "Apache-2.0"
73+
3074
# Logos
3175
- path: "lib/elixir/pages/images/logo.png"
3276
reason: "NOT_DETECTED"
@@ -39,13 +83,6 @@ curations:
3983
detected_license: "NONE"
4084
concluded_license: "LicenseRef-elixir-trademark-policy"
4185

42-
# Version File
43-
- path: "VERSION"
44-
reason: "NOT_DETECTED"
45-
comment: "Apply Trademark Policy to VERSION file"
46-
detected_license: "NONE"
47-
concluded_license: "Apache-2.0"
48-
4986
# Documentation Images
5087
- path: "lib/elixir/pages/images/**/*.png"
5188
reason: "NOT_DETECTED"
@@ -54,26 +91,11 @@ curations:
5491
concluded_license: "Apache-2.0"
5592

5693
# Test Fixtures
57-
- path: "lib/eex/test/fixtures/**/*"
58-
reason: "NOT_DETECTED"
59-
comment: "Apply default license to test fixtures"
60-
detected_license: "NONE"
61-
concluded_license: "Apache-2.0"
6294
- path: "lib/elixir/test/elixir/fixtures/**/*"
6395
reason: "NOT_DETECTED"
6496
comment: "Apply default license to test fixtures"
6597
detected_license: "NONE"
6698
concluded_license: "Apache-2.0"
67-
- path: "lib/ex_unit/test/fixtures/**/*"
68-
reason: "NOT_DETECTED"
69-
comment: "Apply default license to test fixtures"
70-
detected_license: "NONE"
71-
concluded_license: "Apache-2.0"
72-
- path: "lib/mix/test/fixtures/**/*"
73-
reason: "NOT_DETECTED"
74-
comment: "Apply default license to test fixtures"
75-
detected_license: "NONE"
76-
concluded_license: "Apache-2.0"
7799

78100
# Unicode
79101
- path: "lib/elixir/unicode/*.txt"
@@ -89,57 +111,8 @@ curations:
89111
The guide mentions multiple licenses for users to choose from.
90112
It however is not licensed itself by the mentioned licenses.
91113
concluded_license: "Apache-2.0"
92-
- path: ".gitignore"
93-
reason: "INCORRECT"
94-
comment: "Ignored by ScanCode"
95-
detected_license: "NONE"
96-
concluded_license: "Apache-2.0"
97-
- path: ".gitattributes"
98-
reason: "INCORRECT"
99-
comment: "Ignored by ScanCode"
100-
detected_license: "NONE"
101-
concluded_license: "Apache-2.0"
102114
- path: "lib/elixir/scripts/windows_installer/.gitignore"
103115
reason: "INCORRECT"
104116
comment: "Ignored by ScanCode"
105117
detected_license: "NONE"
106118
concluded_license: "Apache-2.0"
107-
- path: "CONTRIBUTING.md"
108-
reason: "INCORRECT"
109-
comment: "Wrongly identified TSL license"
110-
detected_license: "Apache-2.0 OR NOASSERTION OR LicenseRef-scancode-tsl-2020"
111-
concluded_license: "Apache-2.0"
112-
- path: "OPEN_SOURCE_POLICY.md"
113-
reason: "INCORRECT"
114-
comment: "Wrongly identified NOASSERTION"
115-
detected_license: "NOASSERTION"
116-
concluded_license: "Apache-2.0"
117-
118-
packages:
119-
- id: "SpdxDocumentFile:The Elixir Team:elixir-lang:"
120-
curations:
121-
concluded_license: "Apache-2.0 AND LicenseRef-scancode-unicode"
122-
- id: "SpdxDocumentFile:The Elixir Team:eex:"
123-
curations:
124-
concluded_license: "Apache-2.0"
125-
is_metadata_only: true
126-
- id: "SpdxDocumentFile:The Elixir Team:elixir:"
127-
curations:
128-
concluded_license: "Apache-2.0 AND LicenseRef-scancode-unicode"
129-
is_metadata_only: true
130-
- id: "SpdxDocumentFile:The Elixir Team:exunit:"
131-
curations:
132-
concluded_license: "Apache-2.0"
133-
is_metadata_only: true
134-
- id: "SpdxDocumentFile:The Elixir Team:iex:"
135-
curations:
136-
concluded_license: "Apache-2.0"
137-
is_metadata_only: true
138-
- id: "SpdxDocumentFile:The Elixir Team:logger:"
139-
curations:
140-
concluded_license: "Apache-2.0"
141-
is_metadata_only: true
142-
- id: "SpdxDocumentFile:The Elixir Team:mix:"
143-
curations:
144-
concluded_license: "Apache-2.0"
145-
is_metadata_only: true

.ort/config/config.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
ort:
55
enableRepositoryPackageCurations: true
6+
enableRepositoryPackageConfigurations: true
67

78
scanner:
89
skipConcluded: false
@@ -11,4 +12,10 @@ ort:
1112
analyzer:
1213
allowDynamicVersions: true
1314
enabledPackageManagers: [SpdxDocumentFile]
14-
skipExcluded: true
15+
16+
reporter:
17+
reporters:
18+
SpdxDocument:
19+
options:
20+
creationInfoOrganization: The Elixir Team
21+
documentName: "Elixir Source SPDX Document"

.ort/package-configurations/eex.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
4+
id: "SpdxDocumentFile:The Elixir Team:eex:"
5+
path_excludes:
6+
- pattern: "lib/eex/test/**/*"
7+
reason: "TEST_OF"
8+
comment: "Tests"
9+
license_finding_curations:
10+
# Test Fixtures
11+
- path: "lib/eex/test/fixtures/**/*"
12+
reason: "NOT_DETECTED"
13+
comment: "Apply default license to test fixtures"
14+
detected_license: "NONE"
15+
concluded_license: "Apache-2.0"
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
4+
id: "SpdxDocumentFile:The Elixir Team:elixir:"
5+
path_excludes:
6+
- pattern: "lib/elixir/pages/**/*"
7+
reason: "DOCUMENTATION_OF"
8+
comment: "Documentation"
9+
- pattern: "lib/elixir/scripts/**/*"
10+
reason: "BUILD_TOOL_OF"
11+
comment: "Build Tool"
12+
- pattern: "lib/elixir/test/**/*"
13+
reason: "TEST_OF"
14+
comment: "Tests"
15+
license_finding_curations:
16+
# Logos
17+
- path: "lib/elixir/pages/images/logo.png"
18+
reason: "NOT_DETECTED"
19+
comment: "Apply Trademark Policy to Elixir Logo"
20+
detected_license: "NONE"
21+
concluded_license: "LicenseRef-elixir-trademark-policy"
22+
- path: "lib/elixir/scripts/windows_installer/assets/Elixir.ico"
23+
reason: "NOT_DETECTED"
24+
comment: "Apply Trademark Policy to Elixir Logo"
25+
detected_license: "NONE"
26+
concluded_license: "LicenseRef-elixir-trademark-policy"
27+
28+
# Documentation Images
29+
- path: "lib/elixir/pages/images/**/*.png"
30+
reason: "NOT_DETECTED"
31+
comment: "Apply default license to all images"
32+
detected_license: "NONE"
33+
concluded_license: "Apache-2.0"
34+
35+
# Test Fixtures
36+
- path: "lib/elixir/test/elixir/fixtures/**/*"
37+
reason: "NOT_DETECTED"
38+
comment: "Apply default license to test fixtures"
39+
detected_license: "NONE"
40+
concluded_license: "Apache-2.0"
41+
42+
# Unicode
43+
- path: "lib/elixir/unicode/*.txt"
44+
reason: "NOT_DETECTED"
45+
comment: "Apply default license to unicode files"
46+
detected_license: "NONE"
47+
concluded_license: "LicenseRef-scancode-unicode"
48+
49+
# Wrongly Identified
50+
- path: "lib/elixir/pages/references/library-guidelines.md"
51+
reason: "INCORRECT"
52+
comment: |
53+
The guide mentions multiple licenses for users to choose from.
54+
It however is not licensed itself by the mentioned licenses.
55+
concluded_license: "Apache-2.0"
56+
- path: "lib/elixir/scripts/windows_installer/.gitignore"
57+
reason: "INCORRECT"
58+
comment: "Ignored by ScanCode"
59+
detected_license: "NONE"
60+
concluded_license: "Apache-2.0"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
4+
id: "SpdxDocumentFile:The Elixir Team:exunit:"
5+
path_excludes:
6+
- pattern: "lib/ex_unit/examples/**/*"
7+
reason: "EXAMPLE_OF"
8+
comment: "Example"
9+
- pattern: "lib/ex_unit/test/**/*"
10+
reason: "TEST_OF"
11+
comment: "Tests"
12+
license_finding_curations:
13+
# Test Fixtures
14+
- path: "lib/ex_unit/test/fixtures/**/*"
15+
reason: "NOT_DETECTED"
16+
comment: "Apply default license to test fixtures"
17+
detected_license: "NONE"
18+
concluded_license: "Apache-2.0"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
4+
id: "SpdxDocumentFile:The Elixir Team:logger:"
5+
path_excludes:
6+
- pattern: "lib/logger/test/**/*"
7+
reason: "TEST_OF"
8+
comment: "Tests"

.ort/package-configurations/mix.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
4+
id: "SpdxDocumentFile:The Elixir Team:mix:"
5+
path_excludes:
6+
- pattern: "lib/mix/test/**/*"
7+
reason: "TEST_OF"
8+
comment: "Tests"
9+
license_finding_curations:
10+
# Test Fixtures
11+
- path: "lib/mix/test/fixtures/**/*"
12+
reason: "NOT_DETECTED"
13+
comment: "Apply default license to test fixtures"
14+
detected_license: "NONE"
15+
concluded_license: "Apache-2.0"

lib/iex/test/iex/config_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
14
Code.require_file("../test_helper.exs", __DIR__)
25

36
defmodule IEx.ConfigTest do

0 commit comments

Comments
 (0)