Skip to content

Conversation

@Ericsson89-ger
Copy link

Even secured decorator is used, with --debug during deployment secured data is logged in clear texts to output.

Even secured decorator is used, with --debug during deployment secured data is logged in clear texts to output.
@prmerger-automator
Copy link
Contributor

@Ericsson89-ger : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit f93dfe1:

✅ Validation status: passed

File Status Preview URL Details
articles/azure-resource-manager/bicep/data-types.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a warning about the --debug parameter's impact on secure data logging in Azure Resource Manager Bicep deployments. The change clarifies that even when using the @secure() decorator, sensitive data can be exposed in plain text logs when the --debug flag is used during deployment.

Key Changes:

  • Updated security documentation to warn users that --debug bypasses secure parameter protections

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Secure strings use the same format as string, and secure objects use the same format as object. With Bicep, you add the `@secure()` [decorator](./parameters.md#use-decorators) to a string or object.

When you set a parameter (or an output) to a secure string or secure object, the value of the parameter (or the output) isn't saved to the deployment history or logged. If you set that secure value to a property that isn't expecting a secure value, the value isn't protected. For example, if you set a secure string to a tag, that value is stored as plain text. Use secure strings for passwords and secrets.
When you set a parameter (or an output) to a secure string or secure object, the value of the parameter (or the output) isn't saved to the deployment history or logged (except if --debug parameter is used). If you set that secure value to a property that isn't expecting a secure value, the value isn't protected. For example, if you set a secure string to a tag, that value is stored as plain text. Use secure strings for passwords and secrets.
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The warning about --debug should be more prominent and specific. Consider rephrasing to: 'the value of the parameter (or the output) isn't saved to the deployment history or logged. However, when using the --debug flag during deployment, secure values are logged in clear text.' This makes the security implication clearer and separates it from the main statement for better readability.

Suggested change
When you set a parameter (or an output) to a secure string or secure object, the value of the parameter (or the output) isn't saved to the deployment history or logged (except if --debug parameter is used). If you set that secure value to a property that isn't expecting a secure value, the value isn't protected. For example, if you set a secure string to a tag, that value is stored as plain text. Use secure strings for passwords and secrets.
When you set a parameter (or an output) to a secure string or secure object, the value of the parameter (or the output) isn't saved to the deployment history or logged. However, when using the `--debug` flag during deployment, secure values are logged in clear text. If you set that secure value to a property that isn't expecting a secure value, the value isn't protected. For example, if you set a secure string to a tag, that value is stored as plain text. Use secure strings for passwords and secrets.

Copilot uses AI. Check for mistakes.
@ShannonLeavitt
Copy link
Contributor

ShannonLeavitt commented Nov 12, 2025

@mumian

Could you review the proposed changes?

Due to the upcoming conference, all merging and publishing is on hold until the morning of 18 November 2025.

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge. In your sign-off comment, let us know if you'd like us to commit any portion of the Copilot review or other small changes.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged tracking label for the PR review team label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants