github-advanced-security[bot] commented on code in PR #47:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/47#discussion_r1876333684


##########
core/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java:
##########
@@ -225,7 +211,10 @@
 
     private static Document toXmlDocument(InputStream inputStream, String 
path) {
         try {
-            DocumentBuilder documentBuilder = 
DOCUMENT_BUILDER_FACTORY.newDocumentBuilder();
+            DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();

Review Comment:
   ## XML parsers should not be vulnerable to XXE attacks
   
   <!--SONAR_ISSUE_KEY:AZOsSM0fgwAyzDSRBp7h-->Disable access to external 
entities in XML parsing. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock&issues=AZOsSM0fgwAyzDSRBp7h&open=AZOsSM0fgwAyzDSRBp7h&pullRequest=47";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/security/code-scanning/2)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to