Azure cli shows some of SecureString parameters in plain text #25306
Labels
ARM
az resource/group/lock/tag/deployment/policy/managementapp/account management-group
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
feature-request
Service Attention
This issue is responsible by Azure service team.
Milestone
Describe the bug
Input parameters of type
@secured
in bicep template are accepted, but some of the secure string are displayed in plain text in the logs.To Reproduce
clientSecret
are displayed in the logs.DEBUG: cli.knack.cli: Command arguments: ['deployment', 'group', 'create', '-g', 'my-resource-group', '-n', 'my-container-app', '--template-file', 'my-container-app.bicep', '--parameters', 'storePassword=[MASKED]', '--parameters', 'clientSecret=plain text of secret','--debug']
Expected behavior
All secured string should be masked as follows:
DEBUG: cli.knack.cli: Command arguments: ['deployment', 'group', 'create', '-g', 'my-resource-group', '-n', 'my-container-app', '--template-file', 'my-container-app.bicep', '--parameters', 'storePassword=[MASKED]', '--parameters', 'clientSecret=[MASKED]','--debug']
Environment summary
Azure CLI version 2.42.0 and 2.44.1
Additional context
The values of variables such as
$STORE_PASSWORD
or$CLIENT_SECRET
come from gitlab ci/cd variables or from azure through azure cli. The plain text of secured string can also be displayed in other log statements such as:The text was updated successfully, but these errors were encountered: