@@ -81,7 +81,9 @@ class XercesDOMParserFlowState extends XXEFlowState {
81
81
}
82
82
83
83
/**
84
- * The qualifier of a call to `AbstractDOMParser.setDisableDefaultEntityResolution`.
84
+ * Flow state transformer for a call to
85
+ * `AbstractDOMParser.setDisableDefaultEntityResolution`. Transforms the flow
86
+ * state through the qualifier according to the setting in the parameter.
85
87
*/
86
88
class DisableDefaultEntityResolutionTranformer extends XXEFlowStateTranformer {
87
89
Expr newValue ;
@@ -111,7 +113,9 @@ class DisableDefaultEntityResolutionTranformer extends XXEFlowStateTranformer {
111
113
}
112
114
113
115
/**
114
- * The qualifier of a call to `AbstractDOMParser.setDisableDefaultEntityResolution`.
116
+ * Flow state transformer for a call to
117
+ * `AbstractDOMParser.setCreateEntityReferenceNodes`. Transforms the flow
118
+ * state through the qualifier according to the setting in the parameter.
115
119
*/
116
120
class CreateEntityReferenceNodesTranformer extends XXEFlowStateTranformer {
117
121
Expr newValue ;
@@ -151,13 +155,13 @@ class ParseFunction extends Function {
151
155
}
152
156
153
157
/**
154
- * Configuration for tracking Xerces library XML objects and their states.
158
+ * Configuration for tracking XML objects and their states.
155
159
*/
156
- class XercesXXEConfiguration extends DataFlow:: Configuration {
157
- XercesXXEConfiguration ( ) { this = "XercesXXEConfiguration " }
160
+ class XXEConfiguration extends DataFlow:: Configuration {
161
+ XXEConfiguration ( ) { this = "XXEConfiguration " }
158
162
159
163
override predicate isSource ( DataFlow:: Node node , string flowstate ) {
160
- // source is the write on `this` of a call to the XercesDOMParser
164
+ // source is the write on `this` of a call to the ` XercesDOMParser`
161
165
// constructor.
162
166
exists ( CallInstruction call |
163
167
call .getStaticCallTarget ( ) = any ( XercesDOMParserClass c ) .getAConstructor ( ) and
@@ -192,7 +196,7 @@ class XercesXXEConfiguration extends DataFlow::Configuration {
192
196
}
193
197
}
194
198
195
- from XercesXXEConfiguration conf , DataFlow:: PathNode source , DataFlow:: PathNode sink
199
+ from XXEConfiguration conf , DataFlow:: PathNode source , DataFlow:: PathNode sink
196
200
where conf .hasFlowPath ( source , sink )
197
201
select sink , source , sink ,
198
202
"This $@ is not configured to prevent an External Entity Expansion (XXE) attack." , source ,
0 commit comments