Skip to content

Commit

Permalink
Force transitive dependencies
Browse files Browse the repository at this point in the history
Also:
 * Remove Flogger from forcing dependencies.
  • Loading branch information
alexander-yevsyukov committed Nov 5, 2023
1 parent e2d27c3 commit 54ab5bd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,29 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")

@Suppress(
"VulnerableLibrariesLocal", "RedundantSuppression" /*
`artifactregistry-auth-common` has transitive dependency on Gson and Apache `commons-codec`.
Gson from version `2.8.6` until `2.8.9` is vulnerable to Deserialization of Untrusted Data
(https://devhub.checkmarx.com/cve-details/CVE-2022-25647/).
Apache `commons-codec` before 1.13 is vulnerable to information exposure
(https://devhub.checkmarx.com/cve-details/Cxeb68d52e-5509/).
We use Gson `2.10.1`and we force it in `forceProductionDependencies()`.
We use `commons-code` with version `1.16.0`, forcing it in `forceProductionDependencies()`.
So, we should be safe with the current version `artifactregistry-auth-common` until
we migrate to a later version. */
)
implementation(
"com.google.cloud.artifactregistry:artifactregistry-auth-common:$googleAuthToolVersion"
) {
exclude(group = "com.google.guava")
}

implementation("com.google.guava:guava:$guavaVersion")
api("com.github.jk1:gradle-license-report:$licenseReportVersion")
implementation("org.ajoberstar.grgit:grgit-core:${grGitVersion}")
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/DependencyResolution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import io.spine.internal.dependency.AutoService
import io.spine.internal.dependency.AutoValue
import io.spine.internal.dependency.CheckerFramework
import io.spine.internal.dependency.CommonsCli
import io.spine.internal.dependency.CommonsCodec
import io.spine.internal.dependency.CommonsLogging
import io.spine.internal.dependency.Dokka
import io.spine.internal.dependency.ErrorProne
import io.spine.internal.dependency.FindBugs
import io.spine.internal.dependency.Flogger
import io.spine.internal.dependency.Gson
import io.spine.internal.dependency.Guava
import io.spine.internal.dependency.Hamcrest
Expand Down Expand Up @@ -90,8 +90,7 @@ private fun ResolutionStrategy.forceProductionDependencies() {
ErrorProne.annotations,
ErrorProne.core,
FindBugs.annotations,
Flogger.Runtime.systemBackend,
Flogger.lib,
Gson.lib,
Guava.lib,
Kotlin.reflect,
Kotlin.stdLib,
Expand Down Expand Up @@ -124,6 +123,7 @@ private fun ResolutionStrategy.forceTransitiveDependencies() {
Asm.lib,
AutoValue.annotations,
CommonsCli.lib,
CommonsCodec.lib,
CommonsLogging.lib,
Gson.lib,
Hamcrest.core,
Expand Down

0 comments on commit 54ab5bd

Please sign in to comment.