Skip to content

[JENKINS-59573] Non-stored password parameter not working in freestyle project #161

@jenkins-infra-bot

Description

@jenkins-infra-bot

Hello everyone.

I just created freestyle project that should execute shell (bash) and use Non-stored password parameter. But Non-stored password parameter value is complete ignored.

I added regular Password parameter just for testing. I got this with masking passwords.
Running as SYSTEM
Building in workspace /root/.jenkins/workspace/test
[test] $ /bin/bash /opt/tomcat/temp/jenkins3125009081352009458.sh
pass1 is ********
pass2 is
Finished: SUCCESS
Without masking I got this.
Running as SYSTEM
Building in workspace /root/.jenkins/workspace/test
[test] $ /bin/bash /opt/tomcat/temp/jenkins3721571884155122083.sh
pass1 is test123
pass2 is
Finished: SUCCESS
 

Script is :

#!/bin/bash

echo pass1 is ${Password}
echo pass2 is ${Password2}

exit 0

 

'Password' is Password Parameter and Password2 is Non-stored Password Parameter.

 

I have some pipeline on same jenkins using mask passwords plugin and it works correctly there.

 

Any help would be appreciated.


Originally reported by vladaurosh, imported from: Non-stored password parameter not working in freestyle project
  • status: Open
  • priority: Major
  • component(s): mask-passwords-plugin
  • label(s): mask-passwords
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 20251216-225446
Raw content of original issue

Hello everyone.

I just created freestyle project that should execute shell (bash) and use Non-stored password parameter. But Non-stored password parameter value is complete ignored.

I added regular Password parameter just for testing. I got this with masking passwords. Running as SYSTEM Building in workspace /root/.jenkins/workspace/test [test] $ /bin/bash /opt/tomcat/temp/jenkins3125009081352009458.sh pass1 is ******** pass2 is Finished: SUCCESS Without masking I got this. Running as SYSTEM Building in workspace /root/.jenkins/workspace/test [test] $ /bin/bash /opt/tomcat/temp/jenkins3721571884155122083.sh pass1 is test123 pass2 is Finished: SUCCESS  

Script is :

#!/bin/bash

echo pass1 is ${Password} echo pass2 is ${Password2}

exit 0

 

'Password' is Password Parameter and Password2 is Non-stored Password Parameter.

 

I have some pipeline on same jenkins using mask passwords plugin and it works correctly there.

 

Any help would be appreciated.

environment
Jenkins  2.164.1<br/>
Jenkins 2.190.1<br/>
Mask Passwords Plugin 2.12.0

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions