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

Module ServerLess

Provides classes and predicates for working with serverless handlers. Supports AWS, Alibaba, and serverless.

Common usage is to interpret the handlers as functions and add the first argument of these as remote flow sources.

Import path

import codeql.serverless.ServerLess

Imports

I

Provides the input for the ServerLess module. Most of these should be provided by the yaml library.

Predicates

hasServerlessHandler

Holds if a file with path pathNoExt (+ some extension) has a serverless handler denoted by func.

hasServerlessHandler

Holds if the .yml file ymlFile contains a serverless configuration from framework with handler, codeURI, and runtime properties. codeURI and runtime default to the empty string if no explicit value is set in the configuration.

splitHandler

Holds if handler = filePart . astPart and filePart does not contain a .. This is a convenience predicate, as in many cases the first part of the handler property should be interpreted as (the stem of) a file name.

Parameters