Files
codeql/python/ql/lib
copilot-swe-agent[bot] 0ea1b8596e Add PEP249 connection tracking through class attribute wrappers
Introduce two new Connection::InstanceSource subclasses in PEP249.qll:

- ConnectionGetterAttributeRead: recognises self._conn reads inside
  getter methods of classes whose __init__ stores a connect() call in
  that attribute. The AttrRead node coincides with the return node, so
  the existing TypeTracker returnStep propagates the connection type to
  all call sites automatically.

- ConnectionConstructorAttributeRead: recognises ClassName()._conn
  direct attribute reads on constructor-call results.

Both classes share the classStoresConnectionInInit helper predicate
that checks for the self.attr = dbapi.connect() store pattern in __init__.

Also adds test cases for the new patterns in the hdbcli test suite
and a change note.
2026-05-21 23:22:29 +00:00
..
2026-02-16 13:48:32 +00:00
2024-04-16 16:29:56 +02:00
2022-10-13 11:21:10 -04:00