From 006f3a3776255ced149920690505651c025c24d3 Mon Sep 17 00:00:00 2001 From: tzachs Date: Wed, 29 Jul 2020 21:02:04 +0300 Subject: [PATCH] Updating plugin to resolve security CVE-2020-5529 --- pom.xml | 72 ++++++++----------- .../jenkins/plugins/BitbucketJobProbe.java | 2 +- .../BitbucketPayloadProcessorTest.java | 7 +- 3 files changed, 32 insertions(+), 49 deletions(-) diff --git a/pom.xml b/pom.xml index 5546fb6b..1e3605ed 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,8 @@ org.jenkins-ci.plugins plugin - 2.7 + 4.4 + bitbucket @@ -22,11 +23,24 @@ - 1.642.3 - 1.7 - 1.7 + 2.204.1 + 1.8 + 1.8 + 8 + + + + io.jenkins.tools.bom + bom-2.204.x + 11 + import + pom + + + + MIT @@ -74,82 +88,52 @@ + + org.jenkins-ci.plugins git - 2.3.5 + org.jenkins-ci.plugins mercurial - 1.54 + 2.10 org.mockito mockito-core - 2.0.22-beta + test org.jenkins-ci.plugins job-dsl - 1.66 + 1.77 true - - org.jenkins-ci.plugins - structs - 1.5 - org.jenkins-ci.plugins.workflow workflow-cps - 2.19 + 2.80 tests test org.jenkins-ci.plugins.workflow workflow-multibranch - 2.9 + 2.16 test - - org.jenkins-ci.plugins.workflow - workflow-durable-task-step - 2.4 - test - - - org.jenkins-ci.plugins - branch-api - 1.11 - + org.jenkins-ci.plugins scm-api - 1.3 + 2.6.3 - - junit - junit - 4.11 - test - - - net.sourceforge.htmlunit - htmlunit - 2.19 - - - org.hamcrest - hamcrest-core - 1.3 - test - diff --git a/src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java b/src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java index e82a46b7..ed8f05fd 100644 --- a/src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java +++ b/src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java @@ -44,7 +44,7 @@ public void triggerMatchingJobs(String user, String url, String scm, String payl if (job instanceof ParameterizedJobMixIn.ParameterizedJob) { ParameterizedJobMixIn.ParameterizedJob pJob = (ParameterizedJobMixIn.ParameterizedJob) job; - for (Trigger trigger : pJob.getTriggers().values()) { + for (Object trigger : pJob.getTriggers().values()) { if (trigger instanceof BitBucketTrigger) { bTrigger = (BitBucketTrigger) trigger; break; diff --git a/src/test/java/com/cloudbees/jenkins/plugins/BitbucketPayloadProcessorTest.java b/src/test/java/com/cloudbees/jenkins/plugins/BitbucketPayloadProcessorTest.java index 558cc86b..a76faedc 100644 --- a/src/test/java/com/cloudbees/jenkins/plugins/BitbucketPayloadProcessorTest.java +++ b/src/test/java/com/cloudbees/jenkins/plugins/BitbucketPayloadProcessorTest.java @@ -3,7 +3,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import java.io.File; + import java.io.IOException; import java.io.InputStream; @@ -12,10 +12,9 @@ import net.sf.json.JSONArray; import net.sf.json.JSONObject; -import org.apache.commons.io.FileUtils; + import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.sshd.common.util.IoUtils; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith;