From 17dba00264a3ff91bdfb9f7f73ad4b2aa8e560a0 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 26 Sep 2022 16:09:42 +0200 Subject: [PATCH 1/2] Dataflow: Minor visibility cleanup. --- .../code/java/dataflow/internal/DataFlowImpl.qll | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll index 468f8640a784..2638347463b9 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } From 1687d085871b8bc839d9b8a78f97cccbf97c7021 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 26 Sep 2022 16:10:03 +0200 Subject: [PATCH 2/2] Dataflow: Sync. --- .../code/cpp/ir/dataflow/internal/DataFlowImpl.qll | 10 +++------- .../code/cpp/ir/dataflow/internal/DataFlowImpl2.qll | 10 +++------- .../code/cpp/ir/dataflow/internal/DataFlowImpl3.qll | 10 +++------- .../code/cpp/ir/dataflow/internal/DataFlowImpl4.qll | 10 +++------- .../semmle/code/cpp/dataflow/internal/DataFlowImpl.qll | 10 +++------- .../code/cpp/dataflow/internal/DataFlowImpl2.qll | 10 +++------- .../code/cpp/dataflow/internal/DataFlowImpl3.qll | 10 +++------- .../code/cpp/dataflow/internal/DataFlowImpl4.qll | 10 +++------- .../code/cpp/dataflow/internal/DataFlowImplLocal.qll | 10 +++------- .../code/cpp/ir/dataflow/internal/DataFlowImpl.qll | 10 +++------- .../code/cpp/ir/dataflow/internal/DataFlowImpl2.qll | 10 +++------- .../code/cpp/ir/dataflow/internal/DataFlowImpl3.qll | 10 +++------- .../code/cpp/ir/dataflow/internal/DataFlowImpl4.qll | 10 +++------- .../code/csharp/dataflow/internal/DataFlowImpl.qll | 10 +++------- .../code/csharp/dataflow/internal/DataFlowImpl2.qll | 10 +++------- .../code/csharp/dataflow/internal/DataFlowImpl3.qll | 10 +++------- .../code/csharp/dataflow/internal/DataFlowImpl4.qll | 10 +++------- .../code/csharp/dataflow/internal/DataFlowImpl5.qll | 10 +++------- .../internal/DataFlowImplForContentDataFlow.qll | 10 +++------- .../code/java/dataflow/internal/DataFlowImpl2.qll | 10 +++------- .../code/java/dataflow/internal/DataFlowImpl3.qll | 10 +++------- .../code/java/dataflow/internal/DataFlowImpl4.qll | 10 +++------- .../code/java/dataflow/internal/DataFlowImpl5.qll | 10 +++------- .../code/java/dataflow/internal/DataFlowImpl6.qll | 10 +++------- .../internal/DataFlowImplForOnActivityResult.qll | 10 +++------- .../internal/DataFlowImplForSerializability.qll | 10 +++------- .../python/dataflow/new/internal/DataFlowImpl.qll | 10 +++------- .../python/dataflow/new/internal/DataFlowImpl2.qll | 10 +++------- .../python/dataflow/new/internal/DataFlowImpl3.qll | 10 +++------- .../python/dataflow/new/internal/DataFlowImpl4.qll | 10 +++------- .../lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll | 10 +++------- .../codeql/ruby/dataflow/internal/DataFlowImpl2.qll | 10 +++------- .../internal/DataFlowImplForHttpClientLibraries.qll | 10 +++------- .../dataflow/internal/DataFlowImplForLibraries.qll | 10 +++------- .../codeql/swift/dataflow/internal/DataFlowImpl.qll | 10 +++------- 35 files changed, 105 insertions(+), 245 deletions(-) diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 468f8640a784..2638347463b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll index 468f8640a784..2638347463b9 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 468f8640a784..2638347463b9 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 468f8640a784..2638347463b9 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 468f8640a784..2638347463b9 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 468f8640a784..2638347463b9 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplForContentDataFlow.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplForContentDataFlow.qll index 468f8640a784..2638347463b9 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplForContentDataFlow.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplForContentDataFlow.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 468f8640a784..2638347463b9 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 468f8640a784..2638347463b9 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 468f8640a784..2638347463b9 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 468f8640a784..2638347463b9 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 468f8640a784..2638347463b9 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForOnActivityResult.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForOnActivityResult.qll index 468f8640a784..2638347463b9 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForOnActivityResult.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForOnActivityResult.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForSerializability.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForSerializability.qll index 468f8640a784..2638347463b9 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForSerializability.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplForSerializability.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll index 468f8640a784..2638347463b9 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 468f8640a784..2638347463b9 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 468f8640a784..2638347463b9 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 468f8640a784..2638347463b9 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll index 468f8640a784..2638347463b9 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll index 468f8640a784..2638347463b9 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForHttpClientLibraries.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForHttpClientLibraries.qll index 468f8640a784..2638347463b9 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForHttpClientLibraries.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForHttpClientLibraries.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForLibraries.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForLibraries.qll index 468f8640a784..2638347463b9 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForLibraries.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForLibraries.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll index 468f8640a784..2638347463b9 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll @@ -598,13 +598,9 @@ private predicate hasSinkCallCtx(Configuration config) { } private module Stage1 implements StageSig { - class ApApprox = Unit; - class Ap = Unit; - class ApOption = Unit; - - class Cc = boolean; + private class Cc = boolean; /* Begin: Stage 1 logic. */ /** @@ -613,7 +609,7 @@ private module Stage1 implements StageSig { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { + private predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { sourceNode(node, _, config) and if hasSourceCallCtx(config) then cc = true else cc = false or @@ -753,7 +749,7 @@ private module Stage1 implements StageSig { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { + private predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) }