move electron sink to the customizations file

This commit is contained in:
Erik Krogh Kristensen
2022-01-20 14:07:23 +01:00
parent c09b6691e1
commit 7167e856fe
2 changed files with 11 additions and 10 deletions

View File

@@ -119,6 +119,17 @@ module ClientSideUrlRedirect {
}
}
/**
* Improper use of openExternal can be leveraged to compromise the user's host.
* When openExternal is used with untrusted content, it can be leveraged to execute arbitrary commands.
*/
class ElectronShellOpenExternalSink extends Sink {
ElectronShellOpenExternalSink() {
this =
DataFlow::moduleMember("electron", "shell").getAMemberCall("openExternal").getArgument(0)
}
}
/**
* An expression that may be interpreted as the URL of a script.
*/

View File

@@ -55,13 +55,3 @@ class Configuration extends TaintTracking::Configuration {
guard instanceof HostnameSanitizerGuard
}
}
/**
* Improper use of openExternal can be leveraged to compromise the user's host.
* When openExternal is used with untrusted content, it can be leveraged to execute arbitrary commands.
*/
class ElectronShellOpenExternalSink extends Sink {
ElectronShellOpenExternalSink() {
this = DataFlow::moduleMember("electron", "shell").getAMemberCall("openExternal").getArgument(0)
}
}