Skip to content

Commit 96a3322

Browse files
authored
Merge branch 'oss-review-toolkit:main' into main
2 parents 9fae717 + 3dd5330 commit 96a3322

File tree

188 files changed

+91926
-95864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+91926
-95864
lines changed

.detekt.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
1-
# Configuration of detekt rule sets, see https://arturbosch.github.io/detekt/comments.html.
1+
# Configuration of detekt rule sets, see https://detekt.dev/docs/intro.
22
# This file only lists the differences to the default configuration at
3-
# https://github.com/arturbosch/detekt/blob/master/detekt-cli/src/main/resources/default-detekt-config.yml.
3+
# https://github.com/detekt/detekt/blob/main/detekt-core/src/main/resources/default-detekt-config.yml.
44

55
complexity:
66
CyclomaticComplexMethod:
7-
threshold: 25
7+
allowedComplexity: 25
88
LongMethod:
9-
threshold: 158
9+
allowedLines: 158
1010
LongParameterList:
11-
constructorThreshold: 11
12-
functionThreshold: 8
11+
allowedConstructorParameters: 11
12+
allowedFunctionParameters: 8
1313
NestedBlockDepth:
14-
threshold: 10
14+
allowedDepth: 10
1515
TooManyFunctions:
16-
thresholdInClasses: 19
17-
thresholdInObjects: 14
16+
allowedFunctionsPerClass: 19
17+
allowedFunctionsPerObject: 14
1818

1919
coroutines:
2020
InjectDispatcher:
2121
active: false
2222

2323
# Formatting rules are implemented via the ktlint plugin and are the only rules that support auto-formatting. However,
2424
# as ktlint does not allow to configure exceptions, some rules need to be disabled completely.
25-
formatting:
25+
ktlint:
2626
AnnotationOnSeparateLine:
2727
active: false
2828
ArgumentListWrapping:
2929
active: false
30+
ChainMethodContinuation:
31+
active: false
3032
ChainWrapping:
3133
active: false
34+
ClassSignature:
35+
active: false
3236
CommentWrapping:
3337
active: false
3438
FinalNewline:
@@ -40,12 +44,16 @@ formatting:
4044
active: false
4145
MaximumLineLength:
4246
active: false
47+
NoBlankLineInList:
48+
active: false
4349
NoWildcardImports:
4450
active: false
4551
ParameterListWrapping:
4652
active: false
4753
SpacingBetweenDeclarationsWithAnnotations:
4854
active: false
55+
StringTemplateIndent:
56+
active: false
4957
TrailingCommaOnCallSite:
5058
active: true
5159
useTrailingCommaOnCallSite: false
@@ -79,12 +87,11 @@ style:
7987
excludes: ["**/clients/github-graphql/build/generated/**"]
8088
ReturnCount:
8189
active: false
82-
SpacingBetweenPackageAndImports:
90+
SpacingAfterPackageDeclaration:
8391
active: true
8492
ThrowsCount:
8593
max: 5
8694
WildcardImport:
87-
excludes: ''
8895
excludeImports:
8996
- org.ossreviewtoolkit.helper.commands.*
9097
- org.ossreviewtoolkit.utils.spdx.SpdxLicense.*

.env.versions

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@ ASKALONO_VERSION=0.5.0
33
BAZELISK_VERSION=1.20.0
44
BOWER_VERSION=1.8.14
55
COCOAPODS_VERSION=1.16.2
6+
COSIGN_VERSION=3.0.3
67
COMPOSER_VERSION=2.8.12
78
CONAN_VERSION=1.66.0
89
CONAN2_VERSION=2.21.0
910
DART_VERSION=2.18.4
1011
DOTNET_VERSION=6.0
12+
GLEAM_VERSION=1.13.0
1113
GO_VERSION=1.25.0
1214
HASKELL_STACK_VERSION=2.13.1
1315
JAVA_VERSION=21
1416
LICENSEE_VERSION=9.18.0
1517
NODEJS_VERSION=24.10.0
1618
NUGET_INSPECTOR_VERSION=0.9.12
1719
PHP_VERSION=8.3
18-
PIP_VERSION=25.2.0
20+
PIP_VERSION=25.3.0
1921
PYENV_GIT_TAG=v2.6.11
2022
PYTHON_INSPECTOR_VERSION=0.15.0
2123
PYTHON_PIPENV_VERSION=2023.12.1

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ jobs:
4141
- name: Checkout Repository
4242
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
4343
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
44+
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4
4545
with:
4646
languages: java
4747
- name: Setup Gradle
4848
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5
4949
- name: Build all classes
5050
run: ./gradlew -Dorg.gradle.jvmargs=-Xmx1g --no-build-cache classes
5151
- name: Perform CodeQL Analysis
52-
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
52+
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4
5353
test:
5454
strategy:
5555
matrix:
@@ -68,7 +68,7 @@ jobs:
6868
- name: Setup Gradle
6969
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5
7070
- name: Install Flox
71-
uses: flox/install-flox-action@ba0eb4eb776f1d3b47279d7980f6643caffd8c41 # v2
71+
uses: flox/install-flox-action@e3e10c1a9c83c2caa23418edfbb3cee2cbece59f # v2
7272
with:
7373
disable-metrics: true
7474
if: runner.os != 'Windows'
@@ -97,7 +97,7 @@ jobs:
9797
- name: Setup Gradle
9898
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5
9999
- name: Install Flox
100-
uses: flox/install-flox-action@ba0eb4eb776f1d3b47279d7980f6643caffd8c41 # v2
100+
uses: flox/install-flox-action@e3e10c1a9c83c2caa23418edfbb3cee2cbece59f # v2
101101
with:
102102
disable-metrics: true
103103
- name: Run functional tests that do not require external tools

