Navigation Menu

Skip to content

Commit

Permalink
[JENKINS-32731] [JENKINS-34650] Docker.groovy is already trusted.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Oct 17, 2016
1 parent 1f5f9d0 commit abe4066
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 29 deletions.
15 changes: 3 additions & 12 deletions pom.xml
Expand Up @@ -4,7 +4,8 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.11</version>
<version>2.17</version>
<relativePath/>
</parent>
<artifactId>docker-workflow</artifactId>
<version>1.10-SNAPSHOT</version>
Expand Down Expand Up @@ -48,20 +49,10 @@
<artifactId>docker-commons</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>2.7</version>
<version>2.11</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/org/jenkinsci/plugins/docker/workflow/DockerDSL.java
Expand Up @@ -25,9 +25,6 @@

import groovy.lang.Binding;
import hudson.Extension;
import java.io.IOException;
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.ProxyWhitelist;
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist;
import org.jenkinsci.plugins.workflow.cps.CpsScript;
import org.jenkinsci.plugins.workflow.cps.GlobalVariable;

Expand All @@ -50,13 +47,4 @@
return docker;
}

@Extension public static class MiscWhitelist extends ProxyWhitelist {
public MiscWhitelist() throws IOException {
super(new StaticWhitelist(
// TODO should docker-commons just get a script-security dependency and mark these things @Whitelisted?
"new org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint java.lang.String java.lang.String",
"method org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint imageName java.lang.String"));
}
}

}
Expand Up @@ -23,8 +23,6 @@
*/
package org.jenkinsci.plugins.docker.workflow;

import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted;

import javax.annotation.Nonnull;
import java.io.Serializable;

Expand All @@ -42,12 +40,9 @@ public class ImageNameTokens implements Serializable {

private static final long serialVersionUID = 1L;

@Whitelisted
public final String userAndRepo;
@Whitelisted
public final String tag;

@Whitelisted
public ImageNameTokens(@Nonnull String name) {
int tagIdx = name.lastIndexOf(':');
if (tagIdx != -1) {
Expand Down

0 comments on commit abe4066

Please sign in to comment.