github-advanced-security[bot] commented on code in PR #35:
URL:
https://github.com/apache/sling-org-apache-sling-feature/pull/35#discussion_r1888122876
##########
src/main/java/org/apache/sling/feature/io/artifacts/ArtifactManagerConfig.java:
##########
@@ -179,4 +193,35 @@
String getMvnHome() {
return this.repoHome;
}
+
+ /**
+ * Get the .m2 directory for the current user.
+ * If a ~/.m2/settings.xml exists, it is checked for a localRepository
configuration.
+ * Otherwise ~/.m2/repository is used as default value.
+ * @return Maven repository directory
+ */
+ private static final String getMvnRepositoryDirectory() {
+ String mavenDirectory = System.getProperty("user.home") + "/.m2";
+ File settings = new File(mavenDirectory, "settings.xml");
+ if (settings.exists()) {
+ try {
+ DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
Review Comment:
## XML parsers should not be vulnerable to XXE attacks
<!--SONAR_ISSUE_KEY:AZPTzh4wmHlKacE4ZkbW-->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-feature&issues=AZPTzh4wmHlKacE4ZkbW&open=AZPTzh4wmHlKacE4ZkbW&pullRequest=35">SonarQube
Cloud</a></p>
[Show more
details](https://github.com/apache/sling-org-apache-sling-feature/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]