Skip to content

Commit 30a0791

Browse files
committed
JS: Adapt to changes in FlowSummaryImpl
1 parent c2951a3 commit 30a0791

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

javascript/ql/lib/semmle/javascript/dataflow/FlowSummary.qll

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ private import semmle.javascript.dataflow.internal.FlowSummaryPrivate
88
private import semmle.javascript.dataflow.internal.sharedlib.DataFlowImplCommon as DataFlowImplCommon
99
private import semmle.javascript.dataflow.internal.DataFlowPrivate
1010

11+
class Provenance = Impl::Public::Provenance;
12+
1113
/**
1214
* A model for a function that can propagate data flow.
1315
*
@@ -67,9 +69,13 @@ abstract class SummarizedCallable extends LibraryCallable, Impl::Public::Summari
6769
predicate propagatesFlow(string input, string output, boolean preservesValue) { none() }
6870

6971
override predicate propagatesFlow(
70-
string input, string output, boolean preservesValue, string model
72+
string input, string output, boolean preservesValue, Provenance provenance, boolean isExact,
73+
string model
7174
) {
72-
this.propagatesFlow(input, output, preservesValue) and model = this
75+
this.propagatesFlow(input, output, preservesValue) and
76+
provenance = "manual" and
77+
model = this and
78+
isExact = true
7379
}
7480

7581
/**

javascript/ql/lib/semmle/javascript/dataflow/internal/sharedlib/SummaryTypeTracker.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private module SummaryFlowConfig implements Input {
6969
predicate propagatesFlow(
7070
SummaryComponentStack input, SummaryComponentStack output, boolean preservesValue
7171
) {
72-
super.propagatesFlow(input, output, preservesValue, _)
72+
super.propagatesFlow(input, output, preservesValue, _, _, _)
7373
}
7474

7575
string toString() { result = super.toString() }

javascript/ql/lib/semmle/javascript/frameworks/data/ModelsAsData.qll

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,14 @@ private class SummarizedCallableFromModel extends DataFlow::SummarizedCallable {
6262
override DataFlow::InvokeNode getACall() { ModelOutput::resolvedSummaryBase(type, path, result) }
6363

6464
override predicate propagatesFlow(
65-
string input, string output, boolean preservesValue, string model
65+
string input, string output, boolean preservesValue, DataFlow::Provenance provenance,
66+
boolean isExact, string model
6667
) {
67-
exists(string kind | ModelOutput::relevantSummaryModel(type, path, input, output, kind, model) |
68+
exists(string kind |
69+
ModelOutput::relevantSummaryModel(type, path, input, output, kind, model) and
70+
provenance = "manual" and
71+
isExact = true
72+
|
6873
kind = "value" and
6974
preservesValue = true
7075
or

0 commit comments

Comments
 (0)