Package com.tnsai.security
Enum Class SecurityException.ViolationType
- All Implemented Interfaces:
Serializable,Comparable<SecurityException.ViolationType>,Constable
- Enclosing class:
SecurityException
Types of security violations.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHuman approval requiredUnsafe or policy-violating contentGeneral security violationPII detected in outputPrompt injection attack detectedRate limit exceededSandbox security policy violatedUnauthorized action attemptInput validation failure -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the enum constant of this class with the specified name.static SecurityException.ViolationType[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
PROMPT_INJECTION
Prompt injection attack detected -
CONTENT_VIOLATION
Unsafe or policy-violating content -
VALIDATION_FAILURE
Input validation failure -
RATE_LIMITED
Rate limit exceeded -
UNAUTHORIZED
Unauthorized action attempt -
SANDBOX_VIOLATION
Sandbox security policy violated -
APPROVAL_REQUIRED
Human approval required -
PII_DETECTED
PII detected in output -
GENERAL
General security violation
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isRetryable
public boolean isRetryable()
-