[JIRA] (JENKINS-61685) wrap: General Build Wrapper with class MaskPasswordsBuildWrapper not working

1 view
Skip to first unread message

sudeep_pranavam@yahoo.com (JIRA)

unread,
Mar 25, 2020, 3:19:03 PM3/25/20
to jenkinsc...@googlegroups.com
_peedus created an issue
 
Jenkins / Bug JENKINS-61685
wrap: General Build Wrapper with class MaskPasswordsBuildWrapper not working
Issue Type: Bug Bug
Assignee: Unassigned
Components: mask-passwords-plugin
Created: 2020-03-25 19:18
Priority: Major Major
Reporter: _peedus

Hi,

The below code prints the user and password value when shell command is executed in Jenkins pipeline.

 

wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: 'id', var: 'clientid'], [password: 'secret', var: 'clientsecret']]]) {
    sh "newman run collection.json --env-var user=${id} --env-var password=${secret}"

The whole purpose of the password masking is lost here

NB: If one does only an echo of the above command (for instance [echo "newman run collection.json --env-var user=${id} --env-var password=${secret}"], the mask works fine. But it doesn't work in shell commands.

Thanks!

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages