From 6bd574652bf38d15eb5bb1ca6bdff2fd7c3201ba Mon Sep 17 00:00:00 2001 From: Vincent Latombe Date: Wed, 28 Aug 2024 10:47:28 +0200 Subject: [PATCH 1/2] Whitelist method moved from Run#getFullDisplayName to HistoricalBuild#getFullDisplayName --- .../plugins/scriptsecurity/sandbox/whitelists/jenkins-whitelist | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/jenkins-whitelist b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/jenkins-whitelist index 5e8ce3fb0..da67779d0 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/jenkins-whitelist +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/jenkins-whitelist @@ -36,4 +36,5 @@ method hudson.tools.ToolInstallation getHome method hudson.tools.ToolInstallation getName method jenkins.model.CauseOfInterruption getShortDescription method jenkins.model.CauseOfInterruption$UserInterruption getUserId +method jenkins.model.HistoricalBuild getFullDisplayName staticField jenkins.model.Jenkins VERSION From b12683ae347ea85c05226454d85456bf5405dc25 Mon Sep 17 00:00:00 2001 From: Vincent Latombe Date: Wed, 28 Aug 2024 13:03:15 +0200 Subject: [PATCH 2/2] Fix soft dep to new core --- .../sandbox/whitelists/StaticWhitelistTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java b/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java index ab035ac9e..d2398d11e 100644 --- a/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java +++ b/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists/StaticWhitelistTest.java @@ -155,7 +155,9 @@ static void sanity(URL definition) throws Exception { new MethodSignature(MatchResult.class, "group", String.class), new MethodSignature(MatchResult.class, "hasMatch"), new MethodSignature(MatchResult.class, "namedGroups"), - new MethodSignature(MatchResult.class, "start", String.class) + new MethodSignature(MatchResult.class, "start", String.class), + // TODO Do not exist until Jenkins includes https://github.com/jenkinsci/jenkins/pull/9674 + new MethodSignature("jenkins.model.HistoricalBuild", "getFullDisplayName") )); @Test public void sanity() throws Exception {