Skip to content

[JENKINS-56674] Masking of environment variables passed to docker exec#167

Merged
dwnusbaum merged 6 commits intojenkinsci:masterfrom
jglick:envMasking-JENKINS-56674
Mar 29, 2019
Merged

[JENKINS-56674] Masking of environment variables passed to docker exec#167
dwnusbaum merged 6 commits intojenkinsci:masterfrom
jglick:envMasking-JENKINS-56674

Conversation

@jglick
Copy link
Member

@jglick jglick commented Mar 27, 2019

JENKINS-56674 Subsumes #166 by @vkravets.

I consider this a security hardening. Suppose you have some plugin which uses Launcher, calls env on a sensitive variable, and does not use .quiet(true). Normally it will look like this in the log:

$ command with args

If you wrapped in withDockerContainer before this fix:

$ docker exec --env VAR=value abc123def456 command with args

and after:

$ docker exec --env ******** abc123def456 command with args

Or for old versions of Docker,

$ docker exec abc123def456 env VAR=value command with args

vs.

$ docker exec abc123def456 env ******** command with args

Copy link

@Wadeck Wadeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested deeply but nothing seems wrong.

🐝

@dwnusbaum dwnusbaum merged commit da10124 into jenkinsci:master Mar 29, 2019
@vkravets
Copy link
Contributor

vkravets commented Mar 29, 2019

Great, I'm glad that my findings really helps make this plugin better )
Thanks for merge, as I've understand it already released in the 3.40 version?

@jglick jglick deleted the envMasking-JENKINS-56674 branch April 1, 2019 16:30
@jglick
Copy link
Member Author

jglick commented Apr 1, 2019

It is not currently released.

@Dmitry1987
Copy link

When we will be able to install this update and which version it is planned to be released in?
Just realized that all my new pipelines are not secure if anything secret will appear in any environment variable during the execution... Super important fix @jglick thank you!

@jglick
Copy link
Member Author

jglick commented Apr 16, 2019

@Dmitry1987 as you can see in JIRA, it has been released as 1.18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants