Skip to content

[JENKINS-60555] Mask Passwords Plugin not working at all #162

@jenkins-infra-bot

Description

@jenkins-infra-bot

Currently using:

  • Jenkins ver. 2.194
  • Mask Passwords Plugin ver. 2.12.0

I have a pipeline job using a non stored password parameter (name: SECRET) and a password parameter (name: SECRET2), both should be masked as I configured it in the Jenkins main configuration section for this Mask Password plugin.

I am running this code:

stage("Testing secret parameters") {
    steps {
script {
    print "SECRET: " + params.SECRET
}
sh """echo \"$SECRET\" \
    echo \"${SECRET}\""""
sh '''echo \'$SECRET\' \
    echo ${SECRET}'''
    }
    
}stage("Testing secret2 parameters") {
    steps {
script {
    print "SECRET2: " + params.SECRET2
    sh """echo \"$SECRET2\" \
    echo \"${SECRET2}\""""
    sh '''echo "$SECRET2" \
    echo "${SECRET2}"'''
}
    }
}

It is being printed in plain text in all cases when it should be masked. Am I doing something really wrong or this plugin is not working anymore?

Thanks in advance!


Originally reported by froblesmartin, imported from: Mask Passwords Plugin not working at all
  • status: Open
  • priority: Major
  • component(s): mask-passwords-plugin
  • label(s): plugin, security
  • resolution: Unresolved
  • votes: 1
  • watchers: 1
  • imported: 20251216-225446
Raw content of original issue

Currently using:

  • Jenkins ver. 2.194
  • Mask Passwords Plugin ver. 2.12.0

I have a pipeline job using a non stored password parameter (name: SECRET) and a password parameter (name: SECRET2), both should be masked as I configured it in the Jenkins main configuration section for this Mask Password plugin.

I am running this code:

stage("Testing secret parameters") {
    steps {
        script {
            print "SECRET: " + params.SECRET
        }
        sh """echo \"$SECRET\" \
            echo \"${SECRET}\""""
        sh '''echo \'$SECRET\' \
            echo ${SECRET}'''
    }
    
}stage("Testing secret2 parameters") {
    steps {
        script {
            print "SECRET2: " + params.SECRET2
            sh """echo \"$SECRET2\" \
            echo \"${SECRET2}\""""
            sh '''echo "$SECRET2" \
            echo "${SECRET2}"'''
        }
    }
}

It is being printed in plain text in all cases when it should be masked. Am I doing something really wrong or this plugin is not working anymore?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions