mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Fix ql4ql alerts
This commit is contained in:
committed by
Rasmus Wriedt Larsen
parent
b56869551d
commit
e0e978bd3e
@@ -708,8 +708,8 @@ predicate dictStoreStep(CfgNode nodeFrom, DictionaryElementContent c, Node nodeT
|
||||
or
|
||||
// see https://docs.python.org/3.10/library/stdtypes.html#dict.setdefault
|
||||
exists(MethodCallNode call |
|
||||
call.calls(nodeTo.(PostUpdateNode).getPreUpdateNode(), ["setdefault"]) and
|
||||
call.getArg(0).asExpr().(StrConst).getText() = c.(DictionaryElementContent).getKey() and
|
||||
call.calls(nodeTo.(PostUpdateNode).getPreUpdateNode(), "setdefault") and
|
||||
call.getArg(0).asExpr().(StrConst).getText() = c.getKey() and
|
||||
nodeFrom = call.getArg(1)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user