mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
C#: Convert System.Net.Cookie flow to CSV format.
This commit is contained in:
@@ -1330,24 +1330,6 @@ class IDictionaryFlow extends LibraryTypeDataFlow, RefType {
|
||||
}
|
||||
}
|
||||
|
||||
/** Data flow for `System.Net.Cookie`. */
|
||||
class SystemNetCookieFlow extends LibraryTypeDataFlow, SystemNetCookieClass {
|
||||
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.getValueProperty() }
|
||||
}
|
||||
|
||||
/** Data flow for `System.Net.IPHostEntry`. */
|
||||
class SystemNetIPHostEntryFlow extends LibraryTypeDataFlow, SystemNetIPHostEntryClass {
|
||||
override predicate callableFlow(
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import csharp
|
||||
private import semmle.code.csharp.frameworks.System
|
||||
private import semmle.code.csharp.dataflow.ExternalFlow
|
||||
|
||||
/** The `System.Net` namespace. */
|
||||
class SystemNetNamespace extends Namespace {
|
||||
@@ -66,3 +67,10 @@ class SystemNetCookieClass extends SystemNetClass {
|
||||
/** Gets the `Value` property. */
|
||||
Property getValueProperty() { result = this.getProperty("Value") }
|
||||
}
|
||||
|
||||
/** Data flow for `System.Net.Cookie`. */
|
||||
private class SystemNetCookieClassFlowModelCsv extends SummaryModelCsv {
|
||||
override predicate row(string row) {
|
||||
row = "System.Net;Cookie;false;get_Value;();;Argument[-1];ReturnValue;taint"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user