C#: Convert System.NET.IPHostEntry flow to CSV format.

This commit is contained in:
Michael Nebel
2021-12-09 13:20:01 +01:00
parent d804893a49
commit 9604ed883c
2 changed files with 11 additions and 21 deletions

View File

@@ -1330,27 +1330,6 @@ class IDictionaryFlow extends LibraryTypeDataFlow, RefType {
}
}
/** Data flow for `System.Net.IPHostEntry`. */
class SystemNetIPHostEntryFlow extends LibraryTypeDataFlow, SystemNetIPHostEntryClass {
override predicate callableFlow(
CallableFlowSource source, CallableFlowSink sink, SourceDeclarationCallable c,
boolean preservesValue
) {
exists(Property p |
this.propertyFlow(p) and
source = TCallableFlowSourceQualifier() and
sink = TCallableFlowSinkReturn() and
c = p.getGetter()
) and
preservesValue = false
}
private predicate propertyFlow(Property p) {
p = this.getHostNameProperty() or
p = this.getAliasesProperty()
}
}
/** Data flow for `System.Web.UI.WebControls.TextBox`. */
class SystemWebUIWebControlsTextBoxFlow extends LibraryTypeDataFlow,
SystemWebUIWebControlsTextBoxClass {

View File

@@ -60,6 +60,17 @@ class SystemNetIPHostEntryClass extends SystemNetClass {
Property getAliasesProperty() { result = this.getProperty("Aliases") }
}
/** Data flow for `System.Net.IPHostEntry`. */
private class SystemNetIPHostEntryClassFlowModelCsv extends SummaryModelCsv {
override predicate row(string row) {
row =
[
"System.Net;IPHostEntry;false;get_Aliases;();;Argument[-1];ReturnValue;taint",
"System.Net;IPHostEntry;false;get_HostName;();;Argument[-1];ReturnValue;taint"
]
}
}
/** The `System.Net.Cookie` class. */
class SystemNetCookieClass extends SystemNetClass {
SystemNetCookieClass() { this.hasName("Cookie") }