|
2 | 2 |
|
3 | 3 | ## General improvements |
4 | 4 |
|
| 5 | +* Alert suppression can now be done with single-line block comments (`/* ... */`) as well as line comments (`// ...`). |
| 6 | + |
| 7 | +* Imports with the `.js` extension can now be resolved to a TypeScript file, |
| 8 | + when the import refers to a file generated by TypeScript. |
| 9 | + |
| 10 | +- The analysis of sanitizer guards has improved, leading to fewer false-positive results from the security queries. |
| 11 | + |
5 | 12 | * Support for the following frameworks and libraries has been improved: |
6 | 13 | - [react](https://www.npmjs.com/package/react) |
7 | 14 | - [typeahead.js](https://www.npmjs.com/package/typeahead.js) |
8 | 15 | - [Handlebars](https://www.npmjs.com/package/handlebars) |
9 | 16 |
|
10 | | -- Imports with the `.js` extension can now be resolved to a TypeScript file, |
11 | | - when the import refers to a file generated by TypeScript. |
12 | | - |
13 | 17 | ## New queries |
14 | 18 |
|
15 | 19 | | **Query** | **Tags** | **Purpose** | |
16 | 20 | |---------------------------------------------------------------------------------|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
17 | 21 | | Cross-site scripting through exception (`js/xss-through-exception`) | security, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights potential XSS vulnerabilities where an exception is written to the DOM. Results are not shown on LGTM by default. | |
| 22 | +| Regular expression always matches (`js/regex/always-matches`) | correctness, regular-expressions | Highlights regular expression checks that trivially succeed by matching an empty substring. Results are shown on LGTM by default. | |
18 | 23 |
|
19 | 24 | ## Changes to existing queries |
20 | 25 |
|
21 | 26 | | **Query** | **Expected impact** | **Change** | |
22 | 27 | |--------------------------------|------------------------------|---------------------------------------------------------------------------| |
23 | 28 | | Clear-text logging of sensitive information (`js/clear-text-logging`) | More results | More results involving `process.env` and indirect calls to logging methods are recognized. | |
| 29 | +| Duplicate parameter names (`js/duplicate-parameter-name`) | Fewer results | This query now recognizes additional parameters that reasonably can have duplicated names. | |
24 | 30 | | Incomplete string escaping or encoding (`js/incomplete-sanitization`) | Fewer false positive results | This query now recognizes additional cases where a single replacement is likely to be intentional. | |
25 | 31 | | Unbound event handler receiver (`js/unbound-event-handler-receiver`) | Fewer false positive results | This query now recognizes additional ways event handler receivers can be bound. | |
| 32 | +| Expression has no effect (`js/useless-expression`) | Fewer false positive results | The query now recognizes block-level flow type annotations. | |
26 | 33 |
|
27 | 34 | ## Changes to libraries |
28 | 35 |
|
29 | 36 | * The predicates `RegExpTerm.getSuccessor` and `RegExpTerm.getPredecessor` have been changed to reflect textual, not operational, matching order. This only makes a difference in lookbehind assertions, which are operationally matched backwards. Previously, `getSuccessor` would mimick this, so in an assertion `(?<=ab)` the term `b` would be considered the predecessor, not the successor, of `a`. Textually, however, `a` is still matched before `b`, and this is the order we now follow. |
30 | | - |
|
0 commit comments