@@ -14,6 +14,8 @@ module XSS {
1414 import semmle.code.csharp.security.dataflow.flowsinks.Html
1515 import semmle.code.csharp.security.dataflow.flowsinks.Remote
1616 import semmle.code.csharp.security.dataflow.flowsources.Remote
17+ private import semmle.code.csharp.dataflow.DataFlow2
18+ private import semmle.code.csharp.dataflow.TaintTracking2
1719
1820 /**
1921 * Holds if there is tainted flow from `source` to `sink` that may lead to a
@@ -24,7 +26,7 @@ module XSS {
2426 predicate xssFlow ( XssNode source , XssNode sink , string message ) {
2527 // standard taint-tracking
2628 exists (
27- TaintTrackingConfiguration c , DataFlow :: PathNode sourceNode , DataFlow :: PathNode sinkNode
29+ TaintTrackingConfiguration c , DataFlow2 :: PathNode sourceNode , DataFlow2 :: PathNode sinkNode
2830 |
2931 sourceNode = source .asDataFlowNode ( ) and
3032 sinkNode = sink .asDataFlowNode ( ) and
@@ -46,7 +48,7 @@ module XSS {
4648
4749 module PathGraph {
4850 query predicate edges ( XssNode pred , XssNode succ ) {
49- exists ( DataFlow :: PathNode a , DataFlow :: PathNode b | DataFlow :: PathGraph:: edges ( a , b ) |
51+ exists ( DataFlow2 :: PathNode a , DataFlow2 :: PathNode b | DataFlow2 :: PathGraph:: edges ( a , b ) |
5052 pred .asDataFlowNode ( ) = a and
5153 succ .asDataFlowNode ( ) = b
5254 )
@@ -57,7 +59,7 @@ module XSS {
5759 }
5860
5961 private newtype TXssNode =
60- TXssDataFlowNode ( DataFlow :: PathNode node ) or
62+ TXssDataFlowNode ( DataFlow2 :: PathNode node ) or
6163 TXssAspNode ( AspInlineMember m )
6264
6365 /**
@@ -73,20 +75,20 @@ module XSS {
7375 Location getLocation ( ) { none ( ) }
7476
7577 /** Gets the data flow node corresponding to this node, if any. */
76- DataFlow :: PathNode asDataFlowNode ( ) { result = this .( XssDataFlowNode ) .getDataFlowNode ( ) }
78+ DataFlow2 :: PathNode asDataFlowNode ( ) { result = this .( XssDataFlowNode ) .getDataFlowNode ( ) }
7779
7880 /** Gets the ASP inline code element corresponding to this node, if any. */
7981 AspInlineMember asAspInlineMember ( ) { result = this .( XssAspNode ) .getAspInlineMember ( ) }
8082 }
8183
8284 /** A data flow node, viewed as an XSS flow node. */
8385 class XssDataFlowNode extends TXssDataFlowNode , XssNode {
84- DataFlow :: PathNode node ;
86+ DataFlow2 :: PathNode node ;
8587
8688 XssDataFlowNode ( ) { this = TXssDataFlowNode ( node ) }
8789
8890 /** Gets the data flow node corresponding to this node. */
89- DataFlow :: PathNode getDataFlowNode ( ) { result = node }
91+ DataFlow2 :: PathNode getDataFlowNode ( ) { result = node }
9092
9193 override string toString ( ) { result = node .toString ( ) }
9294
@@ -130,7 +132,7 @@ module XSS {
130132 /**
131133 * A taint-tracking configuration for cross-site scripting (XSS) vulnerabilities.
132134 */
133- class TaintTrackingConfiguration extends TaintTracking :: Configuration {
135+ class TaintTrackingConfiguration extends TaintTracking2 :: Configuration {
134136 TaintTrackingConfiguration ( ) { this = "XSSDataFlowConfiguration" }
135137
136138 override predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
0 commit comments