github-advanced-security[bot] commented on code in PR #16544:
URL: 
https://github.com/apache/dolphinscheduler/pull/16544#discussion_r1740500109


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java:
##########
@@ -306,57 +306,57 @@
     }
 
     /**
-     * do action to process instance: pause, stop, repeat, recover from pause, 
recover from stop
+     * do action to workflow instance: pause, stop, repeat, recover from 
pause, recover from stop
      */
     @Operation(summary = "execute", description = 
"EXECUTE_ACTION_TO_WORKFLOW_INSTANCE_NOTES")
     @Parameters({
-            @Parameter(name = "processInstanceId", description = 
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation = 
int.class, example = "100")),
+            @Parameter(name = "workflowInstanceId", description = 
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation = 
int.class, example = "100")),
             @Parameter(name = "executeType", description = "EXECUTE_TYPE", 
required = true, schema = @Schema(implementation = ExecuteType.class))
     })
     @PostMapping(value = "/execute")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(EXECUTE_WORKFLOW_INSTANCE_ERROR)
     @OperatorLog(auditType = AuditType.WORKFLOW_EXECUTE)
     public Result<Void> controlWorkflowInstance(@Parameter(hidden = true) 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
-                                                
@RequestParam("processInstanceId") Integer processInstanceId,
+                                                
@RequestParam("workflowInstanceId") Integer workflowInstanceId,
                                                 @RequestParam("executeType") 
ExecuteType executeType) {
-        execService.controlWorkflowInstance(loginUser, processInstanceId, 
executeType);
+        execService.controlWorkflowInstance(loginUser, workflowInstanceId, 
executeType);
         return Result.success();
     }
 
     /**
-     * batch execute and do action to process instance
+     * batch execute and do action to workflow instance
      *
      * @param loginUser          login user
-     * @param processInstanceIds process instance ids, delimiter by "," if 
more than one id
+     * @param workflowInstanceIds workflow instance ids, delimiter by "," if 
more than one id
      * @param executeType        execute type
      * @return execute result code
      */
     @Operation(summary = "batchExecute", description = 
"BATCH_EXECUTE_ACTION_TO_WORKFLOW_INSTANCE_NOTES")
     @Parameters({
             @Parameter(name = "projectCode", description = "PROJECT_CODE", 
required = true, schema = @Schema(implementation = int.class)),
-            @Parameter(name = "processInstanceIds", description = 
"PROCESS_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
+            @Parameter(name = "workflowInstanceIds", description = 
"WORKFLOW_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
             @Parameter(name = "executeType", description = "EXECUTE_TYPE", 
required = true, schema = @Schema(implementation = ExecuteType.class))
     })
     @PostMapping(value = "/batch-execute")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(BATCH_EXECUTE_WORKFLOW_INSTANCE_ERROR)
     @OperatorLog(auditType = AuditType.WORKFLOW_BATCH_RERUN)
     public Result<Void> batchControlWorkflowInstance(@RequestAttribute(value = 
Constants.SESSION_USER) User loginUser,
-                                                     
@RequestParam("processInstanceIds") String processInstanceIds,
+                                                     
@RequestParam("workflowInstanceIds") String workflowInstanceIds,
                                                      
@RequestParam("executeType") ExecuteType executeType) {
 
-        String[] processInstanceIdArray = 
processInstanceIds.split(Constants.COMMA);
+        String[] workflowInstanceIdArray = 
workflowInstanceIds.split(Constants.COMMA);
         List<String> errorMessage = new ArrayList<>();
-        for (String strProcessInstanceId : processInstanceIdArray) {
-            int processInstanceId = Integer.parseInt(strProcessInstanceId);
+        for (String strWorkflowInstanceId : workflowInstanceIdArray) {
+            int workflowInstanceId = Integer.parseInt(strWorkflowInstanceId);

Review Comment:
   ## Missing catch of NumberFormatException
   
   Potential uncaught 'java.lang.NumberFormatException'.
   
   [Show more 
details](https://github.com/apache/dolphinscheduler/security/code-scanning/4850)



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/DagDataSchedule.java:
##########
@@ -20,31 +20,23 @@
 import org.apache.dolphinscheduler.dao.entity.DagData;
 import org.apache.dolphinscheduler.dao.entity.Schedule;
 
-/**
- * DagDataSchedule
- */
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)

Review Comment:
   ## Missing Override annotation
   
   This method overrides [DagData.canEqual](1); it is advisable to add an 
Override annotation.
   
   [Show more 
details](https://github.com/apache/dolphinscheduler/security/code-scanning/4848)



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java:
##########
@@ -306,57 +306,57 @@
     }
 
     /**
-     * do action to process instance: pause, stop, repeat, recover from pause, 
recover from stop
+     * do action to workflow instance: pause, stop, repeat, recover from 
pause, recover from stop
      */
     @Operation(summary = "execute", description = 
"EXECUTE_ACTION_TO_WORKFLOW_INSTANCE_NOTES")
     @Parameters({
-            @Parameter(name = "processInstanceId", description = 
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation = 
int.class, example = "100")),
+            @Parameter(name = "workflowInstanceId", description = 
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation = 
int.class, example = "100")),
             @Parameter(name = "executeType", description = "EXECUTE_TYPE", 
required = true, schema = @Schema(implementation = ExecuteType.class))
     })
     @PostMapping(value = "/execute")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(EXECUTE_WORKFLOW_INSTANCE_ERROR)
     @OperatorLog(auditType = AuditType.WORKFLOW_EXECUTE)
     public Result<Void> controlWorkflowInstance(@Parameter(hidden = true) 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
-                                                
@RequestParam("processInstanceId") Integer processInstanceId,
+                                                
@RequestParam("workflowInstanceId") Integer workflowInstanceId,
                                                 @RequestParam("executeType") 
ExecuteType executeType) {
-        execService.controlWorkflowInstance(loginUser, processInstanceId, 
executeType);
+        execService.controlWorkflowInstance(loginUser, workflowInstanceId, 
executeType);
         return Result.success();
     }
 
     /**
-     * batch execute and do action to process instance
+     * batch execute and do action to workflow instance
      *
      * @param loginUser          login user
-     * @param processInstanceIds process instance ids, delimiter by "," if 
more than one id
+     * @param workflowInstanceIds workflow instance ids, delimiter by "," if 
more than one id
      * @param executeType        execute type
      * @return execute result code
      */
     @Operation(summary = "batchExecute", description = 
"BATCH_EXECUTE_ACTION_TO_WORKFLOW_INSTANCE_NOTES")
     @Parameters({
             @Parameter(name = "projectCode", description = "PROJECT_CODE", 
required = true, schema = @Schema(implementation = int.class)),
-            @Parameter(name = "processInstanceIds", description = 
"PROCESS_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
+            @Parameter(name = "workflowInstanceIds", description = 
"WORKFLOW_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
             @Parameter(name = "executeType", description = "EXECUTE_TYPE", 
required = true, schema = @Schema(implementation = ExecuteType.class))
     })
     @PostMapping(value = "/batch-execute")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(BATCH_EXECUTE_WORKFLOW_INSTANCE_ERROR)
     @OperatorLog(auditType = AuditType.WORKFLOW_BATCH_RERUN)
     public Result<Void> batchControlWorkflowInstance(@RequestAttribute(value = 
Constants.SESSION_USER) User loginUser,
-                                                     
@RequestParam("processInstanceIds") String processInstanceIds,
+                                                     
@RequestParam("workflowInstanceIds") String workflowInstanceIds,
                                                      
@RequestParam("executeType") ExecuteType executeType) {
 
-        String[] processInstanceIdArray = 
processInstanceIds.split(Constants.COMMA);
+        String[] workflowInstanceIdArray = 
workflowInstanceIds.split(Constants.COMMA);
         List<String> errorMessage = new ArrayList<>();
-        for (String strProcessInstanceId : processInstanceIdArray) {
-            int processInstanceId = Integer.parseInt(strProcessInstanceId);
+        for (String strWorkflowInstanceId : workflowInstanceIdArray) {
+            int workflowInstanceId = Integer.parseInt(strWorkflowInstanceId);
             try {
-                execService.controlWorkflowInstance(loginUser, 
processInstanceId, executeType);
-                log.info("Success do action {} on workflowInstance: {}", 
executeType, processInstanceId);
+                execService.controlWorkflowInstance(loginUser, 
workflowInstanceId, executeType);
+                log.info("Success do action {} on workflowInstance: {}", 
executeType, workflowInstanceId);

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



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java:
##########
@@ -306,57 +306,57 @@
     }
 
     /**
-     * do action to process instance: pause, stop, repeat, recover from pause, 
recover from stop
+     * do action to workflow instance: pause, stop, repeat, recover from 
pause, recover from stop
      */
     @Operation(summary = "execute", description = 
"EXECUTE_ACTION_TO_WORKFLOW_INSTANCE_NOTES")
     @Parameters({
-            @Parameter(name = "processInstanceId", description = 
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation = 
int.class, example = "100")),
+            @Parameter(name = "workflowInstanceId", description = 
"WORKFLOW_INSTANCE_ID", required = true, schema = @Schema(implementation = 
int.class, example = "100")),
             @Parameter(name = "executeType", description = "EXECUTE_TYPE", 
required = true, schema = @Schema(implementation = ExecuteType.class))
     })
     @PostMapping(value = "/execute")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(EXECUTE_WORKFLOW_INSTANCE_ERROR)
     @OperatorLog(auditType = AuditType.WORKFLOW_EXECUTE)
     public Result<Void> controlWorkflowInstance(@Parameter(hidden = true) 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
-                                                
@RequestParam("processInstanceId") Integer processInstanceId,
+                                                
@RequestParam("workflowInstanceId") Integer workflowInstanceId,
                                                 @RequestParam("executeType") 
ExecuteType executeType) {
-        execService.controlWorkflowInstance(loginUser, processInstanceId, 
executeType);
+        execService.controlWorkflowInstance(loginUser, workflowInstanceId, 
executeType);
         return Result.success();
     }
 
     /**
-     * batch execute and do action to process instance
+     * batch execute and do action to workflow instance
      *
      * @param loginUser          login user
-     * @param processInstanceIds process instance ids, delimiter by "," if 
more than one id
+     * @param workflowInstanceIds workflow instance ids, delimiter by "," if 
more than one id
      * @param executeType        execute type
      * @return execute result code
      */
     @Operation(summary = "batchExecute", description = 
"BATCH_EXECUTE_ACTION_TO_WORKFLOW_INSTANCE_NOTES")
     @Parameters({
             @Parameter(name = "projectCode", description = "PROJECT_CODE", 
required = true, schema = @Schema(implementation = int.class)),
-            @Parameter(name = "processInstanceIds", description = 
"PROCESS_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
+            @Parameter(name = "workflowInstanceIds", description = 
"WORKFLOW_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
             @Parameter(name = "executeType", description = "EXECUTE_TYPE", 
required = true, schema = @Schema(implementation = ExecuteType.class))
     })
     @PostMapping(value = "/batch-execute")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(BATCH_EXECUTE_WORKFLOW_INSTANCE_ERROR)
     @OperatorLog(auditType = AuditType.WORKFLOW_BATCH_RERUN)
     public Result<Void> batchControlWorkflowInstance(@RequestAttribute(value = 
Constants.SESSION_USER) User loginUser,
-                                                     
@RequestParam("processInstanceIds") String processInstanceIds,
+                                                     
@RequestParam("workflowInstanceIds") String workflowInstanceIds,
                                                      
@RequestParam("executeType") ExecuteType executeType) {
 
-        String[] processInstanceIdArray = 
processInstanceIds.split(Constants.COMMA);
+        String[] workflowInstanceIdArray = 
workflowInstanceIds.split(Constants.COMMA);
         List<String> errorMessage = new ArrayList<>();
-        for (String strProcessInstanceId : processInstanceIdArray) {
-            int processInstanceId = Integer.parseInt(strProcessInstanceId);
+        for (String strWorkflowInstanceId : workflowInstanceIdArray) {
+            int workflowInstanceId = Integer.parseInt(strWorkflowInstanceId);
             try {
-                execService.controlWorkflowInstance(loginUser, 
processInstanceId, executeType);
-                log.info("Success do action {} on workflowInstance: {}", 
executeType, processInstanceId);
+                execService.controlWorkflowInstance(loginUser, 
workflowInstanceId, executeType);
+                log.info("Success do action {} on workflowInstance: {}", 
executeType, workflowInstanceId);
             } catch (Exception e) {
-                errorMessage.add("Failed do action " + executeType + " on 
workflowInstance: " + processInstanceId
+                errorMessage.add("Failed do action " + executeType + " on 
workflowInstance: " + workflowInstanceId
                         + "reason: " + e.getMessage());
-                log.error("Failed do action {} on workflowInstance: {}, error: 
{}", executeType, processInstanceId, e);
+                log.error("Failed do action {} on workflowInstance: {}, error: 
{}", executeType, workflowInstanceId, e);

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



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/taskInstance/TaskInstanceQueryRequest.java:
##########
@@ -30,19 +31,20 @@
 /**
  * task instance request
  */
+@EqualsAndHashCode(callSuper = true)

Review Comment:
   ## Missing Override annotation
   
   This method overrides [PageQueryDto.canEqual](1); it is advisable to add an 
Override annotation.
   
   [Show more 
details](https://github.com/apache/dolphinscheduler/security/code-scanning/4849)



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkflowInstanceController.java:
##########
@@ -381,35 +382,35 @@
      *
      * @param loginUser login user
      * @param projectCode project code
-     * @param processInstanceIds workflow instance id
+     * @param workflowInstanceIds workflow instance id
      * @return delete result code
      */
     @Operation(summary = "batchDeleteWorkflowInstanceByIds", description = 
"BATCH_DELETE_WORKFLOW_INSTANCE_BY_IDS_NOTES")
     @Parameters({
             @Parameter(name = "projectCode", description = "PROJECT_CODE", 
required = true, schema = @Schema(implementation = int.class)),
-            @Parameter(name = "processInstanceIds", description = 
"PROCESS_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
+            @Parameter(name = "workflowInstanceIds", description = 
"WORKFLOW_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
     })
     @PostMapping(value = "/batch-delete")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(Status.BATCH_DELETE_WORKFLOW_INSTANCE_BY_IDS_ERROR)
     @OperatorLog(auditType = AuditType.WORKFLOW_INSTANCE_BATCH_DELETE)
     public Result batchDeleteWorkflowInstanceByIds(@RequestAttribute(value = 
Constants.SESSION_USER) User loginUser,
                                                    @PathVariable long 
projectCode,
-                                                   
@RequestParam("processInstanceIds") String processInstanceIds) {
+                                                   
@RequestParam("workflowInstanceIds") String workflowInstanceIds) {
         // task queue
         Map<String, Object> result = new HashMap<>();
         List<String> deleteFailedIdList = new ArrayList<>();
-        if (!StringUtils.isEmpty(processInstanceIds)) {
-            String[] processInstanceIdArray = 
processInstanceIds.split(Constants.COMMA);
+        if (!StringUtils.isEmpty(workflowInstanceIds)) {
+            String[] workflowInstanceIdArray = 
workflowInstanceIds.split(Constants.COMMA);
 
-            for (String strProcessInstanceId : processInstanceIdArray) {
-                int processInstanceId = Integer.parseInt(strProcessInstanceId);
+            for (String strWorkflowInstanceId : workflowInstanceIdArray) {
+                int workflowInstanceId = 
Integer.parseInt(strWorkflowInstanceId);
                 try {
-                    
workflowInstanceService.deleteWorkflowInstanceById(loginUser, 
processInstanceId);
+                    
workflowInstanceService.deleteWorkflowInstanceById(loginUser, 
workflowInstanceId);
                 } catch (Exception e) {
-                    log.error("Delete workflow instance: {} error", 
strProcessInstanceId, e);
+                    log.error("Delete workflow instance: {} error", 
strWorkflowInstanceId, e);

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



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkflowInstanceController.java:
##########
@@ -381,35 +382,35 @@
      *
      * @param loginUser login user
      * @param projectCode project code
-     * @param processInstanceIds workflow instance id
+     * @param workflowInstanceIds workflow instance id
      * @return delete result code
      */
     @Operation(summary = "batchDeleteWorkflowInstanceByIds", description = 
"BATCH_DELETE_WORKFLOW_INSTANCE_BY_IDS_NOTES")
     @Parameters({
             @Parameter(name = "projectCode", description = "PROJECT_CODE", 
required = true, schema = @Schema(implementation = int.class)),
-            @Parameter(name = "processInstanceIds", description = 
"PROCESS_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
+            @Parameter(name = "workflowInstanceIds", description = 
"WORKFLOW_INSTANCE_IDS", required = true, schema = @Schema(implementation = 
String.class)),
     })
     @PostMapping(value = "/batch-delete")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(Status.BATCH_DELETE_WORKFLOW_INSTANCE_BY_IDS_ERROR)
     @OperatorLog(auditType = AuditType.WORKFLOW_INSTANCE_BATCH_DELETE)
     public Result batchDeleteWorkflowInstanceByIds(@RequestAttribute(value = 
Constants.SESSION_USER) User loginUser,
                                                    @PathVariable long 
projectCode,
-                                                   
@RequestParam("processInstanceIds") String processInstanceIds) {
+                                                   
@RequestParam("workflowInstanceIds") String workflowInstanceIds) {
         // task queue
         Map<String, Object> result = new HashMap<>();
         List<String> deleteFailedIdList = new ArrayList<>();
-        if (!StringUtils.isEmpty(processInstanceIds)) {
-            String[] processInstanceIdArray = 
processInstanceIds.split(Constants.COMMA);
+        if (!StringUtils.isEmpty(workflowInstanceIds)) {
+            String[] workflowInstanceIdArray = 
workflowInstanceIds.split(Constants.COMMA);
 
-            for (String strProcessInstanceId : processInstanceIdArray) {
-                int processInstanceId = Integer.parseInt(strProcessInstanceId);
+            for (String strWorkflowInstanceId : workflowInstanceIdArray) {
+                int workflowInstanceId = 
Integer.parseInt(strWorkflowInstanceId);

Review Comment:
   ## Missing catch of NumberFormatException
   
   Potential uncaught 'java.lang.NumberFormatException'.
   
   [Show more 
details](https://github.com/apache/dolphinscheduler/security/code-scanning/4851)



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