When using Azure Pipes to deploy an Azure Web App while having the DEBUG flag to true, in one statement the logger logs the <publishData> response to the build log.
<publishData>...</publishData> not only contains the user password as cleartext but also the SQL Server connection string including the user and password.
This seems to be a security threat because anyone who can enable the Debug flag can get access to the deployment password and database login credentials.
Hey @Stefan Naegeli
Thanks for raising this issue. I have notified the Microsoft team and they are looking into this.
I strongly agree with you that credentials shouldn't be exposed. After investigating the issue, it's related to the Azure CLI: It prints the password when you pass the --debug flag to the CLI deploy command.
Let me clarify, the credentials that are exposed are from the PublishProfile (credentials that Azure Web Apps generates to allow publishing your application from IDE for example). Your Azure Credentials (i.e. Service Principal) that give you access to your account / resources are not exposed.
For example, this command would print the whole PublishProfile (user and password included):
az webapp deployment source config-zip --resource-group example-azure-web-apps-deploy --name example-azure-web-apps-deploy --src app.zip --debug
(You can see the source code here: https://bitbucket.org/microsoft/azure-web-apps-deploy)
Unfortunately, this would happen even using raw commands (i.e. without using the pipe), as we depend on the Azure CLI to execute the command, and we cannot prevent this.
For now, if your publishProfile has been exposed in the logs, I would suggest rotating it ("Reset Publish Profile" from the Azure Portal) and not using DEBUG mode unless you need to debug any problem with your deployment.
Thanks again for your feedback,
Thanks for raising this with Microsoft. Can you share an Issue-Link to watch or will you post again on this thread when you get an update?
You are correct: not the Service Principal but the content of the publish profile is exposed. This is unfortunate as the publish profile might also contain the SQL Connection string including the login user and password.
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events