@@ -12,7 +12,6 @@ private module Frameworks {
1212 private import semmle.code.java.frameworks.javase.Beans
1313 private import semmle.code.java.frameworks.mdht.MdhtXml
1414 private import semmle.code.java.frameworks.rundeck.RundeckXml
15- private import semmle.code.java.frameworks.woodstox.WoodstoxXml
1615}
1716
1817/**
@@ -180,12 +179,29 @@ class XmlInputFactory extends RefType {
180179 XmlInputFactory ( ) { this .hasQualifiedName ( javaxOrJakarta ( ) + ".xml.stream" , "XMLInputFactory" ) }
181180}
182181
183- /** A call to `XMLInputFactory.createXMLStreamReader`. */
182+ /**
183+ * The class `com.ctc.wstx.stax.WstxInputFactory` or its abstract supertype
184+ * `org.codehaus.stax2.XMLInputFactory2` from the Woodstox StAX library.
185+ */
186+ class WstxInputFactory extends RefType {
187+ WstxInputFactory ( ) {
188+ this .hasQualifiedName ( "com.ctc.wstx.stax" , "WstxInputFactory" ) or
189+ this .hasQualifiedName ( "org.codehaus.stax2" , "XMLInputFactory2" )
190+ }
191+ }
192+
193+ /**
194+ * A call to `XMLInputFactory.createXMLStreamReader` or the equivalent method on the
195+ * Woodstox `WstxInputFactory`.
196+ */
184197class XmlInputFactoryStreamReader extends XmlParserCall {
185198 XmlInputFactoryStreamReader ( ) {
186199 exists ( Method m |
187200 this .getMethod ( ) = m and
188- m .getDeclaringType ( ) instanceof XmlInputFactory and
201+ (
202+ m .getDeclaringType ( ) instanceof XmlInputFactory or
203+ m .getDeclaringType ( ) instanceof WstxInputFactory
204+ ) and
189205 m .hasName ( "createXMLStreamReader" )
190206 )
191207 }
@@ -213,7 +229,10 @@ class XmlInputFactoryEventReader extends XmlParserCall {
213229 XmlInputFactoryEventReader ( ) {
214230 exists ( Method m |
215231 this .getMethod ( ) = m and
216- m .getDeclaringType ( ) instanceof XmlInputFactory and
232+ (
233+ m .getDeclaringType ( ) instanceof XmlInputFactory or
234+ m .getDeclaringType ( ) instanceof WstxInputFactory
235+ ) and
217236 m .hasName ( "createXMLEventReader" )
218237 )
219238 }
@@ -236,7 +255,10 @@ class XmlInputFactoryConfig extends ParserConfig {
236255 XmlInputFactoryConfig ( ) {
237256 exists ( Method m |
238257 m = this .getMethod ( ) and
239- m .getDeclaringType ( ) instanceof XmlInputFactory and
258+ (
259+ m .getDeclaringType ( ) instanceof XmlInputFactory or
260+ m .getDeclaringType ( ) instanceof WstxInputFactory
261+ ) and
240262 m .hasName ( "setProperty" )
241263 )
242264 }
0 commit comments