CodeQL library for JavaScript
Search

Module HeuristicNames

Provides heuristics for identifying names related to sensitive information.

INTERNAL: Do not use directly.

Import path

import javascript

Predicates

maybeAccountInfo

Gets a regular expression that identifies strings that may indicate the presence of user names or other account information.

maybeCertificate

Gets a regular expression that identifies strings that may indicate the presence of a certificate.

maybePassword

Gets a regular expression that identifies strings that may indicate the presence of a password or an authorization key.

maybeSecret

Gets a regular expression that identifies strings that may indicate the presence of secret or trusted data.

maybeSensitive

Gets a regular expression that identifies strings that may indicate the presence of sensitive data, with classification describing the kind of sensitive data involved.

notSensitive

Gets a regular expression that identifies strings that may indicate the presence of data that is hashed or encrypted, and hence rendered non-sensitive, or contains special characters suggesting nouns within the string do not represent the meaning of the whole string (e.g. a URL or a SQL query).