github-advanced-security[bot] commented on code in PR #5239:
URL: https://github.com/apache/calcite/pull/5239#discussion_r3912394374


##########
spark/src/main/java/org/apache/calcite/adapter/spark/SparkHandlerImpl.java:
##########
@@ -55,13 +57,19 @@
     private static final SparkHandlerImpl INSTANCE = new SparkHandlerImpl();
   }
 
-  private static final File CLASS_DIR = new File("build/sparkServer/classes");
+  private static final File CLASS_DIR = createClassDir();
+
+  private static File createClassDir() {
+    try {
+      return Files.createTempDirectory("calcite-spark-classes").toFile();

Review Comment:
   ## SonarCloud / Temporary files should not be created in publicly writable 
directories
   
   <!--SONAR_ISSUE_KEY:AaBhU60Wufz1cTuckEHp-->Make sure publicly writable 
directories are used safely here. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_calcite&issues=AaBhU60Wufz1cTuckEHp&open=AaBhU60Wufz1cTuckEHp&pullRequest=5239";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/calcite/security/code-scanning/177)



-- 
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