Skip to content

Commit 517893e

Browse files
authored
Add FOSSA license scanning (#7090)
1 parent c77e664 commit 517893e

File tree

4 files changed

+75
-3
lines changed

4 files changed

+75
-3
lines changed

.fossa.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 3
2+
3+
targets:
4+
only:
5+
- type: gradle
6+
exclude:
7+
# these modules are not published and so consumers will not be exposed to them
8+
- type: gradle
9+
path: ./
10+
target: ':api:testing-internal'
11+
- type: gradle
12+
path: ./
13+
target: ':exporters:otlp:testing-internal'
14+
- type: gradle
15+
path: ./
16+
target: ':integration-tests'
17+
- type: gradle
18+
path: ./
19+
target: ':integration-tests:graal'
20+
- type: gradle
21+
path: ./
22+
target: ':integration-tests:graal-incubating'
23+
- type: gradle
24+
path: ./
25+
target: ':integration-tests:otlp'
26+
- type: gradle
27+
path: ./
28+
target: ':integration-tests:tracecontext'
29+
- type: gradle
30+
path: ./
31+
target: ':perf-harness'
32+
- type: gradle
33+
path: ./
34+
target: ':testing-internal'
35+
36+
experimental:
37+
gradle:
38+
configurations-only:
39+
# consumer will only be exposed to these dependencies
40+
- runtimeClasspath

.github/workflows/fossa.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: FOSSA
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
fossa:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
18+
with:
19+
api-key: ${{secrets.FOSSA_API_KEY}}

custom-checks/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
dependencies {
6-
implementation("com.google.errorprone:error_prone_core")
6+
compileOnly("com.google.errorprone:error_prone_core")
77

88
testImplementation("com.google.errorprone:error_prone_test_helpers")
99
}

dependencyManagement/build.gradle.kts

+15-2
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ val dependencyVersions = hashMapOf<String, String>()
88
rootProject.extra["versions"] = dependencyVersions
99

1010
val DEPENDENCY_BOMS = listOf(
11+
// for some reason boms show up as runtime dependencies in license and vulnerability scans
12+
// even if they are only used by test dependencies, so not using junit bom here
13+
// (which is EPL licensed) or armeria bom (which is Apache licensed but is getting flagged
14+
// by FOSSA for containing EPL-licensed)
15+
1116
"com.fasterxml.jackson:jackson-bom:2.18.2",
1217
"com.google.guava:guava-bom:33.4.0-jre",
1318
"com.google.protobuf:protobuf-bom:4.29.3",
14-
"com.linecorp.armeria:armeria-bom:1.31.3",
1519
"com.squareup.okhttp3:okhttp-bom:4.12.0",
1620
"com.squareup.okio:okio-bom:3.10.2", // applies to transitive dependencies of okhttp
1721
"io.grpc:grpc-bom:1.70.0",
1822
"io.netty:netty-bom:4.1.117.Final",
1923
"io.zipkin.brave:brave-bom:6.0.3",
2024
"io.zipkin.reporter2:zipkin-reporter-bom:3.4.3",
2125
"org.assertj:assertj-bom:3.27.3",
22-
"org.junit:junit-bom:5.11.4",
2326
"org.testcontainers:testcontainers-bom:1.20.4",
2427
"org.snakeyaml:snakeyaml-engine:2.9"
2528
)
@@ -33,8 +36,18 @@ val slf4jVersion = "2.0.16"
3336
val opencensusVersion = "0.31.1"
3437
val prometheusClientVersion = "0.16.0"
3538
val prometheusServerVersion = "1.3.5"
39+
val armeriaVersion = "1.31.3"
40+
val junitVersion = "5.11.4"
3641

3742
val DEPENDENCIES = listOf(
43+
"org.junit.jupiter:junit-jupiter-api:${junitVersion}",
44+
"org.junit.jupiter:junit-jupiter-params:${junitVersion}",
45+
"org.junit.jupiter:junit-jupiter-pioneer:${junitVersion}",
46+
"com.linecorp.armeria:armeria:${armeriaVersion}",
47+
"com.linecorp.armeria:armeria-grpc:${armeriaVersion}",
48+
"com.linecorp.armeria:armeria-grpc-protocol:${armeriaVersion}",
49+
"com.linecorp.armeria:armeria-junit5:${armeriaVersion}",
50+
3851
"com.google.auto.value:auto-value:${autoValueVersion}",
3952
"com.google.auto.value:auto-value-annotations:${autoValueVersion}",
4053
"com.google.errorprone:error_prone_annotations:${errorProneVersion}",

0 commit comments

Comments
 (0)