- Home /
Should the username/password for unity account be hidden in batchmode build logs?
When I build from command line, I noticed that my log output has the username and password in plain text but the Serial Number is hidden. I would expect the password should also be hidden.
For context I'm setting up CI with TeamCity and I found you can used Agent Parameters to specify passwords which will remove them from the logs. I previously just had these as local environment variables but noticed they were in the logs that were uploaded which had to be resolved so I have worked around the issue for now.
This is what it looked like before switching TeamCity over to using AgentParameters:
[01:59:24][Step 1/2] "C:\Program Files\Unity\Editor\Unity.exe" -logFile output/log.txt -quit -serial ABCD-EF-G -username me@not_unity.com -password NOT_SO_SECRET_PASSWORD -projectPath C:\TeamCity\buildAgent\work\5386fe9d62e26522 -batchmode -buildWindows64Player output\SuperAwesomeGameThatShowsPasswordWhenBuilding.exe
...
[02:01:41][Step 2/2] -logFile
[02:01:41][Step 2/2] output/log.txt
[02:01:41][Step 2/2] -quit
[02:01:41][Step 2/2] -serial
[02:01:41][Step 2/2] (hidden)
[02:01:41][Step 2/2] -username
[02:01:41][Step 2/2] me@not_unity.com
[02:01:41][Step 2/2] -password
[02:01:41][Step 2/2] NOT_SO_SECRET_PASSWORD
[02:01:41][Step 2/2] -projectPath
Forgot to indicate that this is build 5.3.4p5
[02:01:41][Step 2/2] Built from '5.3/patch-release' branch; Version is '5.3.4p5 (83b1f50dd5b8) revision 8630773'; Using compiler version '160040219'
Don't think it's an issue, since build logs are only placed locally on your machine and not distributed. I guess encryption would be nice if the computer is public or shared. In general, you're right, all passwords should be hidden, if this is an issue for you and found a way to hide the parameters then that's great, thanks for sharing.
Thanks Jesse, I wanted to bring it up even though we have worked around it in two ways.
Putting our TeamCity server behind an https proxy to encrypt all communication.
Using TeamCity Agent Parameters which masks them.