CodeQL library for JavaScript
Search

Module ReDoSUtilSpecific

Provides JavaScript-specific definitions for use in the ReDoSUtil module.

Import path

import semmle.javascript.security.performance.ReDoSUtilSpecific

Imports

javascript

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

Predicates

isEscapeClass

Holds if term is an ecape class representing e.g. \d. clazz is which character class it represents, e.g. “d” for \d.

isExcluded

Holds if the regular expression should not be considered.

isPossessive

Holds if term is a possessive quantifier. As javascript’s regexes do not support possessive quantifiers, this never holds, but is used by the shared library.

matchesAnyPrefix

Holds if the regex that term is part of is used in a way that ignores any leading prefix of the input it’s matched against. Not yet implemented for Javascript.

matchesAnySuffix

Holds if the regex that term is part of is used in a way that ignores any trailing suffix of the input it’s matched against. Not yet implemented for Javascript.

Modules

RegExpFlags

A module containing predicates for determining which flags a regular expression have.