mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: let RegExpLiteral be a DataFlow::SourceNode
This commit is contained in:
@@ -211,6 +211,7 @@ module SourceNode {
|
||||
* - object expressions
|
||||
* - array expressions
|
||||
* - JSX literals
|
||||
* - regular expression literals
|
||||
*
|
||||
* This class is for internal use only and should not normally be used directly.
|
||||
*/
|
||||
@@ -224,7 +225,8 @@ module SourceNode {
|
||||
astNode instanceof ArrayExpr or
|
||||
astNode instanceof JSXNode or
|
||||
astNode instanceof GlobalVarAccess or
|
||||
astNode instanceof ExternalModuleReference
|
||||
astNode instanceof ExternalModuleReference or
|
||||
astNode instanceof RegExpLiteral
|
||||
)
|
||||
or
|
||||
exists(SsaExplicitDefinition ssa, VarDef def |
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
| sources.js:3:2:3:1 | this |
|
||||
| sources.js:3:2:5:1 | functio ... x+19;\\n} |
|
||||
| sources.js:3:11:3:11 | x |
|
||||
| sources.js:7:1:7:3 | /x/ |
|
||||
| tst.js:1:1:1:0 | this |
|
||||
| tst.js:1:1:1:24 | import ... m 'fs'; |
|
||||
| tst.js:1:10:1:11 | fs |
|
||||
|
||||
@@ -3,3 +3,5 @@ new (x => x);
|
||||
(function(x) {
|
||||
return x+19;
|
||||
})(23);
|
||||
|
||||
/x/;
|
||||
|
||||
Reference in New Issue
Block a user