-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix snakeyaml vulnerability issue by disabling detekt #517
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ buildscript { | |
classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}" | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" | ||
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}" | ||
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.12.0" | ||
// classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.12.0" | ||
classpath "org.jacoco:org.jacoco.agent:0.8.5" | ||
} | ||
} | ||
|
@@ -57,7 +57,7 @@ apply plugin: 'idea' | |
apply plugin: 'opensearch.opensearchplugin' | ||
apply plugin: 'opensearch.pluginzip' | ||
apply plugin: 'opensearch.testclusters' | ||
apply plugin: 'io.gitlab.arturbosch.detekt' | ||
// apply plugin: 'io.gitlab.arturbosch.detekt' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you remove the comments? it's hard to tell from code why they are commented. you can create an issue to track snakeyaml and revert #517 when it's fixed, or add this PR url in the TODO comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed all comments and will track enabling detekt with #520 |
||
apply plugin: 'org.jetbrains.kotlin.jvm' | ||
apply plugin: 'org.jetbrains.kotlin.plugin.allopen' | ||
|
||
|
@@ -107,10 +107,11 @@ configurations { | |
testRuntime | ||
} | ||
|
||
detekt { | ||
// TODO: enable detekt when snakeyaml vulnerability is fixed | ||
/*detekt { | ||
config = files("detekt.yml") | ||
buildUponDefaultConfig = true | ||
} | ||
}*/ | ||
|
||
configurations.testCompile { | ||
exclude module: "securemock" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears the CVE is fixed in Detekt 1.22.x
https://detekt.dev/changelog#dependency-updates
Update dependency org.yaml:snakeyaml to v1.33 - [#5354](https://github.com/detekt/detekt/pull/5354)
The CVE's listed in description indicate the SnakeYaml DOS vuln is up-to(excluding) 1.32.
The Gradle plugin appears to be lockstep w/ Detekt versions
https://detekt.dev/docs/gettingstarted/gradle/#kotlin-dsl-1
classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0-RC2")
Could you try updating the plugin version and see if it pulls the proper version of SnakeYaml ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking @pjfitzgibbons , I am running into build failures so will disable Detekt for the time being and upgrade the Detekt version with #520