ProgramCommandLine and passwords


I have a custom build runner type plugin. On the server, I collect a password in the edit view, using Constants.SECURE_PROPERTY_PREFIX to make the value hidden.

On the agent, I extend BuildServiceAdapter, and in makeProgramCommandLine() I return a new ProgramCommandLine. In getArguments() I read my parameter from getRunnerParameters().

However, in the build log, the BuildServiceAdapter writes:

[22:06:03]Starting: C:\TeamCity\buildAgent\temp\buildTmp\octo-temp\MyExe.exe arg1 <my password in plain text>

How can I prevent BuildServiceAdapter from echoing this output, or at least mask the password argument?


1 comment
Comment actions Permalink

Sorry for delay. Please try to override method isCommandLineLoggingEnabled and return false there. It should disable logging the command line to build log.


Please sign in to leave a comment.