Skip to content

Commit b8d60ed

Browse files
author
Daniel Santos
committed
TokenBuiltFromUuid isAdditionalTaintStep refactor
1 parent 375edf7 commit b8d60ed

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

python/ql/src/experimental/Security/CWE-340/TokenBuiltFromUUID.ql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ class TokenBuiltFromUuidConfig extends TaintTracking::Configuration {
5050
override predicate isSink(DataFlow::Node sink) { sink instanceof TokenAssignmentValueSink }
5151

5252
override predicate isAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
53-
exists(Call call, Name name |
54-
call.getFunc() = name and
55-
name.getId() = "str" and
56-
nodeFrom = DataFlow::exprNode(call.getArg(0)) and
57-
nodeTo = DataFlow::exprNode(call)
53+
exists(DataFlow::CallCfgNode call |
54+
call = API::builtin("str").getACall() and
55+
nodeFrom = call.getArg(0) and
56+
nodeTo = call
5857
)
5958
}
6059
}

0 commit comments

Comments
 (0)