.github/workflows/scorecard-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
results_format: sarif
3131
publish_results: true
3232
- name: Upload Code Scanning Results
33-
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
33+
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4
3434
with:
3535
sarif_file: ossf-results.sarif

.github/workflows/static-analysis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ jobs:
6868
- name: Setup Gradle
6969
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5
7070
- name: Check for Detekt Issues
71-
run: ./gradlew detektAll
71+
run: ./gradlew detekt
72+
- name: Check for Detekt Issues with type resolution
73+
run: ./gradlew detektMain detektTestFixtures detektTest detektFunTest
7274
- name: Upload SARIF File
73-
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
75+
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4
7476
if: always() # Upload even if the previous step failed.
7577
with:
7678
sarif_file: build/reports/detekt/merged.sarif
@@ -91,7 +93,7 @@ jobs:
9193
with:
9294
fetch-depth: 0
9395
- name: Setup Node
94-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
96+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
9597
- name: Check for Markdown issues
9698
run: |
9799
npm install -g markdownlint-rule-max-one-sentence-per-line@0.0.2
@@ -101,7 +103,7 @@ jobs:
101103
steps:
102104
- name: Checkout Repository
103105
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
104-
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
106+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
105107
with:
106108
node-version: 24
107109
cache: npm
@@ -129,7 +131,7 @@ jobs:
129131
post-pr-comment: false
130132
use-caches: false
131133
- name: Upload Code Scanning Results
132-
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
134+
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4
133135
with:
134136
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
135137
renovate-validation:

.github/workflows/website-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5
1717
- name: Generate plugin docs
1818
run: ./gradlew generatePluginDocs
19-
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
19+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
2020
with:
2121
node-version: 24
2222
cache: npm

.github/workflows/website-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5
1717
- name: Generate plugin docs
1818
run: ./gradlew generatePluginDocs
19-
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
19+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
2020
with:
2121
node-version: 24
2222
cache: npm

.linkspector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ excludedDirs:
66
- website
77
ignorePatterns:
88
# Ignore localhost links that usually point to a local development server.
9-
- pattern: '^http://localhost(:[0-9]+)?/.*$'
9+
- pattern: '^http://localhost(:[0-9]+)?(/.*)?$'
1010
# The link is valid but linkspector gets a 403 response when running on GitHub Actions.
1111
- pattern: '^https://www.epam.com/services/engineering/open-source$'

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,39 @@ RUN --mount=type=cache,target=/var/tmp/gradle \
469469
FROM scratch AS ortbin
470470
COPY --from=ortbuild /opt/ort /opt/ort
471471

472+
#------------------------------------------------------------------------
473+
# Gleam
474+
FROM base AS gleambuild
475+
476+
ARG COSIGN_VERSION
477+
ARG GLEAM_VERSION
478+
479+
ENV GLEAM_HOME=/opt/gleam
480+
481+
# Download cosign binary, verify Gleam binary signature, then clean up
482+
RUN COSIGN_ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
483+
&& curl -L "https://github.com/sigstore/cosign/releases/download/v${COSIGN_VERSION}/cosign-linux-${COSIGN_ARCH}" \
484+
-o /tmp/cosign \
485+
&& chmod +x /tmp/cosign \
486+
&& mkdir -p $GLEAM_HOME/bin \
487+
&& ARCH=$(arch) \
488+
&& curl -L "https://github.com/gleam-lang/gleam/releases/download/v${GLEAM_VERSION}/gleam-v${GLEAM_VERSION}-${ARCH}-unknown-linux-musl.tar.gz" \
489+
-o /tmp/gleam.tar.gz \
490+
&& curl -L "https://github.com/gleam-lang/gleam/releases/download/v${GLEAM_VERSION}/gleam-v${GLEAM_VERSION}-${ARCH}-unknown-linux-musl.tar.gz.sigstore" \
491+
-o /tmp/gleam.sigstore \
492+
&& /tmp/cosign verify-blob \
493+
--bundle /tmp/gleam.sigstore \
494+
--certificate-identity-regexp "^https://github.com/gleam-lang/gleam/.*@refs/tags/v${GLEAM_VERSION}$" \
495+
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
496+
/tmp/gleam.tar.gz \
497+
&& tar -xzf /tmp/gleam.tar.gz -C $GLEAM_HOME/bin \
498+
&& chmod a+x $GLEAM_HOME/bin/gleam \
499+
&& rm /tmp/gleam.tar.gz /tmp/gleam.sigstore /tmp/cosign \
500+
&& $GLEAM_HOME/bin/gleam --version
501+
502+
FROM scratch AS gleam
503+
COPY --from=gleambuild /opt/gleam /opt/gleam
504+
472505
#------------------------------------------------------------------------
473506
# Container with minimal selection of supported package managers.
474507
FROM base AS minimal-tools
@@ -595,6 +628,11 @@ RUN mkdir /opt/askalono && \
595628

596629
ENV PATH=$PATH:/opt/askalono
597630

631+
# Gleam
632+
ENV GLEAM_HOME=/opt/gleam
633+
ENV PATH=$PATH:$GLEAM_HOME/bin
634+
COPY --from=gleam --chown=$USER:$USER $GLEAM_HOME $GLEAM_HOME
635+
598636
#------------------------------------------------------------------------
599637
# Runtime container with minimal selection of supported package managers pre-installed.
600638
FROM minimal-tools AS minimal

analyzer/src/main/kotlin/Extensions.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import org.ossreviewtoolkit.utils.common.alsoIfNull
3838
private const val TYPE = "PackageManagerDependency"
3939

4040
private fun String.encodeColon() = replace(':', '\u0000')
41+
4142
private fun String.decodeColon() = replace('\u0000', ':')
4243

4344
/**

0 commit comments

Comments
 (0)