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.Signature
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
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
Returns true if the given constructor is permanently blacklisted inPERMANENTLY_BLACKLISTED_CONSTRUCTORS
static boolean
Returns true if the given method is permanently blacklisted inPERMANENTLY_BLACKLISTED_METHODS
static boolean
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
(Field f) static RejectedAccessException
static RejectedAccessException
rejectMethod
(Method m, String info) static RejectedAccessException
rejectNew
(Constructor<?> c) static RejectedAccessException
static RejectedAccessException
protected List<EnumeratingWhitelist.FieldSignature>
protected List<EnumeratingWhitelist.MethodSignature>
static Whitelist
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
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:
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
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean isBlacklisted(String signature)
-