Broken output when secret text starts with whitespace

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

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • Environment:
      Operating System: Host=macOS 10.13.6 Guest=jenkinsci/blueocean on Docker
      Plugin: Credentials Binding Plugin v1.16

      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

            Assignee:
            Unassigned
            Reporter:
            Satoshi Goto
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: