mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
26 lines
657 B
Plaintext
26 lines
657 B
Plaintext
/**
|
|
* @kind path-problem
|
|
*/
|
|
|
|
import csharp
|
|
import semmle.code.csharp.security.dataflow.XSSQuery
|
|
import semmle.code.csharp.security.dataflow.XSSSinks
|
|
|
|
module TestXssTrackingConfig implements DataFlow::ConfigSig {
|
|
predicate isSource(DataFlow::Node source) {
|
|
source.asExpr().(MethodCall).getTarget().getName() = "source"
|
|
}
|
|
|
|
predicate isSink = XssTrackingConfig::isSink/1;
|
|
|
|
predicate isBarrier = XssTrackingConfig::isBarrier/1;
|
|
}
|
|
|
|
module TestXss = TaintTracking::Global<TestXssTrackingConfig>;
|
|
|
|
import TestXss::PathGraph
|
|
|
|
from TestXss::PathNode source, TestXss::PathNode sink
|
|
where TestXss::flowPath(source, sink)
|
|
select sink, source, sink, "Xss"
|