Package org.openrewrite.java.dataflow
Class LocalTaintFlowSpec<Source extends Expression,Sink extends J>
java.lang.Object
org.openrewrite.java.dataflow.LocalFlowSpec<Source,Sink>
org.openrewrite.java.dataflow.LocalTaintFlowSpec<Source,Sink>
@Incubating(since="7.25.0")
public abstract class LocalTaintFlowSpec<Source extends Expression,Sink extends J>
extends LocalFlowSpec<Source,Sink>
-
Field Summary
Fields inherited from class org.openrewrite.java.dataflow.LocalFlowSpec
sinkType, sourceType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanisAdditionalFlowStep(Expression srcExpression, org.openrewrite.Cursor srcCursor, Expression sinkExpression, org.openrewrite.Cursor sinkCursor) takes an existing flow-step in the graph and offers a potential next flow step.booleanisAdditionalTaintStep(Expression srcExpression, org.openrewrite.Cursor srcCursor, Expression sinkExpression, org.openrewrite.Cursor sinkCursor) final booleanisBarrier(Expression expression, org.openrewrite.Cursor cursor) Holds if flow through `expression` is prohibited.final booleanisBarrierGuard(Guard guard, boolean branch) booleanisSanitizer(Expression expression, org.openrewrite.Cursor cursor) booleanisSanitizerGuard(Guard guard, boolean branch) Methods inherited from class org.openrewrite.java.dataflow.LocalFlowSpec
getSinkType, getSourceType, isFlowStep, isSink, isSource
-
Constructor Details
-
LocalTaintFlowSpec
public LocalTaintFlowSpec()
-
-
Method Details
-
isAdditionalFlowStep
public final boolean isAdditionalFlowStep(Expression srcExpression, org.openrewrite.Cursor srcCursor, Expression sinkExpression, org.openrewrite.Cursor sinkCursor) Description copied from class:LocalFlowSpectakes an existing flow-step in the graph and offers a potential next flow step. The method can then decide if the offered potential next flow step should be considered a valid next flow step in the graph. Allows for ad-hoc taint tracking by allowing for additional, non-default flow steps to be added to the flow graph. The following is always true:srcExpression == srcCursor.getValue() && sinkExpression == sinkCursor.getValue().- Overrides:
isAdditionalFlowStepin classLocalFlowSpec<Source extends Expression,Sink extends J>
-
isAdditionalTaintStep
public boolean isAdditionalTaintStep(Expression srcExpression, org.openrewrite.Cursor srcCursor, Expression sinkExpression, org.openrewrite.Cursor sinkCursor) -
isBarrierGuard
- Overrides:
isBarrierGuardin classLocalFlowSpec<Source extends Expression,Sink extends J>
-
isSanitizerGuard
-
isBarrier
Description copied from class:LocalFlowSpecHolds if flow through `expression` is prohibited.- Overrides:
isBarrierin classLocalFlowSpec<Source extends Expression,Sink extends J>
-
isSanitizer
-