Skip to content

Commit bc6d7bc

Browse files
committed
Add FOSSA license scanning
1 parent 867bb1f commit bc6d7bc

File tree

5 files changed

+74
-3
lines changed

5 files changed

+74
-3
lines changed

.fossa.yml

Lines changed: 40 additions & 0 deletions
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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: FOSSA
2+
3+
on:
4+
pull_request:
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}}

buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ testing {
232232
dependencies {
233233
implementation(project(project.path))
234234

235+
implementation(enforcedPlatform("org.junit:junit-bom:5.11.4"))
236+
235237
implementation(project(":testing-internal"))
236238

237239
compileOnly("com.google.auto.value:auto-value-annotations")

custom-checks/build.gradle.kts

Lines changed: 1 addition & 1 deletion
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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ 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 or armeria boms here
13+
// since they are LGPL and EPL licensed respectively
14+
1115
"com.fasterxml.jackson:jackson-bom:2.18.2",
1216
"com.google.guava:guava-bom:33.4.0-jre",
1317
"com.google.protobuf:protobuf-bom:4.29.3",
14-
"com.linecorp.armeria:armeria-bom:1.31.3",
1518
"com.squareup.okhttp3:okhttp-bom:4.12.0",
1619
"com.squareup.okio:okio-bom:3.10.2", // applies to transitive dependencies of okhttp
1720
"io.grpc:grpc-bom:1.70.0",
1821
"io.netty:netty-bom:4.1.117.Final",
1922
"io.zipkin.brave:brave-bom:6.0.3",
2023
"io.zipkin.reporter2:zipkin-reporter-bom:3.4.3",
2124
"org.assertj:assertj-bom:3.27.3",
22-
"org.junit:junit-bom:5.11.4",
2325
"org.testcontainers:testcontainers-bom:1.20.4",
2426
"org.snakeyaml:snakeyaml-engine:2.9"
2527
)
@@ -33,8 +35,16 @@ val slf4jVersion = "2.0.16"
3335
val opencensusVersion = "0.31.1"
3436
val prometheusClientVersion = "0.16.0"
3537
val prometheusServerVersion = "1.3.5"
38+
val armeriaVersion = "1.31.3"
39+
3640

3741
val DEPENDENCIES = listOf(
42+
"org.junit.jupiter:junit-jupiter-api:5.11.4",
43+
"com.linecorp.armeria:armeria:${armeriaVersion}",
44+
"com.linecorp.armeria:armeria-grpc:${armeriaVersion}",
45+
"com.linecorp.armeria:armeria-grpc-protocol:${armeriaVersion}",
46+
"com.linecorp.armeria:armeria-junit5:${armeriaVersion}",
47+
3848
"com.google.auto.value:auto-value:${autoValueVersion}",
3949
"com.google.auto.value:auto-value-annotations:${autoValueVersion}",
4050
"com.google.errorprone:error_prone_annotations:${errorProneVersion}",

0 commit comments

Comments
 (0)