Skip to content

Commit 632e487

Browse files
committed
Add Command Injection support
1 parent 8f39f02 commit 632e487

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import csharp
66
private import semmle.code.csharp.security.dataflow.flowsources.Remote
77
private import semmle.code.csharp.frameworks.system.Diagnostics
88
private import semmle.code.csharp.security.Sanitizers
9+
private import semmle.code.csharp.dataflow.ExternalFlow
910

1011
/**
1112
* A source specific to command injection vulnerabilities.
@@ -66,6 +67,11 @@ module CommandInjection = TaintTracking::Global<CommandInjectionConfig>;
6667
/** A source of remote user input. */
6768
class RemoteSource extends Source instanceof RemoteFlowSource { }
6869

70+
/** Command Injection sinks defined through CSV models. */
71+
private class ExternalCommandInjectionExprSink extends Sink {
72+
ExternalCommandInjectionExprSink() { sinkNode(this, "command-injection") }
73+
}
74+
6975
/**
7076
* A sink in `System.Diagnostic.Process` or its related classes.
7177
*/

0 commit comments

Comments
 (0)