Skip to content

Commit c292984

Browse files
committed
feat: add MaD to XSS query
1 parent cafc67e commit c292984

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
private import python
88
private import semmle.python.dataflow.new.DataFlow
99
private import semmle.python.Concepts
10+
private import semmle.python.frameworks.data.ModelsAsData
1011
private import semmle.python.dataflow.new.RemoteFlowSources
1112
private import semmle.python.dataflow.new.BarrierGuards
1213

@@ -43,6 +44,13 @@ module ReflectedXss {
4344
*/
4445
class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { }
4546

47+
/**
48+
* A data flow sink for "reflected cross-site scripting" vulnerabilities.
49+
*/
50+
private class DefaultReflectedXss extends Sink {
51+
DefaultReflectedXss() { this = ModelOutput::getASourceNode(["html-injection", "js-injection"]).asSource() }
52+
}
53+
4654
/**
4755
* The body of a HTTP response that will be returned from a server, considered as a flow sink.
4856
*/

0 commit comments

Comments
 (0)