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

Module SyntacticHeuristics

Provides classes for reasoning syntactically about a program.

INTERNAL: Do not use outside of the semmle.javascript.heuristics module.

Import path

import semmle.javascript.heuristics.SyntacticHeuristics

Imports

javascript

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

Predicates

isArgTo

Holds if arg is an argument to a callee with a name that matches regexp.

isAssignedTo

Holds if rhs is assigned to a “name” that matches regexp.

isAssignedToOrConcatenatedWith

Holds if n is assigned to, or concatenated with something with a name that matches regexp.

isConcatenatedWith

Holds if n is a concatenation containing something with a name that matches regexp.

isConcatenatedWithString

Holds if n is a concatenation containing something with a name that matches regexp.

isConcatenatedWithStrings

Holds if n is concatenated between two string constants that match lRegexp and rRegexp respectively.

isReadFrom

Holds if the “name” of read matches regexp.