Redacting password from Build Runner Plugin log

Hello,

I have created a Build Runner Plugin which calls a process with command-line parameters specified as part of the Plugin's UI.

The problem is that one of these parameters is a password, and this whole process call (complete with parameters) is appearing in the logs.

I wish to be able to continue to show the command that is being called (there are other parameters useful for troubleshooting), however, I need to be able to redact the password string.

I have three ideas right now:

1) I could set an environment variable with my password and read that in my process as an alternative to the command line (this seems pretty hacky, but doable, to me)
2) I could *maybe* make use of the TeamCity password type build parameters, which TC automatically redacts from the logs (not idea how to do this though!)
3) I could create my own implementation of the BuildProgressLogger that redacts the password (except I can't see how to provide one of these!)

Does anyone have any ideas/pointers for me please?

Thank you.

1 comment
Comment actions Permalink

Mark,

In case this is still actual: you should be able to define password parameter in the runner.
Here is an example of a password property in Deployer plugin.
And here is an example from a meta-runner.

0

Please sign in to leave a comment.