mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
JS: add test case
This commit is contained in:
@@ -0,0 +1 @@
|
||||
| fs | fs | customImport.js:1:12:1:29 | customImport("fs") |
|
||||
@@ -0,0 +1,15 @@
|
||||
import javascript
|
||||
|
||||
class CustomImport extends DataFlow::ModuleImportNode::Range, DataFlow::CallNode {
|
||||
CustomImport() {
|
||||
getCalleeName() = "customImport"
|
||||
}
|
||||
|
||||
override string getPath() {
|
||||
result = getArgument(0).getStringValue()
|
||||
}
|
||||
}
|
||||
|
||||
from string path, CustomImport imprt
|
||||
where imprt = DataFlow::moduleImport(path)
|
||||
select path, imprt.getPath(), imprt
|
||||
@@ -0,0 +1 @@
|
||||
const fs = customImport("fs");
|
||||
Reference in New Issue
Block a user