Skip to content

Commit 0e6bb28

Browse files
author
Benjamin Muskalla
committed
Only consider store steps
1 parent fd9199c commit 0e6bb28

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

java/ql/src/utils/model-generator/CaptureSummaryModels.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ class ParameterToReturnValueTaintConfig extends TaintTracking::Configuration {
158158

159159
override predicate isSink(DataFlow::Node sink) { sink instanceof ReturnNode }
160160

161-
// track taint across objects so we consider factory methods returning newly tainted objects
161+
// consider store steps to track taint across objects to model factory methods returning tainted objects
162162
override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) {
163-
node2.asExpr().(ConstructorCall).getAnArgument() = node1.asExpr()
163+
store(node1, _, node2, _)
164164
}
165165

166166
override DataFlow::FlowFeature getAFeature() {

java/ql/test/utils/model-generator/CaptureSummaryModels.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@
4444
| p;Pojo;false;getValue;();;Argument[-1];ReturnValue;taint |
4545
| p;Pojo;false;setValue;(String);;Argument[0];Argument[-1];taint |
4646
| p;PrivateFlowViaPublicInterface;true;createAnSPI;(File);;Argument[0];ReturnValue;taint |
47-
| p;PrivateFlowViaPublicInterface;true;createAnSPIWithoutTrackingFile;(File);;Argument[0];ReturnValue;taint |

0 commit comments

Comments
 (0)