File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
semmle/code/java/security Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ class XSSConfig extends TaintTracking::Configuration {
25
25
26
26
override predicate isSanitizer ( DataFlow:: Node node ) { node instanceof XssSanitizer }
27
27
28
+ override predicate isSanitizerOut ( DataFlow:: Node node ) { node instanceof XssSinkBarrier }
29
+
28
30
override predicate isAdditionalTaintStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
29
31
any ( XssAdditionalTaintStep s ) .step ( node1 , node2 )
30
32
}
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ abstract class XssSink extends DataFlow::Node { }
15
15
/** A sanitizer that neutralizes dangerous characters that can be used to perform a XSS attack. */
16
16
abstract class XssSanitizer extends DataFlow:: Node { }
17
17
18
+ /**
19
+ * A sink that represent a method that outputs data without applying contextual output encoding,
20
+ * and which should truncate flow paths such that downstream sinks are not flagged as well.
21
+ */
22
+ abstract class XssSinkBarrier extends XssSink { }
23
+
18
24
/**
19
25
* A unit class for adding additional taint steps.
20
26
*
You can’t perform that action at this time.
0 commit comments