Skip to content

Commit a04920f

Browse files
committed
C#: Convert System.Xml.XmlDocument flow to CSV format.
1 parent 4bf2a51 commit a04920f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/LibraryTypeDataFlow.qll

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,19 +1790,6 @@ class SystemXmlXmlReaderFlow extends LibraryTypeDataFlow, SystemXmlXmlReaderClas
17901790
}
17911791
}
17921792

1793-
/** Data flow for `System.Xml.XmlDocument`. */
1794-
class SystemXmlXmlDocumentFlow extends LibraryTypeDataFlow, SystemXmlXmlDocumentClass {
1795-
override predicate callableFlow(
1796-
CallableFlowSource source, CallableFlowSink sink, SourceDeclarationCallable c,
1797-
boolean preservesValue
1798-
) {
1799-
c = this.getLoadMethod() and
1800-
source = TCallableFlowSourceArg(0) and
1801-
sink = TCallableFlowSinkQualifier() and
1802-
preservesValue = false
1803-
}
1804-
}
1805-
18061793
/**
18071794
* Custom flow through `StringValues` library class.
18081795
*/

csharp/ql/lib/semmle/code/csharp/frameworks/system/Xml.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ class SystemXmlXmlDocumentClass extends Class {
4040
}
4141
}
4242

43+
/** Data flow for `System.Xml.XmlDocument`. */
44+
private class SystemXmlXmlDocumentFlowModelCsv extends SummaryModelCsv {
45+
override predicate row(string row) {
46+
row =
47+
[
48+
"System.Xml;XmlDocument;false;Load;(System.IO.Stream);;Argument[0];Argument[-1];taint",
49+
"System.Xml;XmlDocument;false;Load;(System.IO.TextReader);;Argument[0];Argument[-1];taint",
50+
"System.Xml;XmlDocument;false;Load;(System.String);;Argument[0];Argument[-1];taint",
51+
"System.Xml;XmlDocument;false;Load;(System.Xml.XmlReader);;Argument[0];Argument[-1];taint"
52+
]
53+
}
54+
}
55+
4356
/** The `System.Xml.XmlReader` class. */
4457
class SystemXmlXmlReaderClass extends Class {
4558
SystemXmlXmlReaderClass() {

0 commit comments

Comments
 (0)