Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5bd9e90

Browse files
committedFeb 10, 2025·
Run FOSSA scan
1 parent c6d7aa5 commit 5bd9e90

File tree

6 files changed

+1179
-13
lines changed

6 files changed

+1179
-13
lines changed
 

‎.fossa.yml

+1,101
Large diffs are not rendered by default.

‎.github/repository-settings.md

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ settings](https://github.com/open-telemetry/community/blob/main/docs/how-to-conf
125125

126126
### Organization secrets
127127

128+
- `FOSSA_API_KEY`
128129
- `OPENTELEMETRYBOT_GITHUB_TOKEN`
129130
- `OTELBOT_CLIENT_ID`
130131
- `OTELBOT_PRIVATE_KEY`

‎.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}}

‎build.gradle.kts

+49
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,52 @@ if (gradle.startParameter.taskNames.contains("listTestsInPartition")) {
106106
}
107107
}
108108
}
109+
110+
if (gradle.startParameter.taskNames.contains("writeFossaConfig")) {
111+
tasks {
112+
val writeFossaConfig by registering {
113+
group = "Help"
114+
description = "Write .fossa.yml config file"
115+
116+
doLast {
117+
File(".fossa.yml").printWriter().use { writer ->
118+
writer.println("version: 3")
119+
writer.println()
120+
writer.println("targets:")
121+
writer.println(" only:")
122+
writer.println(" # only scanning the modules which are published")
123+
writer.println(" # (as opposed to internal testing modules")
124+
rootProject.subprojects
125+
.sortedBy { it.findProperty("archivesName") as String? }
126+
.filter { !it.name.startsWith("bom") }
127+
.filter { it.plugins.hasPlugin("maven-publish") }
128+
.forEach {
129+
writer.println(" - type: gradle")
130+
writer.println(" path: ./")
131+
writer.println(" target: '${it.path}'")
132+
}
133+
writer.println()
134+
writer.println("experimental:")
135+
writer.println(" gradle:")
136+
writer.println(" configurations-only:")
137+
writer.println(" # consumer will only be exposed to these dependencies")
138+
writer.println(" - runtimeClasspath")
139+
}
140+
}
141+
142+
// disable all tasks to stop build
143+
subprojects {
144+
tasks.configureEach {
145+
enabled = false
146+
}
147+
}
148+
}
149+
}
150+
151+
// disable all tasks to stop build
152+
project.tasks.configureEach {
153+
if (this.name != "writeFossaConfig") {
154+
enabled = false
155+
}
156+
}
157+
}

‎dependencyManagement/build.gradle.kts

+8-12
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ plugins {
44

55
data class DependencySet(val group: String, val version: String, val modules: List<String>)
66

7-
val dependencyVersions = hashMapOf<String, String>()
8-
rootProject.extra["versions"] = dependencyVersions
9-
107
// this line is managed by .github/scripts/update-sdk-version.sh
118
val otelSdkVersion = "1.46.0"
129
val otelContribVersion = "1.43.0-alpha"
@@ -27,15 +24,16 @@ val groovyVersion = "4.0.25"
2724
// configurations.testRuntimeClasspath.resolutionStrategy.force "com.google.guava:guava:19.0"
2825

2926
val DEPENDENCY_BOMS = listOf(
27+
// for some reason boms show up as runtime dependencies in license and vulnerability scans
28+
// even if they are only used by test dependencies, so not using junit bom since it is LGPL
29+
3030
"com.fasterxml.jackson:jackson-bom:2.18.2",
3131
"com.squareup.okio:okio-bom:3.10.2", // see https://github.com/open-telemetry/opentelemetry-java/issues/5637
3232
"com.google.guava:guava-bom:33.4.0-jre",
3333
"org.apache.groovy:groovy-bom:${groovyVersion}",
3434
"io.opentelemetry:opentelemetry-bom:${otelSdkVersion}",
3535
"io.opentelemetry:opentelemetry-bom-alpha:${otelSdkAlphaVersion}",
36-
"org.junit:junit-bom:5.11.4",
37-
"org.testcontainers:testcontainers-bom:1.20.4",
38-
"org.spockframework:spock-bom:2.4-M5-groovy-4.0"
36+
"org.testcontainers:testcontainers-bom:1.20.4"
3937
)
4038

4139
val autoServiceVersion = "1.1.1"
@@ -83,6 +81,10 @@ val CORE_DEPENDENCIES = listOf(
8381
// There are dependencies included here that appear to have no usages, but are maintained at
8482
// this top level to help consistently satisfy large numbers of transitive dependencies.
8583
val DEPENDENCIES = listOf(
84+
"org.junit.jupiter:junit-jupiter-api:5.11.4",
85+
"org.spockframework:spock-core:2.4-M5-groovy-4.0",
86+
"org.spockframework:spock-junit4:2.4-M5-groovy-4.0",
87+
8688
"io.r2dbc:r2dbc-proxy:1.1.5.RELEASE",
8789
"ch.qos.logback:logback-classic:1.3.15", // 1.4+ requires Java 11+
8890
"com.github.stefanbirkner:system-lambda:1.2.1",
@@ -127,19 +129,13 @@ javaPlatform {
127129
dependencies {
128130
for (bom in DEPENDENCY_BOMS) {
129131
api(enforcedPlatform(bom))
130-
val split = bom.split(':')
131-
dependencyVersions[split[0]] = split[2]
132132
}
133133
constraints {
134134
for (dependency in CORE_DEPENDENCIES) {
135135
api(dependency)
136-
val split = dependency.split(':')
137-
dependencyVersions[split[0]] = split[2]
138136
}
139137
for (dependency in DEPENDENCIES) {
140138
api(dependency)
141-
val split = dependency.split(':')
142-
dependencyVersions[split[0]] = split[2]
143139
}
144140
}
145141
}

‎instrumentation/spring/starters/zipkin-spring-boot-starter/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ group = "io.opentelemetry.instrumentation"
88
val springBootVersion = "2.6.15"
99

1010
dependencies {
11-
api("org.springframework.boot:spring-boot-starter:$springBootVersion")
11+
compileOnly("org.springframework.boot:spring-boot-starter:$springBootVersion")
1212
api(project(":instrumentation:spring:starters:spring-boot-starter"))
1313
api("io.opentelemetry:opentelemetry-exporter-zipkin")
1414
}

0 commit comments

Comments
 (0)
Please sign in to comment.