Skip to content

Commit 5a2260b

Browse files
committed
JS: Update to match changes to API
1 parent 19f1462 commit 5a2260b

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

javascript/ql/lib/semmle/javascript/dataflow/internal/DataFlowPrivate.qll

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ private import semmle.javascript.internal.flow_summaries.AllFlowSummaries
1010
private import sharedlib.FlowSummaryImpl as FlowSummaryImpl
1111
private import semmle.javascript.dataflow.internal.BarrierGuards
1212

13+
class DataFlowSecondLevelScope = Unit;
14+
1315
private class Node = DataFlow::Node;
1416

1517
class PostUpdateNode = DataFlow::PostUpdateNode;
@@ -701,7 +703,7 @@ DataFlowCallable viableCallable(DataFlowCall node) {
701703
* Holds if the set of viable implementations that can be called by `call`
702704
* might be improved by knowing the call context.
703705
*/
704-
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c) { none() }
706+
predicate mayBenefitFromCallContext(DataFlowCall call) { none() }
705707

706708
/**
707709
* Gets a viable dispatch target of `call` in the context `ctx`. This is
@@ -780,6 +782,14 @@ private predicate valuePreservingStep(Node node1, Node node2) {
780782
)
781783
}
782784

785+
predicate knownSourceModel(Node sink, string model) { none() }
786+
787+
predicate knownSinkModel(Node sink, string model) { none() }
788+
789+
predicate simpleLocalFlowStep(Node node1, Node node2, string model) {
790+
simpleLocalFlowStep(node1, node2) and model = ""
791+
}
792+
783793
predicate simpleLocalFlowStep(Node node1, Node node2) {
784794
valuePreservingStep(node1, node2) and
785795
nodeGetEnclosingCallable(pragma[only_bind_out](node1)) =

javascript/ql/lib/semmle/javascript/dataflow/internal/TaintTrackingPrivate.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ predicate defaultAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2)
1919
ContentSet::arrayElement(), node2.(FlowSummaryNode).getSummaryNode())
2020
}
2121

22+
predicate defaultAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2, string model) {
23+
defaultAdditionalTaintStep(node1, node2) and model = "" // TODO: set model
24+
}
25+
2226
private class SanitizerGuardAdapter extends DataFlow::Node instanceof TaintTracking::AdditionalSanitizerGuardNode
2327
{
2428
// Note: avoid depending on DataFlow::FlowLabel here as it will cause these barriers to be re-evaluated

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module JSDataFlow implements SharedDataFlow::InputSig<Location> {
1515
predicate accessPathLimit = Private::accessPathLimit/0;
1616

1717
predicate viableImplInCallContext = Private::viableImplInCallContext/2;
18+
19+
predicate mayBenefitFromCallContext = Private::mayBenefitFromCallContext/1;
1820
}
1921

2022
module JSTaintFlow implements SharedTaintTracking::InputSig<Location, JSDataFlow> {

0 commit comments

Comments
 (0)