You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "ruanwenjun (via GitHub)" <gi...@apache.org> on 2024/05/06 11:24:27 UTC

Re: [PR] [Improvement] fix the git url command injection(#15873) [dolphinscheduler]

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


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



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org