зеркало из https://github.com/github/codeql.git
C#: Convert System.Web.HttpServerUtility flow to CSV format.
This commit is contained in:
Родитель
6301e726ee
Коммит
0e0c3e3937
|
@ -1983,22 +1983,6 @@ class SystemWebHttpUtilityFlow extends LibraryTypeDataFlow, SystemWebHttpUtility
|
|||
}
|
||||
}
|
||||
|
||||
/** Data flow for `System.Web.HttpServerUtility`. */
|
||||
class SystemWebHttpServerUtilityFlow extends LibraryTypeDataFlow, SystemWebHttpServerUtility {
|
||||
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.
|
||||
*/
|
||||
|
|
|
@ -175,6 +175,17 @@ class SystemWebHttpServerUtility extends SystemWebClass {
|
|||
Method getAnUrlEncodeMethod() { result = this.getAMethod("UrlEncode") }
|
||||
}
|
||||
|
||||
/** Data flow for `System.Web.HttpServerUtility`. */
|
||||
private class SystemWebHttpServerUtilityFlowModelCsv extends SummaryModelCsv {
|
||||
override predicate row(string row) {
|
||||
row =
|
||||
[
|
||||
"System.Web;HttpServerUtility;false;HtmlEncode;(System.String);;Argument[0];ReturnValue;taint",
|
||||
"System.Web;HttpServerUtility;false;UrlEncode;(System.String);;Argument[0];ReturnValue;taint"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
/** The `System.Web.HttpUtility` class. */
|
||||
class SystemWebHttpUtility extends SystemWebClass {
|
||||
SystemWebHttpUtility() { this.hasName("HttpUtility") }
|
||||
|
|
Загрузка…
Ссылка в новой задаче