Package soot.jimple.infoflow.river
Class ConditionalFlowSourceSinkManagerWrapper
java.lang.Object
soot.jimple.infoflow.river.ConditionalFlowSourceSinkManagerWrapper
- All Implemented Interfaces:
IConditionalFlowManager,IReversibleSourceSinkManager,ISourceSinkManager
public class ConditionalFlowSourceSinkManagerWrapper
extends Object
implements IReversibleSourceSinkManager, IConditionalFlowManager
Wraps a SourceSinkManager and only redirects calls to methods of IConditionalFlowManager
to the wrapped SourceSinkManager.
Provide this to the Additional Flow such that it knows the conditions but doesn't accept sources.
- Author:
- Tim Lange
-
Constructor Summary
Constructors -
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.booleanisConditionalSink(soot.jimple.Stmt stmt, soot.SootClass baseClass) Checks whether stmt is a conditional sink and needs a secondary flow.booleanisSecondarySink(soot.jimple.Stmt stmt) Checks if a sink is reached in the secondary flowvoidregisterSecondarySink(soot.jimple.Stmt stmt) Register a secondary sink at runtime.voidregisterSecondarySink(soot.SootMethod sm) Register a secondary sink at runtime.
-
Constructor Details
-
ConditionalFlowSourceSinkManagerWrapper
-
-
Method Details
-
isSecondarySink
public boolean isSecondarySink(soot.jimple.Stmt stmt) Description copied from interface:IConditionalFlowManagerChecks if a sink is reached in the secondary flow- Specified by:
isSecondarySinkin interfaceIConditionalFlowManager- Parameters:
stmt- Sink Statement- Returns:
- true if stmt is a secondary sink
-
registerSecondarySink
public void registerSecondarySink(soot.jimple.Stmt stmt) Description copied from interface:IConditionalFlowManagerRegister a secondary sink at runtime.- Specified by:
registerSecondarySinkin interfaceIConditionalFlowManager- Parameters:
stmt- Secondary sink statement
-
registerSecondarySink
public void registerSecondarySink(soot.SootMethod sm) Description copied from interface:IConditionalFlowManagerRegister a secondary sink at runtime.- Specified by:
registerSecondarySinkin interfaceIConditionalFlowManager- Parameters:
sm- Secondary sink method
-
isConditionalSink
public boolean isConditionalSink(soot.jimple.Stmt stmt, soot.SootClass baseClass) Description copied from interface:IConditionalFlowManagerChecks whether stmt is a conditional sink and needs a secondary flow. Ensures that the statement contains a InstanceInvokeExpr.- Specified by:
isConditionalSinkin interfaceIConditionalFlowManager- Parameters:
stmt- Sink StatementbaseClass- Class of the tainted base- Returns:
- true if stmt is a conditional sink
-
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
-
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
-