[JIRA] (JENKINS-58394) Passwords are not masked in Maven multi-module downstream jobs

0 visualitzacions
Ves al primer missatge no llegit

florian.ruschbaschan@bosch-si.com (JIRA)

no llegida,
9 de jul. 2019, 2:06:039/7/19
a jenkinsc...@googlegroups.com
Florian Ruschbaschan created an issue
 
Jenkins / Bug JENKINS-58394
Passwords are not masked in Maven multi-module downstream jobs
Issue Type: Bug Bug
Assignee: Unassigned
Components: mask-passwords-plugin, maven-plugin
Created: 2019-07-09 06:05
Environment: Ubuntu (16)
Jenkins (2.164.3) runs as a Docker container
Maven – installed automatically (3.5.4)
Maven Integration Plugin (3.3)
Mask Password Plugin (2.12.0)
Priority: Minor Minor
Reporter: Florian Ruschbaschan

Hi all, currently we are facing a problem within a Maven build project. It contains several modules, where each build will be triggered as a separate downstream job. Our credentials are configured as secret text and username/password combinations in the binding section of the parent build project. They are passed as additional properties within “goals and options” to the Maven build (e.g. clean install –Pprofile1 -Dpassword=${SECRET_PASSWORD}). In the first downstream job, Maven is logging all passed parameters UNMASKED, regardless if they are credentials or not.

We already tried a couple of things, like configuring which parameters should be automatically masked, passing credentials by “Inject passwords to the build as environment variables” and “Mask passwords and regexes (and enable global passwords). Nevertheless, nothing seems to work.

If we trigger the Maven build directly by using a Shell and no downstream build jobs are triggered, no credentials are exposed. Somehow Maven is logging our credentials in plain text only in downstream jobs.

 

Example

Console log of parent project_X__feature_X:

15:14:46 Executing Maven: -B -f /home/jenkins-slave/workspace/feature_X/project_X/pom.xml -Dmaven.repo.local=/home/jenkins-slave/workspace/feature_X/.repository -s /tmp/settings.xml clean install sonar:sonar -Pprofile1 -Dparam1=**** -Dparam2=**** 15:14:49 [INFO] Scanning for projects...

Console log of module 1 of project_X__feature_X:

Executing Maven: -B -f /home/jenkins-slave/workspace/feature_X/project_X/pom.xml -Dmaven.repo.local=/home/jenkins-slave/workspace/feature_X/.repository -s /tmp/settings.xml clean install sonar:sonar -Pprofile1 -Dparam1=unmasked-password -Dparam2=unmasked-password [INFO] Scanning for projects...
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

florian.ruschbaschan@bosch-si.com (JIRA)

no llegida,
9 de jul. 2019, 2:07:029/7/19
a jenkinsc...@googlegroups.com
Florian Ruschbaschan updated an issue
Hi all, currently we are facing a problem within a Maven build project. It contains several modules, where each build will be triggered as a separate downstream job. Our credentials are configured as secret text and username/password combinations in the binding section of the parent build project. They are passed as additional properties within “goals and options” to the Maven build (e.g. clean install –Pprofile1 -Dpassword=${SECRET_PASSWORD}). In the first downstream job, Maven is logging all passed parameters UNMASKED, regardless if they are credentials or not.


We already tried a couple of things, like configuring which parameters should be automatically masked, passing credentials by “Inject passwords to the build as environment variables” and “Mask passwords and regexes (and enable global passwords). Nevertheless, nothing seems to work.


If we trigger the Maven build directly by using a Shell and no downstream build jobs are triggered, no credentials are exposed. Somehow Maven is logging our credentials in plain text only in downstream jobs.

 

+*Example*+


Console log of parent project_X__feature_X:
{code:java}

15:14:46 Executing Maven: -B -f /home/jenkins-slave/workspace/feature_X/project_X/pom.xml -Dmaven.repo.local=/home/jenkins-slave/workspace/feature_X/.repository -s /tmp/settings.xml clean install sonar:sonar -Pprofile1 -Dparam1=**** -Dparam2=****
15:14:49 [INFO] Scanning for projects...
{code}

Console log of module 1 of project_X__feature_X:
{code:java}

Executing Maven: -B -f /home/jenkins-slave/workspace/feature_X/project_X/pom.xml -Dmaven.repo.local=/home/jenkins-slave/workspace/feature_X/.repository -s /tmp/settings.xml clean install sonar:sonar -Pprofile1 -Dparam1=unmasked-password -Dparam2=unmasked-password

[INFO] Scanning for projects...
{code}

florian.ruschbaschan@bosch-si.com (JIRA)

no llegida,
9 de jul. 2019, 2:08:029/7/19
a jenkinsc...@googlegroups.com

jeroen.laverman@bosch-si.com (JIRA)

no llegida,
30 de jul. 2019, 4:19:0330/7/19
a jenkinsc...@googlegroups.com

florian.ruschbaschan@bosch-si.com (JIRA)

no llegida,
30 d’oct. 2019, 4:37:0230/10/19
a jenkinsc...@googlegroups.com

Since we are using the following setup, this issue has been fixed:

Ubuntu (16)
Jenkins (2.176.3) runs as a Docker container
Maven – installed automatically (3.5.4)
Maven Integration Plugin (3.4)
Mask Password Plugin (2.12.0)

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

florian.ruschbaschan@bosch-si.com (JIRA)

no llegida,
30 d’oct. 2019, 4:38:0330/10/19
a jenkinsc...@googlegroups.com

florian.ruschbaschan@bosch-si.com (JIRA)

no llegida,
30 d’oct. 2019, 4:38:0330/10/19
a jenkinsc...@googlegroups.com
Respon a tots
Respon a l'autor
Reenvia
0 missatges nous