mirror of
https://github.com/github/codeql.git
synced 2026-06-27 07:37:06 +02:00
1.7 KiB
1.7 KiB
7.2.0
Deprecated APIs
- The
Function.getAReturnValueFlowNode()predicate has been deprecated. Bind aReturnnode explicitly instead —exists(Return ret | ret.getScope() = f and n.getNode() = ret.getValue()). This is a preparatory step towards migrating the dataflow library off the legacy CFG; it has no semantic effect. - The
AstNode.getAFlowNode()predicate has been deprecated. UseControlFlowNode.getNode()from the other direction instead: replacee.getAFlowNode() = nwithn.getNode() = e. This is a preparatory step towards migrating the dataflow library off the legacy CFG; it has no semantic effect.
Minor Analysis Improvements
- Python type tracking now follows values stored in instance attributes such as
self.attracross instance methods, including across a class hierarchy (for example, a value stored onself.attrin a base class and read in a subclass, or vice versa). As a result, analysis is more likely to recognize user-defined objects that are stored onselfand used later in other methods, which may produce additional results. - Simplified the internal predicates that detect
@staticmethod,@classmethodand@propertydecorators to match the decorator's ASTNamedirectly, rather than going through the CFG and requiring the name to resolve globally. Code that shadows these three builtin decorators at the module-scope will now be classified by the decorator name alone; in practice, shadowing these names is extremely rare and the call-graph results are unchanged. - Python taint tracking is now more precise for values flowing through container contents, such as list, set, tuple, and dictionary elements. This may remove some false positive alerts.