mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #1420 from felicity-semmle/1.21/javascript-change-notes
QL 1.21: javascript change notes - rc/1.21 branch
This commit is contained in:
@@ -11,11 +11,11 @@
|
||||
- [shelljs](https://www.npmjs.com/package/shelljs)
|
||||
- [cheerio](https://www.npmjs.com/package/cheerio)
|
||||
|
||||
* The security queries now track data flow through Base64 decoders such as the Node.js `Buffer` class, the DOM function `atob`, and a number of npm packages intcluding [`abab`](https://www.npmjs.com/package/abab), [`atob`](https://www.npmjs.com/package/atob), [`btoa`](https://www.npmjs.com/package/btoa), [`base-64`](https://www.npmjs.com/package/base-64), [`js-base64`](https://www.npmjs.com/package/js-base64), [`Base64.js`](https://www.npmjs.com/package/Base64) and [`base64-js`](https://www.npmjs.com/package/base64-js).
|
||||
* The security queries now track data flow through Base64 decoders such as the Node.js `Buffer` class, the DOM function `atob`, and a number of npm packages including [`abab`](https://www.npmjs.com/package/abab), [`atob`](https://www.npmjs.com/package/atob), [`btoa`](https://www.npmjs.com/package/btoa), [`base-64`](https://www.npmjs.com/package/base-64), [`js-base64`](https://www.npmjs.com/package/js-base64), [`Base64.js`](https://www.npmjs.com/package/Base64) and [`base64-js`](https://www.npmjs.com/package/base64-js).
|
||||
|
||||
* The security queries now track data flow through exceptions.
|
||||
|
||||
* The security queries now treat comparisons with symbolic constants as sanitizers, resulting in fewer false positives.
|
||||
* The security queries now treat comparisons with symbolic constants as sanitizers, resulting in fewer false positive results.
|
||||
|
||||
* TypeScript 3.5 is now supported.
|
||||
|
||||
@@ -28,26 +28,27 @@
|
||||
| **Query** | **Tags** | **Purpose** |
|
||||
|-----------------------------------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Missing regular expression anchor (`js/regex/missing-regexp-anchor`) | correctness, security, external/cwe/cwe-20 | Highlights regular expression patterns that may be missing an anchor, indicating a possible violation of [CWE-20](https://cwe.mitre.org/data/definitions/20.html). Results are not shown on LGTM by default. |
|
||||
| Prototype pollution (`js/prototype-pollution`) | security, external/cwe-250, external/cwe-400 | Highlights code that allows an attacker to modify a built-in prototype object through an unsanitized recursive merge function. The results are shown on LGTM by default. |
|
||||
| Prototype pollution (`js/prototype-pollution`) | security, external/cwe-250, external/cwe-400 | Highlights code that allows an attacker to modify a built-in prototype object through an unsanitized recursive merge function. Results are not shown on [LGTM](https://lgtm.com/rules/1508857356317/) by default. |
|
||||
|
||||
## Changes to existing queries
|
||||
|
||||
| **Query** | **Expected impact** | **Change** |
|
||||
|--------------------------------|------------------------------|---------------------------------------------------------------------------|
|
||||
| Arbitrary file write during zip extraction ("Zip Slip") | More results | This rule now considers more libraries, including tar as well as zip. |
|
||||
| Client-side URL redirect | More results and fewer false-positive results | This rule now recognizes additional uses of the document URL. This rule now treats URLs as safe in more cases where the hostname cannot be tampered with. |
|
||||
| Client-side URL redirect | More results and fewer false-positive results | This rule now recognizes additional uses of the document URL. It also treats URLs as safe in more cases where the hostname cannot be tampered with. |
|
||||
| Double escaping or unescaping | More results | This rule now considers the flow of regular expressions literals. |
|
||||
| Expression has no effect | Fewer false-positive results | This rule now treats uses of `Object.defineProperty` more conservatively. |
|
||||
| Incomplete regular expression for hostnames | More results | This rule now tracks regular expressions for host names further. |
|
||||
| Incomplete string escaping or encoding | More results | This rule now considers the flow of regular expressions literals, and it no longer flags the removal of trailing newlines. |
|
||||
| Incorrect suffix check | Fewer false-positive results | This rule now recognizes valid checks in more cases. |
|
||||
| Password in configuration file | Fewer false positive results | This query now excludes passwords that are inserted into the configuration file using a templating mechanism or read from environment variables. Results are no longer shown on LGTM by default. |
|
||||
| Replacement of a substring with itself | More results | This rule now considers the flow of regular expressions literals. |
|
||||
| Server-side URL redirect | Fewer false-positive results | This rule now treats URLs as safe in more cases where the hostname cannot be tampered with. |
|
||||
| Tainted path | More results and fewer false-positive results | This rule now analyzes path manipulation code more precisely. |
|
||||
| Type confusion through parameter tampering | Fewer false-positive results | This rule now recognizes additional emptiness checks. |
|
||||
| Useless assignment to property | Fewer false-positive results | This rule now ignore reads of additional getters. |
|
||||
| Useless assignment to property | Fewer false-positive results | This rule now ignores reads of additional getters. |
|
||||
| Unreachable statement | Unreachable throws no longer give an alert | This ignores unreachable throws, as they could be intentional (for example, to placate the TS compiler). |
|
||||
| Incorrect suffix check | Fewer false-positive results | This rule now recognizes valid checks in more cases. |
|
||||
| Tainted path | More results and fewer false-positive results | This rule now analyses path manipulation code more precisely. |
|
||||
|
||||
|
||||
## Changes to QL libraries
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
* On LGTM, JavaScript extraction for projects that do not contain any JavaScript or TypeScript code will now fail, even if the project contains other file types (such as HTML or YAML) recognized by the JavaScript extractor.
|
||||
|
||||
* XML files can now be extracted on LGTM. To enable XML extraction, set the `xml_mode` property in the `extraction/javascript/index` section of your `lgtm.yml` file to `all`. The default value of this property is `disabled`, meaning that XML files will not be extracted. (Note, however, that files with an extension that is associated with file type `xml` in the `filetypes` property are still extracted.)
|
||||
* XML files can now be extracted on LGTM. To enable XML extraction, set the `xml_mode` property in the `extraction/javascript/index` section of your `lgtm.yml` file to `all`. The default value of this property is `disabled`, meaning that XML files will not be extracted. (Note, that the `xml_mode` property does not apply to files that you map to the `xml` file type using the `filetypes` property. LGTM will always extract these files.)
|
||||
|
||||
* YAML files are now extracted by default on LGTM. You can specify exclusion filters in your `lgtm.yml` file to override this behavior.
|
||||
* YAML files are now extracted by default on LGTM. If required, you can specify exclusion filters in your `lgtm.yml` file to override this behavior.
|
||||
|
||||
For detailed information about customizing LGTM extraction, see [JavaScript extraction](https://help.semmle.com/lgtm-enterprise/user/help/javascript-extraction.html).
|
||||
Reference in New Issue
Block a user