Files
codeql/javascript/extractor
Asger Feldthaus 2ba98da107 JS: Only extract local vars in TemplateTopLevel
Angular template expressions cannot refer to global variables, any
unqualified identifier is a reference to a property provided by the
component.

We extract them as implicitly declared local variables which the
QL model can then connect with data flow steps.
2021-01-18 12:19:08 +00:00
..
2021-01-18 12:19:08 +00:00
2018-11-07 07:48:25 +00:00
2019-08-17 16:31:19 +01:00
2020-03-11 15:20:15 +01:00

JavaScript extractor

This directory contains the source code of the JavaScript extractor. The extractor depends on various libraries that are not currently bundled with the source code, so at present it cannot be built in isolation.

The extractor consists of a parser for the latest version of ECMAScript, including a few proposed and historic extensions (see src/com/semmle/jcorn), classes for representing JavaScript and TypeScript ASTs (src/com/semmle/js/ast and src/com/semmle/ts/ast), and various other bits of functionality. Historically, the main entry point of the JavaScript extractor has been com.semmle.js.extractor.Main. However, this class is slowly being phased out in favour of com.semmle.js.extractor.AutoBuild, which is the entry point used by LGTM.

License

Like the LGTM queries, the JavaScript extractor is licensed under Apache License 2.0 by GitHub. Some code is derived from other projects, whose licenses are noted in other LICENSE-*.md files in this folder.