Class DefaultSourceSinkManager
java.lang.Object
soot.jimple.infoflow.sourcesSinks.manager.DefaultSourceSinkManager
- All Implemented Interfaces:
IReversibleSourceSinkManager,ISourceSinkManager
A
ISourceSinkManager working on lists of source and sink methods- Author:
- Steven Arzt, Tim Lange
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.google.common.cache.LoadingCache<soot.SootClass,Collection<soot.SootClass>> protected Collection<String>protected Collection<String> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSourceSinkManager(Collection<String> sources, Collection<String> sinks) Creates a new instance of theDefaultSourceSinkManagerclassDefaultSourceSinkManager(Collection<String> sources, Collection<String> sinks, Collection<String> parameterTaintMethods, Collection<String> returnTaintMethods) Creates a new instance of theDefaultSourceSinkManagerclassDefaultSourceSinkManager(ISourceSinkDefinitionProvider sourceSinkProvider) Creates a new instance of theDefaultSourceSinkManagerclass -
Method Summary
Modifier and TypeMethodDescriptiongetInverseSinkInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager) Determines if a method called by the Stmt is a sink method or not.getInverseSourceInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap) Determines whether this is a source resulting in a leak for backwards search.getSinkInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap) Checks if the given access path at this statement will leak.getSourceInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager) Determines if a method called by the Stmt is a source method or not.voidInitialization method that is called after the Soot instance has been created and before the actual data flow tracking is started.protected booleanisInverseSinkMethod(InfoflowManager manager, soot.jimple.Stmt sCallSite) protected SootMethodAndClassisInverseSourceMethod(InfoflowManager manager, soot.jimple.Stmt sCallSite) protected SootMethodAndClassisSinkMethod(InfoflowManager manager, soot.jimple.Stmt sCallSite) Checks whether the given call sites invokes a sink methodprotected booleanisSourceMethod(InfoflowManager manager, soot.jimple.Stmt sCallSite) Checks whether the given call sites invokes a source methodvoidsetParameterTaintMethods(List<String> parameterTaintMethods) Sets the list of methods whose parameters shall be regarded as taint sourcesvoidsetReturnTaintMethods(List<String> returnTaintMethods) Sets the list of methods whose return values shall be regarded as taint sinksvoidSets the list of methods to be treated as sinksvoidsetSources(List<String> sources) Sets the list of methods to be treated as sources
-
Field Details
-
sourceDefs
-
sinkDefs
-
interfacesOf
protected final com.google.common.cache.LoadingCache<soot.SootClass,Collection<soot.SootClass>> interfacesOf
-
-
Constructor Details
-
DefaultSourceSinkManager
Creates a new instance of theDefaultSourceSinkManagerclass- Parameters:
sources- The list of methods to be treated as sourcessinks- The list of methods to be treated as sins
-
DefaultSourceSinkManager
public DefaultSourceSinkManager(Collection<String> sources, Collection<String> sinks, Collection<String> parameterTaintMethods, Collection<String> returnTaintMethods) Creates a new instance of theDefaultSourceSinkManagerclass- Parameters:
sources- The list of methods to be treated as sourcessinks- The list of methods to be treated as sinksparameterTaintMethods- The list of methods whose parameters shall be regarded as sourcesreturnTaintMethods- The list of methods whose return values shall be regarded as sinks
-
DefaultSourceSinkManager
Creates a new instance of theDefaultSourceSinkManagerclass- Parameters:
sourceSinkProvider- The provider that defines source and sink methods
-
-
Method Details
-
setSources
Sets the list of methods to be treated as sources- Parameters:
sources- The list of methods to be treated as sources
-
setSinks
Sets the list of methods to be treated as sinks- Parameters:
sinks- The list of methods to be treated as sinks
-
isSourceMethod
Checks whether the given call sites invokes a source method- Parameters:
manager- The manager object providing access to the configuration and the interprocedural control flow graphsCallSite- The call site to check- Returns:
- True if the given call site invoked a source method, otherwise false
-
isInverseSourceMethod
protected SootMethodAndClass isInverseSourceMethod(InfoflowManager manager, soot.jimple.Stmt sCallSite) -
isSinkMethod
Checks whether the given call sites invokes a sink method- Parameters:
manager- The manager object providing access to the configuration and the interprocedural control flow graphsCallSite- The call site to check- Returns:
- The method that was discovered as a sink, or null if no sink could be found
-
isInverseSinkMethod
-
getSourceInfo
Description copied from interface:ISourceSinkManagerDetermines if a method called by the Stmt is a source method or not. If so, additional information is returned- Specified by:
getSourceInfoin interfaceISourceSinkManager- Parameters:
sCallSite- a Stmt which should include an invokeExrp calling a methodmanager- The manager object for interacting with the solver- Returns:
- A SourceInfo object containing additional information if this call is a source, otherwise null
-
getSinkInfo
Description copied from interface:ISourceSinkManagerChecks if the given access path at this statement will leak.- Specified by:
getSinkInfoin interfaceISourceSinkManager- Parameters:
sCallSite- The call site to checkmanager- The manager object for interacting with the solverap- The access path to check. Pass null to check whether the given statement can be a sink for any given access path.- Returns:
- A SinkInfo object containing additional information if this call is a sink, otherwise null
-
getInverseSourceInfo
public SinkInfo getInverseSourceInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap) Description copied from interface:IReversibleSourceSinkManagerDetermines whether this is a source resulting in a leak for backwards search. Creating a SinkInfo using source signatures.- Specified by:
getInverseSourceInfoin interfaceIReversibleSourceSinkManager- Parameters:
sCallSite- a Stmt which should include an invokeExrp calling a methodmanager- The manager object for interacting with the solverap- The access path to check. Pass null to check whether the given statement can be a sink for any given access path.- Returns:
- A SourceInfo object containing additional information if this call is a source, otherwise null
-
getInverseSinkInfo
Description copied from interface:IReversibleSourceSinkManagerDetermines if a method called by the Stmt is a sink method or not. If so, additional information is returned to introduce a taint. Creating a SourceInfo using sink signatures- Specified by:
getInverseSinkInfoin interfaceIReversibleSourceSinkManager- Parameters:
sCallSite- The call site to checkmanager- The manager object for interacting with the solver- Returns:
- A SinkInfo object containing additional information if this call is a sink, otherwise null
-
setParameterTaintMethods
Sets the list of methods whose parameters shall be regarded as taint sources- Parameters:
parameterTaintMethods- The list of methods whose parameters shall be regarded as taint sources
-
setReturnTaintMethods
Sets the list of methods whose return values shall be regarded as taint sinks- Parameters:
returnTaintMethods- The list of methods whose return values shall be regarded as taint sinks
-
initialize
public void initialize()Description copied from interface:ISourceSinkManagerInitialization method that is called after the Soot instance has been created and before the actual data flow tracking is started.- Specified by:
initializein interfaceISourceSinkManager
-