mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
@@ -726,6 +726,8 @@ private class EssaTaintTracking extends string {
|
||||
private TaintKind iterable_unpacking_descent(
|
||||
SequenceNode left_parent, ControlFlowNode left_defn, CollectionKind parent_kind
|
||||
) {
|
||||
//TODO: Fix the cartesian product in this predicate
|
||||
none() and
|
||||
left_parent.getAnElement() = left_defn and
|
||||
// Handle `a, *b = some_iterable`
|
||||
if left_defn instanceof StarredNode
|
||||
|
||||
@@ -223,19 +223,19 @@ class UrlsplitUrlparseTempSanitizer extends Sanitizer {
|
||||
or
|
||||
full_use.(AttrNode).getObject() = test.getInput().getAUse()
|
||||
|
|
||||
clears_taint(_, full_use, test.getTest(), test.getSense())
|
||||
clears_taint(full_use, test.getTest(), test.getSense())
|
||||
)
|
||||
}
|
||||
|
||||
private predicate clears_taint(ControlFlowNode final_test, ControlFlowNode tainted, ControlFlowNode test, boolean sense) {
|
||||
test_equality_with_const(final_test, tainted, sense)
|
||||
private predicate clears_taint(ControlFlowNode tainted, ControlFlowNode test, boolean sense) {
|
||||
test_equality_with_const(test, tainted, sense)
|
||||
or
|
||||
test_in_const_seq(final_test, tainted, sense)
|
||||
test_in_const_seq(test, tainted, sense)
|
||||
or
|
||||
test.(UnaryExprNode).getNode().getOp() instanceof Not and
|
||||
exists(ControlFlowNode nested_test |
|
||||
nested_test = test.(UnaryExprNode).getOperand() and
|
||||
clears_taint(final_test, tainted, nested_test, sense.booleanNot())
|
||||
clears_taint(tainted, nested_test, sense.booleanNot())
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user