mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
C#: Convert System.Net.WebUtility flow to CSV format.
This commit is contained in:
@@ -1999,22 +1999,6 @@ class SystemWebHttpServerUtilityFlow extends LibraryTypeDataFlow, SystemWebHttpS
|
||||
}
|
||||
}
|
||||
|
||||
/** Data flow for `System.Net.WebUtility`. */
|
||||
class SystemNetWebUtilityFlow extends LibraryTypeDataFlow, SystemNetWebUtility {
|
||||
override predicate callableFlow(
|
||||
CallableFlowSource source, CallableFlowSink sink, SourceDeclarationCallable c,
|
||||
boolean preservesValue
|
||||
) {
|
||||
(
|
||||
c = this.getAnHtmlEncodeMethod() or
|
||||
c = this.getAnUrlEncodeMethod()
|
||||
) and
|
||||
source = TCallableFlowSourceArg(0) and
|
||||
sink = TCallableFlowSinkReturn() and
|
||||
preservesValue = false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom flow through `StringValues` library class.
|
||||
*/
|
||||
|
||||
@@ -28,6 +28,18 @@ class SystemNetWebUtility extends SystemNetClass {
|
||||
Method getAnUrlEncodeMethod() { result = this.getAMethod("UrlEncode") }
|
||||
}
|
||||
|
||||
/** Data flow for `System.Net.WebUtility`. */
|
||||
private class SystemNetWebUtilityFlowModelCsv extends SummaryModelCsv {
|
||||
override predicate row(string row) {
|
||||
row =
|
||||
[
|
||||
"System.Net;WebUtility;false;HtmlEncode;(System.String);;Argument[0];ReturnValue;taint",
|
||||
"System.Net;WebUtility;false;HtmlEncode;(System.String,System.IO.TextWriter);;Argument[0];ReturnValue;taint",
|
||||
"System.Net;WebUtility;false;UrlEncode;(System.String);;Argument[0];ReturnValue;taint"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
/** The `System.Net.HttpListenerResponse` class. */
|
||||
class SystemNetHttpListenerResponseClass extends SystemNetClass {
|
||||
SystemNetHttpListenerResponseClass() { this.hasName("HttpListenerResponse") }
|
||||
|
||||
Reference in New Issue
Block a user