|
| 1 | +# Improvements to JavaScript analysis |
| 2 | + |
| 3 | +## General improvements |
| 4 | + |
| 5 | +* Support for popular libraries has been improved. Consequently, queries may produce more results on code bases that use the following features: |
| 6 | + - client-side code, for example [React](https://reactjs.org/) |
| 7 | + - server-side code, for example [hapi](https://hapijs.com/) |
| 8 | + |
| 9 | +## New queries |
| 10 | + |
| 11 | +| **Query** | **Tags** | **Purpose** | |
| 12 | +|-----------------------------------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 13 | +| Double escaping or unescaping (`js/double-escaping`) | correctness, security, external/cwe/cwe-116 | Highlights potential double escaping or unescaping of special characters, indicating a possible violation of [CWE-116](https://cwe.mitre.org/data/definitions/116.html). Results are shown on LGTM by default. | |
| 14 | +| Incomplete URL substring sanitization | correctness, security, external/cwe/cwe-020 | Highlights URL sanitizers that are likely to be incomplete, indicating a violation of [CWE-020](https://cwe.mitre.org/data/definitions/20.html). Results shown on LGTM by default. | |
| 15 | +| Incorrect suffix check (`js/incorrect-suffix-check`) | correctness, security, external/cwe/cwe-020 | Highlights error-prone suffix checks based on `indexOf`, indicating a potential violation of [CWE-20](https://cwe.mitre.org/data/definitions/20.html). Results are shown on LGTM by default. | |
| 16 | +| Useless comparison test (`js/useless-comparison-test`) | correctness | Highlights code that is unreachable due to a numeric comparison that is always true or always false. Results are shown on LGTM by default. | |
| 17 | + |
| 18 | +## Changes to existing queries |
| 19 | + |
| 20 | +| **Query** | **Expected impact** | **Change** | |
| 21 | +|--------------------------------------------|------------------------------|------------------------------------------------------------------------------| |
| 22 | +| Client-side cross-site scripting | More results | This rule now recognizes WinJS functions that are vulnerable to HTML injection. | |
| 23 | +| Unused parameter | Fewer false-positive results | This rule no longer flags parameters with leading underscore. | |
| 24 | +| Unused variable, import, function or class | Fewer false-positive results | This rule now flags fewer variables that are implictly used by JSX elements, and no longer flags variables with leading underscore. | |
| 25 | + |
| 26 | +## Changes to QL libraries |
0 commit comments