Skip to content

Commit 2d8770d

Browse files
committed
Python: Fix remaining deprecation warnings.
1 parent 922e52f commit 2d8770d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

python/ql/src/Resources/FileOpen.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ predicate def_is_open(EssaDefinition def, ControlFlowNode open) {
7979
passes_open_files(refinement)
8080
)
8181
or
82-
exists(PyNodeRefinement refinement | refinement = def |
82+
exists(EssaNodeRefinement refinement | refinement = def |
8383
not closes_file(def) and
8484
not wraps_file(refinement.getDefiningNode(), refinement.getInput()) and
8585
var_is_open(refinement.getInput(), open)

python/ql/src/semmle/python/dataflow/TaintTracking.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ abstract class TaintKind extends string {
155155
* For example, if this were a kind of string taint
156156
* the `result` would be `theStrType()`.
157157
*/
158-
ClassValue getType() { result.(ClassObjectInternal).getSource() = this.getClass() }
158+
ClassValue getType() { none() }
159159

160160
/**
161161
* Gets the boolean values (may be one, neither, or both) that
@@ -180,7 +180,10 @@ abstract class TaintKind extends string {
180180
TaintKind getTaintForIteration() { none() }
181181

182182
predicate flowStep(DataFlow::Node fromnode, DataFlow::Node tonode, string edgeLabel) {
183-
this.additionalFlowStepVar(fromnode.asVariable(), tonode.asVariable()) and
183+
exists(DataFlowExtension::DataFlowVariable v |
184+
v = fromnode.asVariable() and
185+
v.getASuccessorVariable() = tonode.asVariable()
186+
) and
184187
edgeLabel = "custom taint variable step"
185188
}
186189
}

0 commit comments

Comments
 (0)