Skip to content

Commit b74d640

Browse files
committed
Python: Add warnings regarding missing results
1 parent 02bb033 commit b74d640

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
lgtm,codescanning
22
* The class `ParameterNode` now extends `LocalSourceNode`, thus making methods like `flowsTo` available.
3-
* Local taint tracking can now be performed using the `taintFlowsTo` method on the `LocalSourceNode` class. Conversely, the new member predicate `getALocalTaintSource` can be called on a `DataFlow::Node` to obtain a `LocalSourceNode` from which taint can be tracked locally to that data-flow node.
3+
* Local taint tracking can now be performed using the `taintFlowsTo` method on the `LocalSourceNode` class. Conversely, the new member predicate `getALocalTaintSource` can be called on a `DataFlow::Node` to obtain a `LocalSourceNode` from which taint can be tracked locally to that data-flow node. Note that this functionality requires the taint-tracking libraries to be imported into scope.
44
* The new predicate `parameterNode` can now be used to map from a `Parameter` to a data-flow node.

python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class Node extends TNode {
142142

143143
/**
144144
* Gets a local source node from which data may flow to this node in zero or more local taint-flow steps.
145+
* WARNING: This will only have results if the taint tracking libraries have been imported into scope.
145146
*/
146147
LocalSourceNode getALocalTaintSource() { result.taintFlowsTo(this) }
147148
}

python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ class LocalSourceNode extends Node {
2727
pragma[inline]
2828
predicate flowsTo(Node nodeTo) { Cached::hasLocalSource(nodeTo, this) }
2929

30-
/** Holds if this `LocalSourceNode` can flow to `nodeTo` in one or more local taint steps. */
30+
/**
31+
* Holds if this `LocalSourceNode` can flow to `nodeTo` in one or more local taint steps.
32+
* WARNING: This will only have results if the taint tracking libraries have been imported into scope.
33+
*/
3134
pragma[inline]
3235
predicate taintFlowsTo(Node nodeTo) { none() }
3336

0 commit comments

Comments
 (0)