Skip to content

Commit 363c12e

Browse files
authored
Merge pull request #39 from rundeck-plugins/cve-fixes
CVE Fixes
2 parents 16c3f86 + 9ce6467 commit 363c12e

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Run the following command to built the jar file:
1717
./gradlew clean build
1818
```
1919

20+
**Note:** This plugin requires Rundeck 5.16.0 or later.
21+
2022
## Install
2123

2224
Copy the `git-plugin-x.y.x.jar` file to the `$RDECK_BASE/libext/` directory inside your Rundeck installation.

build.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ dependencies {
5555
implementation(libs.groovyAll)
5656
implementation(libs.rundeckCore)
5757
implementation(libs.slf4jApi)
58+
59+
// Add secure commons-lang3 to provide alternative to vulnerable commons-lang 2.6
60+
implementation(libs.commonsLang3)
5861

5962
pluginLibs(libs.jgit) {
6063
exclude module: 'slf4j-api'
@@ -70,6 +73,21 @@ dependencies {
7073
testImplementation libs.bundles.testLibs
7174
}
7275

76+
configurations.all {
77+
resolutionStrategy {
78+
// Force secure versions for non-breaking dependency overrides
79+
force "com.squareup.okhttp3:okhttp:${libs.versions.okhttp3.get()}"
80+
force "com.squareup.okio:okio:${libs.versions.okio.get()}"
81+
82+
// Replace vulnerable commons-lang with secure commons-lang3
83+
dependencySubstitution {
84+
substitute module('commons-lang:commons-lang') using module("org.apache.commons:commons-lang3:${libs.versions.commonsLang3.get()}")
85+
}
86+
87+
// Note: JGit vulnerabilities left as-is to avoid code breaking changes
88+
}
89+
}
90+
7391

7492
task copyToLib(type: Copy) {
7593
into "$buildDir/output/lib"

gradle/libs.versions.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
[versions]
22
# Plugins
33
axionRelease = "1.18.18"
4+
nexusPublish = "1.3.0"
45
# Libraries
56
groovy = "3.0.22"
67
junit = "4.13.2"
7-
rundeckCore = "5.10.0-20250312"
8+
rundeckCore = "5.16.0-20251006"
89
slf4j = "1.7.36"
910
jgit = "6.6.1.202309021850-r"
1011
jgitSsh = "5.13.3.202401111512-r"
1112
spock = "2.0-groovy-3.0"
1213
cglib = "3.3.0"
1314
objenesis = "1.4"
14-
nexusPublish = "1.3.0"
15+
# Security overrides for transitive dependencies
16+
okhttp3 = "4.12.0"
17+
okio = "3.9.1"
18+
commonsLang3 = "3.18.0"
1519

1620
[libraries]
1721
groovyAll = { group = "org.codehaus.groovy", name = "groovy-all", version.ref = "groovy" }
@@ -23,6 +27,7 @@ jgitSsh = { group = "org.eclipse.jgit", name = "org.eclipse.jgit.ssh.jsch",
2327
spockCore = { group = "org.spockframework", name = "spock-core", version.ref = "spock" }
2428
cglibNodep = { group = "cglib", name = "cglib-nodep", version.ref = "cglib" }
2529
objenesis = { group = "org.objenesis", name = "objenesis", version.ref = "objenesis" }
30+
commonsLang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commonsLang3" }
2631

2732
[bundles]
2833
testLibs = ["junit", "groovyAll", "spockCore", "cglibNodep", "objenesis"]

0 commit comments

Comments
 (0)