CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.14 (changelog, source)
Search

Module Portals

Provides models of “portals”, that is, interface points between different components of a code base. A typical example of a portal is a parameter of a function exported by an npm package (which is the only kind of component we support at the moment).

Portals have entry and exit nodes. For example, the (unique) exit node of the parameter of an exported function is the ParameterNode corresponding to that parameter, while its entries are all nodes corresponding to arguments passed into the parameter via a call.

The API of this library is not stable yet and may change.

Import path

import semmle.javascript.dataflow.Portals

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Classes

ParameterPortal

A portal corresponding to a positional parameter of another portal.

Portal

A portal, that is, an interface point between different npm packages.

ReturnPortal

A portal corresponding to the return value of another portal.