File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
semmle/code/java/security Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 15
15
import java
16
16
import semmle.code.java.dataflow.DataFlow
17
17
import semmle.code.java.dataflow.TaintTracking
18
- import semmle.code.java.security.XSS
19
18
import semmle.code.java.security.InformationLeak
20
19
21
20
/**
@@ -91,10 +90,7 @@ class StackTraceStringToHTTPResponseSinkFlowConfig extends TaintTracking::Config
91
90
92
91
override predicate isSource ( DataFlow:: Node src ) { stackTraceExpr ( _, src .asExpr ( ) ) }
93
92
94
- override predicate isSink ( DataFlow:: Node sink ) {
95
- sink instanceof XssSink or
96
- sink instanceof InformationLeakSink
97
- }
93
+ override predicate isSink ( DataFlow:: Node sink ) { sink instanceof InformationLeakSink }
98
94
}
99
95
100
96
/**
@@ -134,10 +130,7 @@ class GetMessageFlowSourceToHTTPResponseSinkFlowConfig extends TaintTracking::Co
134
130
135
131
override predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof GetMessageFlowSource }
136
132
137
- override predicate isSink ( DataFlow:: Node sink ) {
138
- sink instanceof XssSink or
139
- sink instanceof InformationLeakSink
140
- }
133
+ override predicate isSink ( DataFlow:: Node sink ) { sink instanceof InformationLeakSink }
141
134
}
142
135
143
136
/**
Original file line number Diff line number Diff line change 3
3
import java
4
4
import semmle.code.java.dataflow.DataFlow
5
5
import semmle.code.java.dataflow.ExternalFlow
6
+ import semmle.code.java.security.XSS
6
7
7
8
/** CSV sink models representing methods not susceptible to XSS but outputing to an HTTP response body. */
8
9
private class DefaultInformationLeakSinkModel extends SinkModelCsv {
@@ -19,5 +20,8 @@ abstract class InformationLeakSink extends DataFlow::Node { }
19
20
20
21
/** A default sink representing methods outputing data to an HTTP response. */
21
22
private class DefaultInformationLeakSink extends InformationLeakSink {
22
- DefaultInformationLeakSink ( ) { sinkNode ( this , "information-leak" ) }
23
+ DefaultInformationLeakSink ( ) {
24
+ sinkNode ( this , "information-leak" ) or
25
+ this instanceof XssSink
26
+ }
23
27
}
You can’t perform that action at this time.
0 commit comments