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,
Raul
Hi Raul
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.
Best regards,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.