codeql icon indicating copy to clipboard operation
codeql copied to clipboard

Python: subscript def nodes

Open yoff opened this issue 3 years ago • 0 comments
trafficstars

Follow on to #10539. Fix the def-nodes for subscripts.

I also experimented with recovering the index of a subscript (see the commit). I did it for the case where the subscript is being written to. This is the complicated case, because the actual SubscriptNode is not an API node: For

  header["key"] = "value"

header would be an API use node and "value" would be an API def node with path [path to header].getASubscript(). (To get the data flow node, we can then use asSink() or getAValueReachingSink() as appropriate.)

yoff avatar Sep 28 '22 14:09 yoff