Skip to content

Commit ca410fe

Browse files
committed
JS: Replace 'instanceof ClientSideRemoteFlowSource'
1 parent 05477e4 commit ca410fe

7 files changed

+7
-7
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module CommandInjection {
3434
* An active threat-model source, considered as a flow source.
3535
*/
3636
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
37-
ActiveThreatModelSourceAsSource() { not this instanceof ClientSideRemoteFlowSource }
37+
ActiveThreatModelSourceAsSource() { not this.isClientSideSource() }
3838

3939
override string getSourceType() { result = "a user-provided value" }
4040
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module CorsMisconfigurationForCredentials {
3636
* An active threat-model source, considered as a flow source.
3737
*/
3838
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
39-
ActiveThreatModelSourceAsSource() { not this instanceof ClientSideRemoteFlowSource }
39+
ActiveThreatModelSourceAsSource() { not this.isClientSideSource() }
4040
}
4141

4242
/**

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ deprecated class LogInjectionConfiguration extends TaintTracking::Configuration
5252
* A source of remote user controlled input.
5353
*/
5454
class RemoteSource extends Source instanceof RemoteFlowSource {
55-
RemoteSource() { not this instanceof ClientSideRemoteFlowSource }
55+
RemoteSource() { not this.isClientSideSource() }
5656
}
5757

5858
/**

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module RegExpInjection {
3434
* An active threat-model source, considered as a flow source.
3535
*/
3636
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
37-
ActiveThreatModelSourceAsSource() { not this instanceof ClientSideRemoteFlowSource }
37+
ActiveThreatModelSourceAsSource() { not this.isClientSideSource() }
3838
}
3939

4040
private import IndirectCommandInjectionCustomizations

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module RequestForgery {
5252
not this.(ClientSideRemoteFlowSource).getKind().isPathOrUrl()
5353
}
5454

55-
override predicate isServerSide() { not this instanceof ClientSideRemoteFlowSource }
55+
override predicate isServerSide() { not super.isClientSideSource() }
5656
}
5757

5858
/**

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module ResourceExhaustion {
6363
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
6464
ActiveThreatModelSourceAsSource() {
6565
// exclude source that only happen client-side
66-
not this instanceof ClientSideRemoteFlowSource and
66+
not this.isClientSideSource() and
6767
not this = DataFlow::parameterNode(any(PostMessageEventHandler pmeh).getEventParameter())
6868
}
6969
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ module TaintedPath {
719719
* An active threat-model source, considered as a flow source.
720720
*/
721721
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
722-
ActiveThreatModelSourceAsSource() { not this instanceof ClientSideRemoteFlowSource }
722+
ActiveThreatModelSourceAsSource() { not this.isClientSideSource() }
723723
}
724724

725725
/**

0 commit comments

Comments
 (0)