|
3 | 3 | ## General improvements
|
4 | 4 |
|
5 | 5 | * Support for the following frameworks and libraries has been improved:
|
| 6 | + - [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) |
| 7 | + - [bluebird](http://bluebirdjs.com/) |
6 | 8 | - [express](https://www.npmjs.com/package/express)
|
| 9 | + - [fastify](https://www.npmjs.com/package/fastify) |
7 | 10 | - [fstream](https://www.npmjs.com/package/fstream)
|
8 | 11 | - [jGrowl](https://github.com/stanlemon/jGrowl)
|
9 | 12 | - [jQuery](https://jquery.com/)
|
|
15 | 18 | - [sequelize](https://www.npmjs.com/package/sequelize)
|
16 | 19 | - [spanner](https://www.npmjs.com/package/spanner)
|
17 | 20 | - [sqlite](https://www.npmjs.com/package/sqlite)
|
18 |
| - - [ssh2](https://www.npmjs.com/package/ssh2) |
19 | 21 | - [ssh2-streams](https://www.npmjs.com/package/ssh2-streams)
|
| 22 | + - [ssh2](https://www.npmjs.com/package/ssh2) |
| 23 | + |
| 24 | +* TypeScript 3.9 is now supported. |
20 | 25 |
|
21 | 26 | ## New queries
|
22 | 27 |
|
|
25 | 30 | | Cross-site scripting through DOM (`js/xss-through-dom`) | security, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights potential XSS vulnerabilities where existing text from the DOM is used as HTML. Results are not shown on LGTM by default. |
|
26 | 31 | | Incomplete HTML attribute sanitization (`js/incomplete-html-attribute-sanitization`) | security, external/cwe/cwe-20, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights potential XSS vulnerabilities due to incomplete sanitization of HTML meta-characters. Results are shown on LGTM by default. |
|
27 | 32 | | Unsafe expansion of self-closing HTML tag (`js/unsafe-html-expansion`) | security, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights potential XSS vulnerabilities caused by unsafe expansion of self-closing HTML tags. |
|
| 33 | +| Unsafe shell command constructed from library input (`js/shell-command-constructed-from-input`) | correctness, security, external/cwe/cwe-078, external/cwe/cwe-088 | Highlights potential command injections due to a shell command being constructed from library inputs. Results are shown on LGTM by default. | |
28 | 34 |
|
29 | 35 | ## Changes to existing queries
|
30 | 36 |
|
31 | 37 | | **Query** | **Expected impact** | **Change** |
|
32 | 38 | |--------------------------------|------------------------------|---------------------------------------------------------------------------|
|
33 |
| -| Misspelled variable name (`js/misspelled-variable-name`) | Message changed | The message for this query now correctly identifies the misspelled variable in additional cases. | |
34 |
| -| Uncontrolled data used in path expression (`js/path-injection`) | More results | This query now recognizes additional file system calls. | |
35 |
| -| Uncontrolled command line (`js/command-line-injection`) | More results | This query now recognizes additional command execution calls. | |
36 |
| -| Client-side URL redirect (`js/client-side-unvalidated-url-redirection`) | Less results | This query now recognizes additional safe patterns of doing URL redirects. | |
37 |
| -| Client-side cross-site scripting (`js/xss`) | Less results | This query now recognizes additional safe strings based on URLs. | |
| 39 | +| Client-side cross-site scripting (`js/xss`) | Fewer results | This query no longer flags optionally sanitized values. | |
| 40 | +| Client-side URL redirect (`js/client-side-unvalidated-url-redirection`) | Fewer results | This query now recognizes additional safe patterns of doing URL redirects. | |
| 41 | +| Client-side cross-site scripting (`js/xss`) | Fewer results | This query now recognizes additional safe patterns of constructing HTML. | |
| 42 | +| Code injection (`js/code-injection`) | More results | More potential vulnerabilities involving NoSQL code operators are now recognized. | |
| 43 | +| Expression has no effect (`js/useless-expression`) | Fewer results | This query no longer flags an expression when that expression is the only content of the containing file. | |
38 | 44 | | Incomplete URL scheme check (`js/incomplete-url-scheme-check`) | More results | This query now recognizes additional url scheme checks. |
|
| 45 | +| Misspelled variable name (`js/misspelled-variable-name`) | Message changed | The message for this query now correctly identifies the misspelled variable in additional cases. | |
39 | 46 | | Prototype pollution in utility function (`js/prototype-pollution-utility`) | More results | This query now recognizes additional utility functions as vulnerable to prototype polution. |
|
40 |
| -| Expression has no effect (`js/useless-expression`) | Less results | This query no longer flags an expression when that expression is the only content of the containing file. | |
41 |
| -| Unknown directive (`js/unknown-directive`) | Less results | This query no longer flags directives generated by the Babel compiler. | |
42 |
| -| Code injection (`js/code-injection`) | More results | More potential vulnerabilities involving NoSQL code operators are now recognized. | |
| 47 | +| Prototype pollution in utility function (`js/prototype-pollution-utility`) | More results | This query now recognizes more coding patterns that are vulnerable to prototype pollution. | |
| 48 | +| Uncontrolled command line (`js/command-line-injection`) | More results | This query now recognizes additional command execution calls. | |
| 49 | +| Uncontrolled data used in path expression (`js/path-injection`) | More results | This query now recognizes additional file system calls. | |
| 50 | +| Unknown directive (`js/unknown-directive`) | Fewer results | This query no longer flags directives generated by the Babel compiler. | |
| 51 | +| Unused property (`js/unused-property`) | Fewer results | This query no longer flags properties of objects that are operands of `yield` expressions. | |
43 | 52 | | Zip Slip (`js/zipslip`) | More results | This query now recognizes additional vulnerabilities. |
|
44 |
| -| Unused property (`js/unused-property`) | Less results | This query no longer flags properties of objects that are operands of `yield` expressions. | |
45 | 53 |
|
46 | 54 | The following low-precision queries are no longer run by default on LGTM (their results already were not displayed):
|
47 | 55 |
|
48 | 56 | - `js/angular/dead-event-listener`
|
49 | 57 | - `js/angular/unused-dependency`
|
50 |
| - - `js/conflicting-html-attribute` |
51 |
| - - `js/useless-assignment-to-global` |
52 |
| - - `js/too-many-parameters` |
53 |
| - - `js/unused-property` |
54 | 58 | - `js/bitwise-sign-check`
|
55 | 59 | - `js/comparison-of-identical-expressions`
|
56 |
| - - `js/misspelled-identifier` |
| 60 | + - `js/conflicting-html-attribute` |
| 61 | + - `js/ignored-setter-parameter` |
57 | 62 | - `js/jsdoc/malformed-param-tag`
|
58 |
| - - `js/jsdoc/unknown-parameter` |
59 | 63 | - `js/jsdoc/missing-parameter`
|
60 |
| - - `js/omitted-array-element` |
61 |
| - - `js/ignored-setter-parameter` |
| 64 | + - `js/jsdoc/unknown-parameter` |
62 | 65 | - `js/json-in-javascript-file`
|
| 66 | + - `js/misspelled-identifier` |
| 67 | + - `js/nested-loops-with-same-variable` |
63 | 68 | - `js/node/cyclic-import`
|
64 | 69 | - `js/node/unused-npm-dependency`
|
65 |
| - - `js/single-run-loop` |
66 |
| - - `js/nested-loops-with-same-variable` |
| 70 | + - `js/omitted-array-element` |
67 | 71 | - `js/return-outside-function`
|
| 72 | + - `js/single-run-loop` |
| 73 | + - `js/too-many-parameters` |
| 74 | + - `js/unused-property` |
| 75 | + - `js/useless-assignment-to-global` |
68 | 76 |
|
69 | 77 | ## Changes to libraries
|
70 | 78 |
|
71 | 79 | * A library `semmle.javascript.explore.CallGraph` has been added to help write queries for exploring the call graph.
|
72 | 80 | * Added data flow for `Map` and `Set`, and added matching type-tracking steps that can accessed using the `CollectionsTypeTracking` module.
|
| 81 | +* The data-flow node representing a parameter or destructuring pattern is now always the `ValueNode` corresponding to that AST node. This has a few consequences: |
| 82 | + - `Parameter.flow()` now gets the correct data flow node for a parameter. Previously this had a result, but the node was disconnected from the data flow graph. |
| 83 | + - `ParameterNode.asExpr()` and `.getAstNode()` now gets the parameter's AST node, whereas previously it had no result. |
| 84 | + - `Expr.flow()` now has a more meaningful result for destructuring patterns. Previously this node was disconnected from the data flow graph. Now it represents the values being destructured by the pattern. |
| 85 | +* The global data-flow and taint-tracking libraries now model indirect parameter accesses through the `arguments` object in some cases, which may lead to additional results from some of the security queries, particularly "Prototype pollution in utility function". |
0 commit comments