Package com.tonic.analysis.dataflow
Enum DataFlowNodeType
- java.lang.Object
-
- java.lang.Enum<DataFlowNodeType>
-
- com.tonic.analysis.dataflow.DataFlowNodeType
-
- All Implemented Interfaces:
Serializable,Comparable<DataFlowNodeType>
public enum DataFlowNodeType extends Enum<DataFlowNodeType>
Types of nodes in a data flow graph.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARRAY_LOADA value read out of an array element, a value source but not a taint entry point.ARRAY_STOREA write into an array element, a sink but not one taint is tracked through.BINARY_OPA value computed from two operands, which propagates taint from either of them.CASTA retyped value, which forwards its operand rather than producing anything new.CONSTANTA literal baked into the code, a value source that can never carry taint.FIELD_LOADA value read out of a field, treated as a taint entry point since it comes from outside.FIELD_STOREA write into a field, a taint sink because the value outlives this method.INVOKE_ARGAn argument handed to a call, a taint sink because the value leaves this method.INVOKE_RESULTA value produced by a call, treated as a taint entry point since the callee is opaque here.LOCALA local variable definition, which relays a value rather than originating one.NEW_OBJECTA freshly allocated object, a value source but never itself tainted.PARAMA value arriving from the caller, the primary taint entry point into a method.PHIA merge of the values reaching a join from each incoming edge.RETURNA value handed back to the caller, a taint sink since it escapes this method.UNARY_OPA value computed from one operand, such as a negation or a width conversion.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanBeTaintSink()Tests whether tainted data can escape through this type.booleancanBeTaintSource()Tests whether tainted data can enter through this type.StringgetDescription()StringgetDisplayName()booleanisSink()Tests whether this type consumes values.booleanisSource()Tests whether this type produces values.static DataFlowNodeTypevalueOf(String name)Returns the enum constant of this type with the specified name.static DataFlowNodeType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PARAM
public static final DataFlowNodeType PARAM
A value arriving from the caller, the primary taint entry point into a method.
-
LOCAL
public static final DataFlowNodeType LOCAL
A local variable definition, which relays a value rather than originating one.
-
CONSTANT
public static final DataFlowNodeType CONSTANT
A literal baked into the code, a value source that can never carry taint.
-
PHI
public static final DataFlowNodeType PHI
A merge of the values reaching a join from each incoming edge.
-
INVOKE_RESULT
public static final DataFlowNodeType INVOKE_RESULT
A value produced by a call, treated as a taint entry point since the callee is opaque here.
-
FIELD_LOAD
public static final DataFlowNodeType FIELD_LOAD
A value read out of a field, treated as a taint entry point since it comes from outside.
-
ARRAY_LOAD
public static final DataFlowNodeType ARRAY_LOAD
A value read out of an array element, a value source but not a taint entry point.
-
BINARY_OP
public static final DataFlowNodeType BINARY_OP
A value computed from two operands, which propagates taint from either of them.
-
UNARY_OP
public static final DataFlowNodeType UNARY_OP
A value computed from one operand, such as a negation or a width conversion.
-
CAST
public static final DataFlowNodeType CAST
A retyped value, which forwards its operand rather than producing anything new.
-
NEW_OBJECT
public static final DataFlowNodeType NEW_OBJECT
A freshly allocated object, a value source but never itself tainted.
-
RETURN
public static final DataFlowNodeType RETURN
A value handed back to the caller, a taint sink since it escapes this method.
-
FIELD_STORE
public static final DataFlowNodeType FIELD_STORE
A write into a field, a taint sink because the value outlives this method.
-
ARRAY_STORE
public static final DataFlowNodeType ARRAY_STORE
A write into an array element, a sink but not one taint is tracked through.
-
INVOKE_ARG
public static final DataFlowNodeType INVOKE_ARG
An argument handed to a call, a taint sink because the value leaves this method.
-
-
Method Detail
-
values
public static DataFlowNodeType[] 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 (DataFlowNodeType c : DataFlowNodeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataFlowNodeType 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
-
getDisplayName
public String getDisplayName()
- Returns:
- the display name
-
getDescription
public String getDescription()
- Returns:
- the description
-
canBeTaintSource
public boolean canBeTaintSource()
Tests whether tainted data can enter through this type.- Returns:
- true for parameters, field loads and call results
-
canBeTaintSink
public boolean canBeTaintSink()
Tests whether tainted data can escape through this type.- Returns:
- true for field stores, call arguments and returns
-
isSource
public boolean isSource()
Tests whether this type produces values.- Returns:
- true for parameters, constants, field and array loads, call results and allocations
-
isSink
public boolean isSink()
Tests whether this type consumes values.- Returns:
- true for field stores, array stores, call arguments and returns
-
-