File tree Expand file tree Collapse file tree 18 files changed +150
-55
lines changed
csharp/ql/lib/semmle/code/csharp/security/dataflow Expand file tree Collapse file tree 18 files changed +150
-55
lines changed Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
import csharp
6
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
7
- private import semmle.code.csharp.security.dataflow.flowsources.Local
6
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
8
7
private import semmle.code.csharp.frameworks.system.codedom.Compiler
9
8
private import semmle.code.csharp.security.Sanitizers
10
9
private import semmle.code.csharp.dataflow.internal.ExternalFlow
@@ -55,11 +54,22 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig {
55
54
*/
56
55
module CodeInjection = TaintTracking:: Global< CodeInjectionConfig > ;
57
56
58
- /** A source of remote user input. */
59
- class RemoteSource extends Source instanceof RemoteFlowSource { }
57
+ /**
58
+ * DEPRECATED: Use `ThreatModelSource` instead.
59
+ *
60
+ * A source of remote user input.
61
+ */
62
+ deprecated class RemoteSource extends Source instanceof RemoteFlowSource { }
63
+
64
+ /**
65
+ * DEPRECATED: Use `ThreatModelSource` instead.
66
+ *
67
+ * A source of local user input.
68
+ */
69
+ deprecated class LocalSource extends Source instanceof LocalFlowSource { }
60
70
61
- /** A source of local user input . */
62
- class LocalSource extends Source instanceof LocalFlowSource { }
71
+ /** A source supported by the current threat model . */
72
+ class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
63
73
64
74
private class SimpleTypeSanitizer extends Sanitizer , SimpleTypeSanitizedExpr { }
65
75
Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
import csharp
6
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
6
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
7
7
private import semmle.code.csharp.frameworks.system.Diagnostics
8
8
private import semmle.code.csharp.security.Sanitizers
9
9
private import semmle.code.csharp.dataflow.internal.ExternalFlow
@@ -64,8 +64,15 @@ module CommandInjectionConfig implements DataFlow::ConfigSig {
64
64
*/
65
65
module CommandInjection = TaintTracking:: Global< CommandInjectionConfig > ;
66
66
67
- /** A source of remote user input. */
68
- class RemoteSource extends Source instanceof RemoteFlowSource { }
67
+ /**
68
+ * DEPRECATED: Use `ThreatModelSource` instead.
69
+ *
70
+ * A source of remote user input.
71
+ */
72
+ deprecated class RemoteSource extends Source instanceof RemoteFlowSource { }
73
+
74
+ /** A source supported by the current threat model. */
75
+ class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
69
76
70
77
/** Command Injection sinks defined through Models as Data. */
71
78
private class ExternalCommandInjectionExprSink extends Sink {
Original file line number Diff line number Diff line change 6
6
import csharp
7
7
private import semmle.code.csharp.controlflow.Guards
8
8
private import semmle.code.csharp.controlflow.BasicBlocks
9
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
9
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
10
10
private import semmle.code.csharp.frameworks.System
11
11
private import semmle.code.csharp.frameworks.system.Net
12
12
private import semmle.code.csharp.security.SensitiveActions
@@ -60,9 +60,16 @@ private module ConditionalBypassConfig implements DataFlow::ConfigSig {
60
60
*/
61
61
module ConditionalBypass = TaintTracking:: Global< ConditionalBypassConfig > ;
62
62
63
- /** A source of remote user input. */
63
+ /**
64
+ * DEPRECATED: Use `ThreatModelSource` instead.
65
+ *
66
+ * A source of remote user input.
67
+ */
64
68
class RemoteSource extends Source instanceof RemoteFlowSource { }
65
69
70
+ /** A source supported by the current threat model. */
71
+ class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
72
+
66
73
/** The result of a reverse dns may be user-controlled. */
67
74
class ReverseDnsSource extends Source {
68
75
ReverseDnsSource ( ) {
Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
import csharp
6
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
6
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
7
7
private import semmle.code.csharp.security.dataflow.flowsinks.ExternalLocationSink
8
8
private import semmle.code.csharp.security.PrivateData
9
9
Original file line number Diff line number Diff line change 5
5
6
6
import csharp
7
7
private import semmle.code.csharp.commons.QualifiedName
8
- private import semmle.code.csharp.dataflow.flowsources.Remote
8
+ private import semmle.code.csharp.security. dataflow.flowsources.FlowSources
9
9
private import semmle.code.csharp.frameworks.System
10
10
private import semmle.code.csharp.dataflow.FlowSummary
11
11
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
import csharp
7
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
7
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
8
8
private import semmle.code.csharp.frameworks.system.DirectoryServices
9
9
private import semmle.code.csharp.frameworks.system.directoryservices.Protocols
10
10
private import semmle.code.csharp.security.Sanitizers
@@ -66,8 +66,15 @@ module LdapInjectionConfig implements DataFlow::ConfigSig {
66
66
*/
67
67
module LdapInjection = TaintTracking:: Global< LdapInjectionConfig > ;
68
68
69
- /** A source of remote user input. */
70
- class RemoteSource extends Source instanceof RemoteFlowSource { }
69
+ /**
70
+ * DEPRECATED: Use `ThreadModelSource` instead.
71
+ *
72
+ * A source of remote user input.
73
+ */
74
+ deprecated class RemoteSource extends Source instanceof RemoteFlowSource { }
75
+
76
+ /** A source supported by the current threat model. */
77
+ class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
71
78
72
79
/** LDAP sinks defined through Models as Data. */
73
80
private class ExternalLdapExprSink extends Sink {
Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
import csharp
6
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
6
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
7
7
private import semmle.code.csharp.frameworks.System
8
8
private import semmle.code.csharp.frameworks.system.text.RegularExpressions
9
9
private import semmle.code.csharp.security.Sanitizers
@@ -57,7 +57,7 @@ private module LogForgingConfig implements DataFlow::ConfigSig {
57
57
module LogForging = TaintTracking:: Global< LogForgingConfig > ;
58
58
59
59
/** A source of remote user input. */
60
- private class RemoteSource extends Source instanceof RemoteFlowSource { }
60
+ private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
61
61
62
62
private class HtmlSanitizer extends Sanitizer {
63
63
HtmlSanitizer ( ) { this .asExpr ( ) instanceof HtmlSanitizedExpr }
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
import csharp
7
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
7
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
8
8
private import semmle.code.csharp.frameworks.system.Xml
9
9
private import semmle.code.csharp.security.Sanitizers
10
10
@@ -62,8 +62,17 @@ private module MissingXmlValidationConfig implements DataFlow::ConfigSig {
62
62
*/
63
63
module MissingXmlValidation = TaintTracking:: Global< MissingXmlValidationConfig > ;
64
64
65
- /** A source of remote user input. */
66
- class RemoteSource extends Source instanceof RemoteFlowSource { }
65
+ /**
66
+ * DEPRECATED: Use `ThreatModelFlowSource` instead.
67
+ *
68
+ * A source of remote user input.
69
+ */
70
+ deprecated class RemoteSource extends Source instanceof RemoteFlowSource { }
71
+
72
+ /**
73
+ * A source supported by the current threat model.
74
+ */
75
+ class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
67
76
68
77
/**
69
78
* The input argument to a call to `XmlReader.Create` where the input will not be validated against
Original file line number Diff line number Diff line change 5
5
6
6
import csharp
7
7
private import semmle.code.csharp.dataflow.DataFlow2
8
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
8
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
9
9
private import semmle.code.csharp.frameworks.system.text.RegularExpressions
10
10
private import semmle.code.csharp.security.Sanitizers
11
11
@@ -55,8 +55,15 @@ private module ReDoSConfig implements DataFlow::ConfigSig {
55
55
*/
56
56
module ReDoS = TaintTracking:: Global< ReDoSConfig > ;
57
57
58
- /** A source of remote user input. */
59
- class RemoteSource extends Source instanceof RemoteFlowSource { }
58
+ /**
59
+ * DEPRECATED: Use `ThreatModelSource` instead.
60
+ *
61
+ * A source of remote user input.
62
+ */
63
+ deprecated class RemoteSource extends Source instanceof RemoteFlowSource { }
64
+
65
+ /** A source supported by the current threat model. */
66
+ class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
60
67
61
68
/**
62
69
* An expression that represents a regular expression with potential exponential behavior.
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
import csharp
7
- private import semmle.code.csharp.security.dataflow.flowsources.Remote
7
+ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
8
8
private import semmle.code.csharp.frameworks.system.text.RegularExpressions
9
9
private import semmle.code.csharp.security.Sanitizers
10
10
@@ -54,8 +54,15 @@ private module RegexInjectionConfig implements DataFlow::ConfigSig {
54
54
*/
55
55
module RegexInjection = TaintTracking:: Global< RegexInjectionConfig > ;
56
56
57
- /** A source of remote user input. */
58
- class RemoteSource extends Source instanceof RemoteFlowSource { }
57
+ /**
58
+ * DEPRECATED: Use `ThreatModelSource` instead.
59
+ *
60
+ * A source of remote user input.
61
+ */
62
+ deprecated class RemoteSource extends Source instanceof RemoteFlowSource { }
63
+
64
+ /** A source supported by the current threat model. */
65
+ class ThreatModelSource extends Source instanceof ThreatModelFlowSource { }
59
66
60
67
/**
61
68
* A `pattern` argument to a construction of a `Regex`.
You can’t perform that action at this time.
0 commit comments