mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Merge pull request #387 from xiemaisi/js/amd-fixes
Approved by esben-semmle
This commit is contained in:
@@ -105,7 +105,7 @@ class AMDModuleDefinition extends CallExpr {
|
||||
* parameters `pdep1` and `pdep2` correspond to dependencies
|
||||
* `dep1` and `dep2`.
|
||||
*/
|
||||
private SimpleParameter getDependencyParameter(string name) {
|
||||
Parameter getDependencyParameter(string name) {
|
||||
exists (PathExpr dep |
|
||||
dependencyParameter(dep, result) and
|
||||
dep.getValue() = name
|
||||
|
||||
@@ -399,10 +399,8 @@ class ModuleImportNode extends DataFlow::DefaultSourceNode {
|
||||
)
|
||||
or
|
||||
// declared AMD dependency
|
||||
exists (AMDModuleDefinition amd, PathExpr dep, Parameter p |
|
||||
amd.dependencyParameter(dep, p) and
|
||||
path = dep.getValue() and
|
||||
this = DataFlow::parameterNode(p)
|
||||
exists (AMDModuleDefinition amd |
|
||||
this = DataFlow::parameterNode(amd.getDependencyParameter(path))
|
||||
)
|
||||
or
|
||||
// AMD require
|
||||
|
||||
Reference in New Issue
Block a user