Skip to content

Commit f388a0f

Browse files
committed
Deprecate direct uses of RemoteFlowSource and replace with ThreatModelFlowSource
1 parent bd0137a commit f388a0f

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module ConditionalBypass = TaintTracking::Global<ConditionalBypassConfig>;
6565
*
6666
* A source of remote user input.
6767
*/
68-
class RemoteSource extends Source instanceof RemoteFlowSource { }
68+
deprecated class RemoteSource extends Source instanceof RemoteFlowSource { }
6969

7070
/** A source supported by the current threat model. */
7171
class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }

csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
import csharp
16-
import semmle.code.csharp.security.dataflow.flowsources.Remote
16+
import semmle.code.csharp.security.dataflow.flowsources.FlowSources
1717
import semmle.code.csharp.commons.Util
1818
import AssemblyPathInjection::PathGraph
1919

@@ -22,7 +22,7 @@ import AssemblyPathInjection::PathGraph
2222
*/
2323
module AssemblyPathInjectionConfig implements DataFlow::ConfigSig {
2424
predicate isSource(DataFlow::Node source) {
25-
source instanceof RemoteFlowSource or
25+
source instanceof ThreatModelFlowSource or
2626
source.asExpr() = any(MainMethod main).getParameter(0).getAnAccess()
2727
}
2828

csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import csharp
22
import semmle.code.csharp.frameworks.system.Net
33
import semmle.code.csharp.frameworks.System
44
import semmle.code.csharp.security.dataflow.flowsources.Remote
5+
import semmle.code.csharp.security.dataflow.flowsources.FlowSources
56
import semmle.code.csharp.security.Sanitizers
67

78
//If this leaves experimental this should probably go in semmle.code.csharp.frameworks.system.Net
@@ -68,8 +69,15 @@ private module TaintedWebClientConfig implements DataFlow::ConfigSig {
6869
*/
6970
module TaintedWebClient = TaintTracking::Global<TaintedWebClientConfig>;
7071

71-
/** A source of remote user input. */
72-
class RemoteSource extends Source instanceof RemoteFlowSource { }
72+
/**
73+
* DEPRECATED: Use `ThreatModelSource` instead.
74+
*
75+
* A source of remote user input.
76+
*/
77+
deprecated class RemoteSource extends Source instanceof RemoteFlowSource { }
78+
79+
/** A source supported by the current threat model. */
80+
class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
7381

7482
/**
7583
* A path argument to a `WebClient` method call that has an address argument.

csharp/ql/src/experimental/CWE-918/RequestForgery.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module RequestForgery {
66
import semmle.code.csharp.frameworks.system.Web
77
import semmle.code.csharp.frameworks.Format
88
import semmle.code.csharp.security.dataflow.flowsources.Remote
9+
import semmle.code.csharp.security.dataflow.flowsources.FlowSources
910

1011
/**
1112
* A data flow source for server side request forgery vulnerabilities.
@@ -91,10 +92,9 @@ module RequestForgery {
9192
module RequestForgeryFlow = DataFlow::Global<RequestForgeryFlowConfig>;
9293

9394
/**
94-
* A remote data flow source taken as a source
95-
* for Server Side Request Forgery(SSRF) Vulnerabilities.
95+
* A dataflow source for Server Side Request Forgery(SSRF) Vulnerabilities.
9696
*/
97-
private class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource { }
97+
private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
9898

9999
/**
100100
* An url argument to a `HttpRequestMessage` constructor call

0 commit comments

Comments
 (0)