Class StaticWhitelist
java.lang.Object
org.jenkinsci.plugins.scriptsecurity.sandbox.Whitelist
org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.EnumeratingWhitelist
org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist
Whitelist based on a static file.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.EnumeratingWhitelist
EnumeratingWhitelist.FieldSignature, EnumeratingWhitelist.MethodSignature, EnumeratingWhitelist.NewSignature, EnumeratingWhitelist.Signature
-
Constructor Summary
ConstructorDescriptionStaticWhitelist
(Reader definition) StaticWhitelist
(String... lines) StaticWhitelist
(Collection<? extends String> lines) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<EnumeratingWhitelist.FieldSignature>
static StaticWhitelist
static boolean
isBlacklisted
(String signature) static boolean
isPermanentlyBlacklisted
(String signature) Checks if the signature is permanently blacklisted, and so shouldn't show up in the pending approval list.static boolean
isPermanentlyBlacklistedConstructor
(@NotNull Constructor c) Returns true if the given constructor is permanently blacklisted inPERMANENTLY_BLACKLISTED_CONSTRUCTORS
static boolean
isPermanentlyBlacklistedMethod
(@NotNull Method m) Returns true if the given method is permanently blacklisted inPERMANENTLY_BLACKLISTED_METHODS
static boolean
isPermanentlyBlacklistedStaticMethod
(@NotNull Method m) Returns true if the given method is permanently blacklisted inPERMANENTLY_BLACKLISTED_STATIC_METHODS
protected List<EnumeratingWhitelist.MethodSignature>
protected List<EnumeratingWhitelist.NewSignature>
Parse a signature line into aEnumeratingWhitelist.Signature
.static RejectedAccessException
rejectField
(@NotNull Field f) static RejectedAccessException
rejectMethod
(@NotNull Method m) static RejectedAccessException
rejectMethod
(@NotNull Method m, String info) static RejectedAccessException
rejectNew
(@NotNull Constructor<?> c) static RejectedAccessException
rejectStaticField
(@NotNull Field f) static RejectedAccessException
rejectStaticMethod
(@NotNull Method m) protected List<EnumeratingWhitelist.FieldSignature>
protected List<EnumeratingWhitelist.MethodSignature>
Methods inherited from class org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.EnumeratingWhitelist
getName, getName, permitsConstructor, permitsFieldGet, permitsFieldSet, permitsMethod, permitsStaticFieldGet, permitsStaticFieldSet, permitsStaticMethod
-
Constructor Details
-
StaticWhitelist
- Throws:
IOException
-
StaticWhitelist
- Throws:
IOException
-
StaticWhitelist
- Throws:
IOException
-
-
Method Details
-
isPermanentlyBlacklistedMethod
Returns true if the given method is permanently blacklisted inPERMANENTLY_BLACKLISTED_METHODS
-
isPermanentlyBlacklistedStaticMethod
Returns true if the given method is permanently blacklisted inPERMANENTLY_BLACKLISTED_STATIC_METHODS
-
isPermanentlyBlacklistedConstructor
Returns true if the given constructor is permanently blacklisted inPERMANENTLY_BLACKLISTED_CONSTRUCTORS
-
parse
public static EnumeratingWhitelist.Signature parse(@NotNull @NotNull String line) throws IOException Parse a signature line into aEnumeratingWhitelist.Signature
.- Parameters:
line
- The signature string- Returns:
- the equivalent
EnumeratingWhitelist.Signature
- Throws:
IOException
- if the signature string could not be parsed.
-
isPermanentlyBlacklisted
Checks if the signature is permanently blacklisted, and so shouldn't show up in the pending approval list.- Parameters:
signature
- the signature to check- Returns:
- true if the signature is permanently blacklisted, false otherwise.
-
from
- Throws:
IOException
-
methodSignatures
- Specified by:
methodSignatures
in classEnumeratingWhitelist
-
newSignatures
- Specified by:
newSignatures
in classEnumeratingWhitelist
-
staticMethodSignatures
- Specified by:
staticMethodSignatures
in classEnumeratingWhitelist
-
fieldSignatures
- Specified by:
fieldSignatures
in classEnumeratingWhitelist
-
staticFieldSignatures
- Specified by:
staticFieldSignatures
in classEnumeratingWhitelist
-
rejectMethod
-
rejectMethod
-
rejectNew
-
rejectStaticMethod
-
rejectField
-
rejectStaticField
-
isBlacklisted
-