public class JvmInvokeTaintSink extends JvmTaintSink
JvmTaintSink
on a method invocation.
This sinks can be sensitive to the instance, the arguments, or the static fields. If a sink S is sensitive to X, then
if X is tainted, we conclude that the taint has reached S.Modifier and Type | Field and Description |
---|---|
java.util.Optional<java.util.function.Predicate<Call>> |
callMatcher |
java.util.Set<java.lang.Integer> |
takesArgs |
java.util.Set<java.lang.String> |
takesGlobals |
boolean |
takesInstance |
Constructor and Description |
---|
JvmInvokeTaintSink(Signature signature,
boolean takesInstance,
java.util.Set<java.lang.Integer> takesArgs,
java.util.Set<java.lang.String> takesGlobals)
Create a taint sink.
|
JvmInvokeTaintSink(Signature signature,
java.util.function.Predicate<Call> callMatcher,
boolean takesInstance,
java.util.Set<java.lang.Integer> takesArgs,
java.util.Set<java.lang.String> takesGlobals)
Create a taint sink.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.util.Set<JvmMemoryLocation> |
getMemoryLocations()
Returns memory locations which trigger this taint sink.
|
int |
hashCode() |
boolean |
matchCfaEdge(JvmCfaEdge edge)
Returns true if the edge is a call to the sink method.
|
java.lang.String |
toString() |
convertSinksToMemoryLocations
public final java.util.Optional<java.util.function.Predicate<Call>> callMatcher
public final boolean takesInstance
public final java.util.Set<java.lang.Integer> takesArgs
public final java.util.Set<java.lang.String> takesGlobals
public JvmInvokeTaintSink(Signature signature, boolean takesInstance, java.util.Set<java.lang.Integer> takesArgs, java.util.Set<java.lang.String> takesGlobals)
signature
- the signature of a sink methodtakesInstance
- whether the sink is sensitive to the calling instancetakesArgs
- a set of sensitive argumentstakesGlobals
- a set of sensitive global variablespublic JvmInvokeTaintSink(Signature signature, java.util.function.Predicate<Call> callMatcher, boolean takesInstance, java.util.Set<java.lang.Integer> takesArgs, java.util.Set<java.lang.String> takesGlobals)
signature
- the signature of a sink methodcallMatcher
- whether the call matches this taint sinktakesInstance
- whether the sink is sensitive to the calling instancetakesArgs
- a set of sensitive argumentstakesGlobals
- a set of sensitive global variablespublic java.util.Set<JvmMemoryLocation> getMemoryLocations()
getMemoryLocations
in class JvmTaintSink
public boolean matchCfaEdge(JvmCfaEdge edge)
matchCfaEdge
in class JvmTaintSink