Package com.tonic.analysis.cpg.taint
Enum TaintType
- java.lang.Object
-
- java.lang.Enum<TaintType>
-
- com.tonic.analysis.cpg.taint.TaintType
-
- All Implemented Interfaces:
Serializable,Comparable<TaintType>
public enum TaintType extends Enum<TaintType>
Origin categories for tainted data.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUSTOMData from a source the caller registered themselves rather than one of the built-in source definitions.DATABASEData read back out of a datastore, which may itself have been stored tainted.DESERIALIZATIONData reconstructed from a serialized byte stream, so its type and contents are attacker-controlled.ENVIRONMENTData taken from environment variables or system properties.FILE_INPUTData read off the local filesystem through a stream or reader.NETWORKData read from a socket or URL connection.REFLECTIONData obtained through reflective lookup, where the target member is chosen at run time.USER_INPUTData supplied by a person at the boundary - request parameters, headers, cookies, console reads.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TaintTypevalueOf(String name)Returns the enum constant of this type with the specified name.static TaintType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
USER_INPUT
public static final TaintType USER_INPUT
Data supplied by a person at the boundary - request parameters, headers, cookies, console reads.
-
FILE_INPUT
public static final TaintType FILE_INPUT
Data read off the local filesystem through a stream or reader.
-
NETWORK
public static final TaintType NETWORK
Data read from a socket or URL connection.
-
DATABASE
public static final TaintType DATABASE
Data read back out of a datastore, which may itself have been stored tainted.
-
ENVIRONMENT
public static final TaintType ENVIRONMENT
Data taken from environment variables or system properties.
-
DESERIALIZATION
public static final TaintType DESERIALIZATION
Data reconstructed from a serialized byte stream, so its type and contents are attacker-controlled.
-
REFLECTION
public static final TaintType REFLECTION
Data obtained through reflective lookup, where the target member is chosen at run time.
-
CUSTOM
public static final TaintType CUSTOM
Data from a source the caller registered themselves rather than one of the built-in source definitions.
-
-
Method Detail
-
values
public static TaintType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TaintType c : TaintType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TaintType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
-