cntigers commented on code in PR #15950:
URL: 
https://github.com/apache/dolphinscheduler/pull/15950#discussion_r1591693573


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-pytorch/src/test/java/org/apache/dolphinscheduler/plugin/task/pytorch/PytorchTaskTest.java:
##########
@@ -72,6 +72,12 @@ public void testPythonEnvManager() {
 
     }
 
+    @Test
+    public void testGitProjectUrlInjection(){
+        Assertions.assertFalse(GitProjectManager.isGitPath("git@& cat 
/etc/passwd >/poc.txt #"));
+        Assertions.assertFalse(GitProjectManager.isGitPath("git@| cat 
/etc/passwd >/poc.txt #"));

Review Comment:
   > Please add a positive case which will return true.
   
   Thank you for your reminder. I found that there are already positive test 
cases during testing @ruanwenjun 
   
    [exists test 
cases](https://github.com/apache/dolphinscheduler/blob/d218b021e7e045e7982a3c91ea7b1b1491d21d38/dolphinscheduler-task-plugin/dolphinscheduler-task-pytorch/src/test/java/org/apache/dolphinscheduler/plugin/task/pytorch/PytorchTaskTest.java#L76)
   



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