java.lang.Object
org.jenkinsci.plugins.scriptsecurity.sandbox.Whitelist
Direct Known Subclasses:
AbstractWhitelist, AclAwareWhitelist, BlanketWhitelist, ClassLoaderWhitelist, EnumeratingWhitelist, GroovyWhitelist, ProxyWhitelist

public abstract class Whitelist extends Object
Determines which methods and similar members which scripts may call.
  • Constructor Details

    • Whitelist

      public Whitelist()
  • Method Details

    • permitsMethod

      public abstract boolean permitsMethod(@NotNull @NotNull Method method, @NotNull @NotNull Object receiver, @NotNull @NotNull Object[] args)
      Checks whether a given virtual method may be invoked.

      Note that method should not be implementing or overriding a method in a supertype; in such a case the caller must pass that supertype method instead. In other words, call site selection is the responsibility of the caller (such as StandardGroovySandbox), not the whitelist.

      Parameters:
      method - a method defined in the JVM
      receiver - this, the receiver of the method call
      args - zero or more arguments
      Returns:
      true to allow the method to be called, false to reject it
    • permitsConstructor

      public abstract boolean permitsConstructor(@NotNull @NotNull Constructor<?> constructor, @NotNull @NotNull Object[] args)
    • permitsStaticMethod

      public abstract boolean permitsStaticMethod(@NotNull @NotNull Method method, @NotNull @NotNull Object[] args)
    • permitsFieldGet

      public abstract boolean permitsFieldGet(@NotNull @NotNull Field field, @NotNull @NotNull Object receiver)
    • permitsFieldSet

      public abstract boolean permitsFieldSet(@NotNull @NotNull Field field, @NotNull @NotNull Object receiver, @Nullable @Nullable Object value)
    • permitsStaticFieldGet

      public abstract boolean permitsStaticFieldGet(@NotNull @NotNull Field field)
    • permitsStaticFieldSet

      public abstract boolean permitsStaticFieldSet(@NotNull @NotNull Field field, @Nullable @Nullable Object value)
    • all

      @NotNull public static @NotNull Whitelist all()