github-code-scanning[bot] commented on code in PR #13435:
URL: 
https://github.com/apache/dolphinscheduler/pull/13435#discussion_r1090152189


##########
dolphinscheduler-storage-plugin/dolphinscheduler-storage-s3/src/main/java/org/apache/dolphinscheduler/plugin/storage/s3/S3StorageOperator.java:
##########
@@ -409,34 +411,31 @@
     public List<StorageEntity> listFilesStatusRecursively(String path, String 
defaultPath, String tenantCode,
                                                           ResourceType type) {
         List<StorageEntity> storageEntityList = new ArrayList<>();
-
         LinkedList<StorageEntity> foldersToFetch = new LinkedList<>();
 
-        do {
-            String pathToExplore = "";
-            if (foldersToFetch.size() == 0) {
-                pathToExplore = path;
-            } else {
-                pathToExplore = foldersToFetch.pop().getFullName();
-            }
+        StorageEntity initialEntity = null;
+        try {
+            initialEntity = getFileStatus(path, defaultPath, tenantCode, type);
+        } catch (Exception e) {
+            logger.error("error while listing files status recursively, path: 
{}", path, e);

Review Comment:
   ## Log Injection
   
   This log entry depends on a [user-provided value](1).
   This log entry depends on a [user-provided value](2).
   
   [Show more 
details](https://github.com/apache/dolphinscheduler/security/code-scanning/2606)



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