File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,10 @@ private class DefaultXPathInjectionSink extends XPathInjectionSink {
2727 )
2828 }
2929}
30+
31+ /** A sanitizer for XPath injection. */
32+ abstract class XPathInjectionSanitizer extends DataFlow:: Node { }
33+
34+ private class ExternalXPathInjectionSanitizer extends XPathInjectionSanitizer {
35+ ExternalXPathInjectionSanitizer ( ) { barrierNode ( this , "xpath-injection" ) }
36+ }
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ module XPathInjectionConfig implements DataFlow::ConfigSig {
1313
1414 predicate isSink ( DataFlow:: Node sink ) { sink instanceof XPathInjectionSink }
1515
16+ predicate isBarrier ( DataFlow:: Node node ) { node instanceof XPathInjectionSanitizer }
17+
1618 predicate observeDiffInformedIncrementalMode ( ) { any ( ) }
1719}
1820
You can’t perform that action at this time.
0 commit comments