Skip to content

Commit 2cac729

Browse files
committed
C#: Convert System.Xml.XmlNamedNodeMap flow to CSV format.
1 parent c5728b2 commit 2cac729

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ private module Frameworks {
100100
private import semmle.code.csharp.frameworks.JsonNET
101101
private import semmle.code.csharp.frameworks.system.IO
102102
private import semmle.code.csharp.frameworks.system.io.Compression
103+
private import semmle.code.csharp.frameworks.system.Xml
103104
}
104105

105106
/**

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,19 +1825,6 @@ class SystemXmlXmlNodeFlow extends LibraryTypeDataFlow, SystemXmlXmlNodeClass {
18251825
}
18261826
}
18271827

1828-
/** Data flow for `System.Xml.XmlNamedNodeMap`. */
1829-
class SystemXmlXmlNamedNodeMapFlow extends LibraryTypeDataFlow, SystemXmlXmlNamedNodeMapClass {
1830-
override predicate callableFlow(
1831-
CallableFlowSource source, CallableFlowSink sink, SourceDeclarationCallable c,
1832-
boolean preservesValue
1833-
) {
1834-
c = this.getGetNamedItemMethod() and
1835-
source = TCallableFlowSourceQualifier() and
1836-
sink = TCallableFlowSinkReturn() and
1837-
preservesValue = true
1838-
}
1839-
}
1840-
18411828
/**
18421829
* Custom flow through `StringValues` library class.
18431830
*/

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import csharp
44
private import semmle.code.csharp.frameworks.System
55
private import semmle.code.csharp.dataflow.DataFlow3
6+
private import semmle.code.csharp.dataflow.ExternalFlow
67

78
/** The `System.Xml` namespace. */
89
class SystemXmlNamespace extends Namespace {
@@ -115,6 +116,17 @@ class SystemXmlXmlNamedNodeMapClass extends Class {
115116
}
116117
}
117118

119+
/** Data flow for `System.Xml.XmlNamedNodeMap`. */
120+
private class SystemXmlXmlNamedNodeMapClassFlowModelCsv extends SummaryModelCsv {
121+
override predicate row(string row) {
122+
row =
123+
[
124+
"System.Xml;XmlNamedNodeMap;false;GetNamedItem;(System.String);;Argument[-1];ReturnValue;value",
125+
"System.Xml;XmlNamedNodeMap;false;GetNamedItem;(System.String,System.String);;Argument[-1];ReturnValue;value"
126+
]
127+
}
128+
}
129+
118130
/** An enum constant in `System.Xml.ValidationType`. */
119131
class SystemXmlValidationType extends EnumConstant {
120132
SystemXmlValidationType() {

0 commit comments

Comments
 (0)