Skip to content

Commit 1e946f8

Browse files
committed
wip
1 parent eb48820 commit 1e946f8

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class IncludeFilteredSummarizedCallable extends IncludeSummarizedCallable {
2121
override predicate relevantSummary(
2222
SummaryComponentStack input, SummaryComponentStack output, boolean preservesValue, Provenance p
2323
) {
24-
this.propagatesFlow(input, output, preservesValue, p, _) and
24+
this.propagatesFlow(input, output, preservesValue, p, _, _) and
2525
not exists(IncludeSummarizedCallable rsc |
2626
isBaseCallableOrPrototype(rsc) and
27-
rsc.propagatesFlow(input, output, preservesValue, _, _) and
27+
rsc.propagatesFlow(input, output, preservesValue, _, _, _) and
2828
this.(UnboundCallable).overridesOrImplementsUnbound(rsc)
2929
)
3030
}

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)