mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
add the resolve library as a sink to js/path-injection
This commit is contained in:
@@ -577,6 +577,17 @@ module TaintedPath {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An expression whose value is resolved to a module using the [resolve](http://npmjs.com/package/resolve) library.
|
||||
*/
|
||||
class ResolveModuleSink extends Sink {
|
||||
ResolveModuleSink() {
|
||||
this = API::moduleImport("resolve").getACall().getArgument(0)
|
||||
or
|
||||
this = API::moduleImport("resolve").getMember("sync").getACall().getArgument(0)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A path argument to a file system access.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user