mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Python points-to: Fix getattr() points-to.
This commit is contained in:
@@ -1951,10 +1951,13 @@ cached module Types {
|
||||
|
||||
module AttributePointsTo {
|
||||
|
||||
predicate pointsTo(AttrNode f, Context context, ObjectInternal value, ControlFlowNode origin) {
|
||||
f.isLoad() and
|
||||
predicate pointsTo(ControlFlowNode f, Context context, ObjectInternal value, ControlFlowNode origin) {
|
||||
exists(EssaVariable var, string name, CfgOrigin orig |
|
||||
var.getASourceUse() = f.getObject(name) and
|
||||
f.isLoad() and
|
||||
var.getASourceUse() = f.(AttrNode).getObject(name)
|
||||
or
|
||||
Expressions::getattr_call(f, var.getASourceUse(), context, _, name)
|
||||
|
|
||||
variableAttributePointsTo(var, context, name, value, orig) and
|
||||
origin = orig.asCfgNodeOrHere(f)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user