@@ -81,7 +81,9 @@ class XercesDOMParserFlowState extends XXEFlowState {
8181}
8282
8383/**
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.
8587 */
8688class DisableDefaultEntityResolutionTranformer extends XXEFlowStateTranformer {
8789 Expr newValue ;
@@ -111,7 +113,9 @@ class DisableDefaultEntityResolutionTranformer extends XXEFlowStateTranformer {
111113}
112114
113115/**
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.
115119 */
116120class CreateEntityReferenceNodesTranformer extends XXEFlowStateTranformer {
117121 Expr newValue ;
@@ -151,13 +155,13 @@ class ParseFunction extends Function {
151155}
152156
153157/**
154- * Configuration for tracking Xerces library XML objects and their states.
158+ * Configuration for tracking XML objects and their states.
155159 */
156- class XercesXXEConfiguration extends DataFlow:: Configuration {
157- XercesXXEConfiguration ( ) { this = "XercesXXEConfiguration " }
160+ class XXEConfiguration extends DataFlow:: Configuration {
161+ XXEConfiguration ( ) { this = "XXEConfiguration " }
158162
159163 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`
161165 // constructor.
162166 exists ( CallInstruction call |
163167 call .getStaticCallTarget ( ) = any ( XercesDOMParserClass c ) .getAConstructor ( ) and
@@ -192,7 +196,7 @@ class XercesXXEConfiguration extends DataFlow::Configuration {
192196 }
193197}
194198
195- from XercesXXEConfiguration conf , DataFlow:: PathNode source , DataFlow:: PathNode sink
199+ from XXEConfiguration conf , DataFlow:: PathNode source , DataFlow:: PathNode sink
196200where conf .hasFlowPath ( source , sink )
197201select sink , source , sink ,
198202 "This $@ is not configured to prevent an External Entity Expansion (XXE) attack." , source ,
0 commit comments