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
ConstructorsConstructorDescriptionStaticWhitelist(Reader definition) StaticWhitelist(String... lines) StaticWhitelist(Collection<? extends String> lines) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<EnumeratingWhitelist.FieldSignature>static StaticWhiteliststatic booleanisBlacklisted(String signature) static booleanisPermanentlyBlacklisted(String signature) Checks if the signature is permanently blacklisted, and so shouldn't show up in the pending approval list.static booleanisPermanentlyBlacklistedConstructor(@NotNull Constructor c) Returns true if the given constructor is permanently blacklisted inPERMANENTLY_BLACKLISTED_CONSTRUCTORSstatic booleanisPermanentlyBlacklistedMethod(@NotNull Method m) Returns true if the given method is permanently blacklisted inPERMANENTLY_BLACKLISTED_METHODSstatic booleanisPermanentlyBlacklistedStaticMethod(@NotNull Method m) Returns true if the given method is permanently blacklisted inPERMANENTLY_BLACKLISTED_STATIC_METHODSprotected List<EnumeratingWhitelist.MethodSignature>protected List<EnumeratingWhitelist.NewSignature>Parse a signature line into aEnumeratingWhitelist.Signature.static RejectedAccessExceptionrejectField(@NotNull Field f) static RejectedAccessExceptionrejectMethod(@NotNull Method m) static RejectedAccessExceptionrejectMethod(@NotNull Method m, String info) static RejectedAccessExceptionrejectNew(@NotNull Constructor<?> c) static RejectedAccessExceptionrejectStaticField(@NotNull Field f) static RejectedAccessExceptionrejectStaticMethod(@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:
methodSignaturesin classEnumeratingWhitelist
-
newSignatures
- Specified by:
newSignaturesin classEnumeratingWhitelist
-
staticMethodSignatures
- Specified by:
staticMethodSignaturesin classEnumeratingWhitelist
-
fieldSignatures
- Specified by:
fieldSignaturesin classEnumeratingWhitelist
-
staticFieldSignatures
- Specified by:
staticFieldSignaturesin classEnumeratingWhitelist
-
rejectMethod
-
rejectMethod
-
rejectNew
-
rejectStaticMethod
-
rejectField
-
rejectStaticField
-
isBlacklisted
-