CodeQL library for Python
codeql/python-all 0.6.4 (changelog, source)
Search

Member predicate API::Node::asSource

Gets a data-flow node where this value enters the current codebase.

For example:

# API::moduleImport("re").asSource()
import re

# API::moduleImport("re").getMember("escape").asSource()
re.escape

# API::moduleImport("re").getMember("escape").getReturn().asSource()
re.escape()

This predicate does not include nodes transitively reachable by data flow; use getAValueReachableFromSource for that.

LocalSourceNode asSource()