CodeQL library for Ruby
codeql/ruby-all 0.8.15-dev (changelog, source)
Search

Member predicate API::Node::asSink

Gets a data-flow node where this value potentially flows into an external library.

This is usually the argument of a call, but can also be the return value of a callback.

For example:

# 'x' is found by:
# API::getTopLevelMember("Foo").getMethod("bar").getParameter(0).asSink()
Foo.bar(x)

Foo.bar(-> {
  # 'x' is found by:
  # API::getTopLevelMember("Foo").getMethod("bar").getParameter(0).getReturn().asSink()
  x
})
Node asSink()