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

Broken output when secret text starts with whitespace

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Operating System: Host=macOS 10.13.6 Guest=jenkinsci/blueocean on Docker
      Plugin: Credentials Binding Plugin v1.16
    • Similar Issues:

      Description

      I found credentials-binding-plugin prints raw text when use secret text start with whitespace (like " secret") .

      Here is my sample pipeline script:

       

      node {
          withCredentials([string(credentialsId: 'SAMPLE_CREDENTIAL', variable: 'SAMPLE_CREDENTIAL')]) {
              sh 'echo $SAMPLE_CREDENTIAL'
          }
      }
      

      All output:

      Started by user user
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] node
      Running on Jenkins in /var/jenkins_home/workspace/print_credential_pipeline
      [Pipeline] {
      [Pipeline] withCredentials
      [Pipeline] {
      [Pipeline] sh
      [print_credential_pipeline] Running shell script
      + echo****
      credential test
      {{[Pipeline] }}}
      [Pipeline] // withCredentials
      {{[Pipeline] }}}
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: SUCCESS

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              mtgto Satoshi Goto
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: