Class JvmTaintSource


  • public class JvmTaintSource
    extends TaintSource
    A JvmTaintSource specifies a method which can taint any (subset) of the following: the instance, the return value, the argument objects, or static fields. The callMatcher decides whether the call (already filtered by its Signature) should trigger this source.
    • Constructor Summary

      Constructors 
      Constructor Description
      JvmTaintSource​(Signature signature, boolean taintsThis, boolean taintsReturn, java.util.Set<java.lang.Integer> taintsArgs, java.util.Set<java.lang.String> taintsGlobals)
      Create a taint source.
      JvmTaintSource​(Signature signature, java.util.function.Predicate<Call> callMatcher, boolean taintsThis, boolean taintsReturn, java.util.Set<java.lang.Integer> taintsArgs, java.util.Set<java.lang.String> taintsGlobals)
      Create a taint source.
      JvmTaintSource​(Signature signature, java.util.Optional<java.util.function.Predicate<Call>> callMatcher, boolean taintsThis, boolean taintsReturn, java.util.Set<java.lang.Integer> taintsArgs, java.util.Set<java.lang.String> taintsGlobals)
      Create a taint source.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • callMatcher

        public final java.util.Optional<java.util.function.Predicate<Call>> callMatcher
    • Constructor Detail

      • JvmTaintSource

        public JvmTaintSource​(Signature signature,
                              java.util.function.Predicate<Call> callMatcher,
                              boolean taintsThis,
                              boolean taintsReturn,
                              java.util.Set<java.lang.Integer> taintsArgs,
                              java.util.Set<java.lang.String> taintsGlobals)
        Create a taint source.
        Parameters:
        signature - the signature a source method
        callMatcher - whether the call matches this taint source
        taintsThis - whether the source taints the calling instance
        taintsReturn - whether the source taints its return
        taintsArgs - a set of tainted arguments
        taintsGlobals - a set of tainted global variables
      • JvmTaintSource

        public JvmTaintSource​(Signature signature,
                              boolean taintsThis,
                              boolean taintsReturn,
                              java.util.Set<java.lang.Integer> taintsArgs,
                              java.util.Set<java.lang.String> taintsGlobals)
        Create a taint source.
        Parameters:
        signature - the signature a source method
        taintsThis - whether the source taints the calling instance
        taintsReturn - whether the source taints its return
        taintsArgs - a set of tainted arguments
        taintsGlobals - a set of tainted global variables
      • JvmTaintSource

        public JvmTaintSource​(Signature signature,
                              java.util.Optional<java.util.function.Predicate<Call>> callMatcher,
                              boolean taintsThis,
                              boolean taintsReturn,
                              java.util.Set<java.lang.Integer> taintsArgs,
                              java.util.Set<java.lang.String> taintsGlobals)
        Create a taint source.
        Parameters:
        signature - the signature a source method
        callMatcher - an optional predicate on whether the call matches this taint source
        taintsThis - whether the source taints the calling instance
        taintsReturn - whether the source taints its return
        taintsArgs - a set of tainted arguments
        taintsGlobals - a set of tainted global variables