You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "XianXianwang (Jira)" <ji...@apache.org> on 2024/11/26 02:36:00 UTC

[jira] [Commented] (SPARK-50271) Spark App executes unintended commands

    [ https://issues.apache.org/jira/browse/SPARK-50271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17901067#comment-17901067 ] 

XianXianwang commented on SPARK-50271:
--------------------------------------

Spark submits it to Yarn for execution, in this case does Spark need to intercept the malicious command, after all for Yarn Spark is the input.

> Spark App executes unintended commands
> --------------------------------------
>
>                 Key: SPARK-50271
>                 URL: https://issues.apache.org/jira/browse/SPARK-50271
>             Project: Spark
>          Issue Type: Improvement
>          Components: YARN
>    Affects Versions: 3.5.3
>            Reporter: XianXianwang
>            Priority: Minor
>
> Spark commits a task and Yarn executes the command directly using bash -c, if the commit contains ``` it will execute the statement directly, this has some impact on Yarn, does Saprk need to intercept this case
> hadoop ContainerExecutor.java
> {code:java}
> ContainerLaunch.ShellScriptBuilder sb =
>     ContainerLaunch.ShellScriptBuilder.create();
> ...
> sb.command(command);
> PrintStream pout = null;
> try {
>   pout = new PrintStream(out, false, "UTF-8");
>   sb.write(pout);
> } finally {
>   if (out != null) {
>     out.close();
>   }
> }{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org