Gets a data-flow node where this value leaves the current codebase and flows into an external library (or in general, any external codebase).
Concretely, this is either an argument passed to a call to external code, or the right-hand side of an attribute write on an object flowing into such a call.
import foo # 'x' is matched by API::moduleImport("foo").getMember("bar").getParameter(0).asSink() foo.bar(x) # 'x' is matched by API::moduleImport("foo").getMember("bar").getParameter(0).getMember("prop").asSink() obj.prop = x foo.bar(obj);
This predicate does not include nodes transitively reaching the sink by data flow;
getAValueReachingSink for that.