Class AdditionalFlowCondition


public class AdditionalFlowCondition extends SourceSinkCondition
A condition that checks additional data flow to see whether a source or sink is valid or not
Author:
Steven Arzt
  • Constructor Details

    • AdditionalFlowCondition

      public AdditionalFlowCondition(Set<String> classNamesOnPath, Set<String> signaturesOnPath, Set<String> excludedClassNames)
      Create a new additional flow condition
      Parameters:
      classNamesOnPath - class names that have to be on the path
      signaturesOnPath - signatures that have to be on the path
      excludedClassNames - class names of primary sinks that should be filtered without context, e.g. ByteArrayOutputStream for OutputStream
  • Method Details

    • evaluate

      public boolean evaluate(DataFlowResult result, InfoflowResults results)
      Description copied from class: SourceSinkCondition
      Evaluates the condition on the given data flow result
      Specified by:
      evaluate in class SourceSinkCondition
      Parameters:
      result - The data flow result
      results - All results of this data flow analysis
      Returns:
      True if the given data flow result matches the condition, otherwise false
    • getReferencedMethods

      public Set<soot.SootMethod> getReferencedMethods()
      Description copied from class: SourceSinkCondition
      Gets all methods referenced by this condition
      Overrides:
      getReferencedMethods in class SourceSinkCondition
      Returns:
      The methods referenced by this condition
    • getReferencedClasses

      public Set<soot.SootClass> getReferencedClasses()
      Description copied from class: SourceSinkCondition
      Gets all classes referenced by this condition
      Overrides:
      getReferencedClasses in class SourceSinkCondition
      Returns:
      The classes referenced by this condition
    • getExcludedClasses

      public Set<soot.SootClass> getExcludedClasses()
      Description copied from class: SourceSinkCondition
      Gets all classes excluded by this condition
      Overrides:
      getExcludedClasses in class SourceSinkCondition
      Returns:
      The classes excluded by this condition
    • getSignaturesOnPath

      public Set<String> getSignaturesOnPath()
      Return the signatures that should be on the path
      Returns:
      unmodifiable set of signatures
    • getClassNamesOnPath

      public Set<String> getClassNamesOnPath()
      Return the class names that should be on the path
      Returns:
      unmodifiable set of class names
    • getExcludedClassNames

      public Set<String> getExcludedClassNames()
      Return the excluded class names
      Returns:
      unmodifiable set of excluded class names
    • isEmpty

      public boolean isEmpty()
      Gets whether this flow condition is empty, i.e., has nothing to check for
      Returns:
      True if this flow condition is empty, false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object