Executing command not escape double quote

This issue is archived. You can view it, but you can't modify it. Learn more

      I'm using Kubernetes Plugin to spin up Jenkins Slave to do Deep Security Smart Check. There is one line that show below debug output

      Executing command: "docker" "run" "-i" "--rm" "--read-only" "--cap-drop" "ALL" "-e" "DSSC_SMARTCHECK_HOST=smartcheck.example.com" "-e" "DSSC_IMAGE_NAME=registry.example.com/bookinfo/productpage:dev" "-e" "DSSC_SMARTCHECK_USER=administrator" "-e" "DSSC_SMARTCHECK_PASSWORD=CHANGEME" "-e" "DSSC_IMAGE_PULL_AUTH={"username":"admin","password":"CHANGEME"}" "deepsecurity/smartcheck-scan-action"
      

      Please focus on DSSC_IMAGE_PULL_AUTH that value is JSON object. You will find this command execution error because there is no escape on double quote. Plugin author find out that this line wrap double quote but no escaping https://github.com/jenkinsci/kubernetes-plugin/blob/613e0f3f54c3d5428e4a2beeb77bd01a2d2fc266/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecorator.java#L630

      Please advice. You can see all discussion about this bug here
      https://github.com/jenkinsci/deepsecurity-smartcheck-plugin/issues/3#issue-625554085

            Assignee:
            Vincent Latombe
            Reporter:
            Jirayut Nimsaeng
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: