Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62208

sshGet (scp mode) is showing the entire contents of the file in console output log

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • ssh-steps-plugin
    • Jenkins ver. 2.190.3 on Windows 2012 with ssh versions below.
      ssh 2.6.1
      ssh-agent 1.17
      ssh-credentials 1.18
      ssh-steps 2.0.0

      I sent this to the mailing list and was advised that it might be a bug and to open a Jira ticket:

      When executing the following in a scripted pipeline:
       
      sshGet remote: soc_remote, from: "/srv/jboss/server/${MAL}/log/${sourcefile}", into: FileName, override: true
       
      The file is downloaded successfully from the remote server into the local directory on the Jenkins server.  However, the console output shows the contents of that file in its entirety, and the logs files in the build folder also contains the contents of the file.  The file is embedded within the rest of the log entries, and is not usable.  Therefore when I am downloading large files with sshGet, I end up consuming twice the space I should be, since I have a log file roughly the size of the file, and then the file itself which was downloaded.  
       
      This is not only a space issue, but also a security issue, since sometimes I am downloading files with sensitive information in them and don't want those details available in the jenkins logs.

        1. sftp-failed.txt
          0.7 kB
        2. scp-success.txt
          0.4 kB
        3. pipeline.txt
          1 kB
        4. consoletext.txt
          1 kB

            nrayapati Naresh Rayapati
            craigw Craig Webster
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: