Skip to content

Commit 2287b6e

Browse files
authored
Merge pull request github#7675 from erik-krogh/move-url-sink-to-customizations
Approved by esbena
2 parents 15c1ce7 + 7167e85 commit 2287b6e

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/ClientSideUrlRedirectCustomizations.qll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,17 @@ module ClientSideUrlRedirect {
119119
}
120120
}
121121

122+
/**
123+
* Improper use of openExternal can be leveraged to compromise the user's host.
124+
* When openExternal is used with untrusted content, it can be leveraged to execute arbitrary commands.
125+
*/
126+
class ElectronShellOpenExternalSink extends Sink {
127+
ElectronShellOpenExternalSink() {
128+
this =
129+
DataFlow::moduleMember("electron", "shell").getAMemberCall("openExternal").getArgument(0)
130+
}
131+
}
132+
122133
/**
123134
* An expression that may be interpreted as the URL of a script.
124135
*/

javascript/ql/lib/semmle/javascript/security/dataflow/ClientSideUrlRedirectQuery.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,3 @@ class Configuration extends TaintTracking::Configuration {
5555
guard instanceof HostnameSanitizerGuard
5656
}
5757
}
58-
59-
/**
60-
* Improper use of openExternal can be leveraged to compromise the user's host.
61-
* When openExternal is used with untrusted content, it can be leveraged to execute arbitrary commands.
62-
*/
63-
class ElectronShellOpenExternalSink extends Sink {
64-
ElectronShellOpenExternalSink() {
65-
this = DataFlow::moduleMember("electron", "shell").getAMemberCall("openExternal").getArgument(0)
66-
}
67-
}

0 commit comments

Comments
 (0)