Class JvmInvokeTaintSink
- java.lang.Object
-
- proguard.analysis.cpa.domain.taint.TaintSink
-
- proguard.analysis.cpa.jvm.domain.taint.JvmTaintSink
-
- proguard.analysis.cpa.jvm.domain.taint.JvmInvokeTaintSink
-
public class JvmInvokeTaintSink extends JvmTaintSink
AJvmTaintSink
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JvmInvokeTaintSink.Builder
Builder forJvmInvokeTaintSink
.
-
Field Summary
Fields Modifier and Type Field Description java.util.function.Predicate<Call>
callMatcher
java.util.Set<java.lang.Integer>
takesArgs
java.util.Set<java.lang.String>
takesGlobals
boolean
takesInstance
-
Fields inherited from class proguard.analysis.cpa.domain.taint.TaintSink
IS_VALID_FOR_SOURCE_DEFAULT, isValidForSource, signature
-
-
Constructor Summary
Constructors Modifier Constructor Description JvmInvokeTaintSink(Signature signature, boolean takesInstance, java.util.Set<java.lang.Integer> takesArgs, java.util.Set<java.lang.String> takesGlobals)
Deprecated.protected
JvmInvokeTaintSink(Signature signature, java.util.function.Predicate<TaintSource> isValidForSource, boolean takesInstance, java.util.Set<java.lang.Integer> takesArgs, java.util.Set<java.lang.String> takesGlobals, java.util.function.Predicate<Call> callMatcher)
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)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
Methods inherited from class proguard.analysis.cpa.jvm.domain.taint.JvmTaintSink
convertSinksToMemoryLocations
-
-
-
-
Field Detail
-
takesInstance
public final boolean takesInstance
-
takesArgs
public final java.util.Set<java.lang.Integer> takesArgs
-
takesGlobals
public final java.util.Set<java.lang.String> takesGlobals
-
callMatcher
public final java.util.function.Predicate<Call> callMatcher
-
-
Constructor Detail
-
JvmInvokeTaintSink
@Deprecated public JvmInvokeTaintSink(Signature signature, boolean takesInstance, java.util.Set<java.lang.Integer> takesArgs, java.util.Set<java.lang.String> takesGlobals)
Deprecated.Create a taint sink.- Parameters:
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 variables
-
JvmInvokeTaintSink
@Deprecated public 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)
Deprecated.Create a taint sink.- Parameters:
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 variables
-
JvmInvokeTaintSink
protected JvmInvokeTaintSink(Signature signature, java.util.function.Predicate<TaintSource> isValidForSource, boolean takesInstance, java.util.Set<java.lang.Integer> takesArgs, java.util.Set<java.lang.String> takesGlobals, java.util.function.Predicate<Call> callMatcher)
Create a taint sink.- Parameters:
signature
- the signature of a sink methodisValidForSource
- predicate on whether the sink is valid for a given sourcetakesInstance
- whether the sink is sensitive to the calling instancetakesArgs
- a set of sensitive argumentstakesGlobals
- a set of sensitive global variablescallMatcher
- predicate on whether a call matches this taint sink
-
-
Method Detail
-
getMemoryLocations
public java.util.Set<JvmMemoryLocation> getMemoryLocations()
Returns memory locations which trigger this taint sink.- Specified by:
getMemoryLocations
in classJvmTaintSink
-
matchCfaEdge
public boolean matchCfaEdge(JvmCfaEdge edge)
Returns true if the edge is a call to the sink method.- Specified by:
matchCfaEdge
in classJvmTaintSink
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classJvmTaintSink
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classJvmTaintSink
-
-