Skip to content

Commit bd3b945

Browse files
committed
Work around CVE-2024-12798 and CVE-2024-12801 in Logback
1 parent 5a4e409 commit bd3b945

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ junit4 = "4.13.2"
1414
junit4Min = "4.12"
1515
ktlint = "1.5.0"
1616
log4j = "2.24.3"
17+
logback = "1.5.15"
1718
mockito = "5.14.2"
1819
opentest4j = "1.3.0"
1920
openTestReporting = "0.2.0-SNAPSHOT"
@@ -76,6 +77,7 @@ eclipse-platform = { module = "org.eclipse.platform:org.eclipse.platform", versi
7677
jacoco = { module = "org.jacoco:jacoco", version.ref = "jacoco" }
7778
junit4-latest = { module = "junit:junit", version.ref = "junit4" }
7879
junit4-bundle = { module = "org.apache.servicemix.bundles:org.apache.servicemix.bundles.junit", version = "4.13.2_1" }
80+
logback-core = { module = "ch.qos.logback:logback-core", version.ref = "logback" }
7981
ktlint-cli = { module = "com.pinterest.ktlint:ktlint-cli", version.ref = "ktlint" }
8082

8183
[bundles]

gradle/plugins/common/src/main/kotlin/junitbuild.checkstyle-nohttp.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ dependencies {
66
checkstyle(dependencyFromLibs("nohttp-checkstyle"))
77
}
88

9+
configurations.checkstyle {
10+
resolutionStrategy {
11+
eachDependency {
12+
// Workaround for CVE-2024-12798 and CVE-2024-12801
13+
if (requested.group == "ch.qos.logback") {
14+
useVersion(requiredVersionFromLibs("logback"))
15+
}
16+
}
17+
}
18+
}
19+
920
tasks.register<Checkstyle>("checkstyleNohttp") {
1021
group = "verification"
1122
description = "Checks for illegal uses of http://"

gradle/plugins/common/src/main/kotlin/junitbuild.spotless-conventions.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ spotless {
4646
trimTrailingWhitespace()
4747
endWithNewline()
4848
}
49+
configurations.named { it.startsWith("spotless") }.configureEach {
50+
// Workaround for CVE-2024-12798 and CVE-2024-12801
51+
resolutionStrategy {
52+
eachDependency {
53+
if (requested.group == "ch.qos.logback") {
54+
useVersion(requiredVersionFromLibs("logback"))
55+
}
56+
}
57+
}
58+
}
4959
}
5060
}
5161

0 commit comments

Comments
 (0)