Skip to content

Commit c20f12f

Browse files
committed
Add qldoc.
1 parent 9ca8a27 commit c20f12f

File tree

9 files changed

+40
-0
lines changed

9 files changed

+40
-0
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,8 @@ private predicate exprToPartialDefinitionStep(Expr exprIn, Expr exprOut) {
282282

283283
private predicate iteratorDereference(Call c) { c.getTarget() instanceof IteratorReferenceFunction }
284284

285+
/**
286+
* Holds if the additional step from `src` to `sink` should be considered in
287+
* speculative taint flow exploration.
288+
*/
285289
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) { none() }

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ private module SpeculativeTaintFlow {
219219
private import semmle.code.cpp.ir.dataflow.internal.DataFlowDispatch as DataFlowDispatch
220220
private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate as DataFlowPrivate
221221

222+
/**
223+
* Holds if the additional step from `src` to `sink` should be considered in
224+
* speculative taint flow exploration.
225+
*/
222226
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) {
223227
exists(DataFlowCall call, ArgumentPosition argpos |
224228
// TODO: exclude neutrals and anything that has QL modeling.

csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ private module SpeculativeTaintFlow {
185185
exists(FlowSummaryImpl::Public::NeutralSinkCallable sc | sc.getACall() = call)
186186
}
187187

188+
/**
189+
* Holds if the additional step from `src` to `sink` should be considered in
190+
* speculative taint flow exploration.
191+
*/
188192
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) {
189193
exists(DataFlowCall call, Call srcCall, ArgumentPosition argpos |
190194
not exists(viableCallable(call)) and

go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ import SpeculativeTaintFlow
434434
private module SpeculativeTaintFlow {
435435
private import semmle.go.dataflow.internal.DataFlowDispatch as DataFlowDispatch
436436

437+
/**
438+
* Holds if the additional step from `src` to `sink` should be considered in
439+
* speculative taint flow exploration.
440+
*/
437441
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) {
438442
exists(DataFlowPrivate::DataFlowCall call, DataFlowDispatch::ArgumentPosition argpos |
439443
// TODO: exclude neutrals and anything that has QL modeling.

java/ql/lib/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,10 @@ private module SpeculativeTaintFlow {
690690
.hasName("java.util.function")
691691
}
692692

693+
/**
694+
* Holds if the additional step from `src` to `sink` should be considered in
695+
* speculative taint flow exploration.
696+
*/
693697
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) {
694698
exists(DataFlowCall call, Call srcCall, int argpos |
695699
not hasTarget(srcCall) and

python/ql/lib/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ private module SpeculativeTaintFlow {
226226
private import semmle.python.dataflow.new.internal.DataFlowDispatch as DataFlowDispatch
227227
private import semmle.python.dataflow.new.internal.DataFlowPublic as DataFlowPublic
228228

229+
/**
230+
* Holds if the additional step from `src` to `sink` should be considered in
231+
* speculative taint flow exploration.
232+
*/
229233
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) {
230234
exists(DataFlowDispatch::DataFlowCall call, DataFlowDispatch::ArgumentPosition argpos |
231235
// TODO: exclude neutrals and anything that has QL modeling.

ruby/ql/lib/codeql/ruby/dataflow/internal/TaintTrackingPrivate.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ private module SpeculativeTaintFlow {
155155
private import codeql.ruby.dataflow.internal.DataFlowDispatch as DataFlowDispatch
156156
private import codeql.ruby.dataflow.internal.DataFlowPublic as DataFlowPublic
157157

158+
/**
159+
* Holds if the additional step from `src` to `sink` should be considered in
160+
* speculative taint flow exploration.
161+
*/
158162
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) {
159163
exists(
160164
DataFlowDispatch::DataFlowCall call, MethodCall srcCall,

shared/dataflow/codeql/dataflow/TaintTracking.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ module TaintFlowMake<
208208
}
209209
}
210210

211+
/**
212+
* Constructs a global taint tracking computation that also allows a given
213+
* maximum number of speculative taint steps.
214+
*/
211215
module SpeculativeFlow<DataFlow::ConfigSig Config, speculationLimitSig/0 speculationLimit>
212216
implements DataFlow::GlobalFlowSig
213217
{
@@ -229,6 +233,10 @@ module TaintFlowMake<
229233
import DataFlowInternal::Impl<C>
230234
}
231235

236+
/**
237+
* Constructs a global taint tracking computation using flow state that also
238+
* allows a given maximum number of speculative taint steps.
239+
*/
232240
module SpeculativeFlowWithState<
233241
DataFlow::StateConfigSig Config, speculationLimitSig/0 speculationLimit> implements
234242
DataFlow::GlobalFlowSig

swift/ql/lib/codeql/swift/dataflow/internal/TaintTrackingPrivate.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ private module SpeculativeTaintFlow {
106106
private import codeql.swift.dataflow.internal.DataFlowPublic as DataFlowPublic
107107
private import codeql.swift.dataflow.internal.DataFlowPrivate as DataFlowPrivate
108108

109+
/**
110+
* Holds if the additional step from `src` to `sink` should be considered in
111+
* speculative taint flow exploration.
112+
*/
109113
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) {
110114
exists(DataFlowDispatch::DataFlowCall call, DataFlowDispatch::ArgumentPosition argpos |
111115
// TODO: exclude neutrals and anything that has QL modeling.

0 commit comments

Comments
 (0)