Skip to content

Commit 3ac5f7b

Browse files
author
edvraa
committed
Move RemoteSource and LocalSource to UnsafeDeserialization.qll
1 parent c3deb48 commit 3ac5f7b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@
1313
import csharp
1414
import semmle.code.csharp.security.dataflow.UnsafeDeserialization::UnsafeDeserialization
1515
import DataFlow::PathGraph
16-
import semmle.code.csharp.security.dataflow.flowsources.Remote
17-
import semmle.code.csharp.security.dataflow.flowsources.Local
18-
19-
class RemoteSource extends Source {
20-
RemoteSource() { this instanceof RemoteFlowSource }
21-
}
22-
23-
class LocalSource extends Source {
24-
LocalSource() { this instanceof LocalFlowSource }
25-
}
2616

2717
from DataFlow::PathNode userInput, DataFlow::PathNode deserializeCallArg
2818
where

csharp/ql/src/semmle/code/csharp/security/dataflow/UnsafeDeserialization.qll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import csharp
88
module UnsafeDeserialization {
99
private import semmle.code.csharp.serialization.Deserializers
1010
private import semmle.code.csharp.dataflow.TaintTracking2
11+
private import semmle.code.csharp.security.dataflow.flowsources.Remote
12+
private import semmle.code.csharp.security.dataflow.flowsources.Local
1113

1214
/**
1315
* A data flow source for unsafe deserialization vulnerabilities.
@@ -43,6 +45,14 @@ module UnsafeDeserialization {
4345
*/
4446
abstract class Sanitizer extends DataFlow::Node { }
4547

48+
class RemoteSource extends Source {
49+
RemoteSource() { this instanceof RemoteFlowSource }
50+
}
51+
52+
class LocalSource extends Source {
53+
LocalSource() { this instanceof LocalFlowSource }
54+
}
55+
4656
/**
4757
* User input to object method call deserialization flow tracking.
4858
*/

0 commit comments

Comments
 (0)