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
- All Implemented Interfaces:
ExtensionPoint
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.SignatureNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
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 booleanReturns true if the given constructor is permanently blacklisted inPERMANENTLY_BLACKLISTED_CONSTRUCTORSstatic booleanReturns true if the given method is permanently blacklisted inPERMANENTLY_BLACKLISTED_METHODSstatic booleanReturns 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(Field f) static RejectedAccessExceptionstatic RejectedAccessExceptionrejectMethod(Method m, String info) static RejectedAccessExceptionrejectNew(Constructor<?> c) static RejectedAccessExceptionstatic RejectedAccessExceptionprotected List<EnumeratingWhitelist.FieldSignature>protected List<EnumeratingWhitelist.MethodSignature>static WhitelistMethods 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
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
-
stockWhitelists
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @Extension public static Whitelist stockWhitelists() throws IOException- 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
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean isBlacklisted(String signature)
-