Update .NET template security warning to mention arbitrary code execution#51934
Merged
Update .NET template security warning to mention arbitrary code execution#51934
Conversation
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update warning message for .NET templates
Update .NET template security warning to mention arbitrary code execution
Feb 25, 2026
marcpopMSFT
approved these changes
Feb 25, 2026
blowdart
approved these changes
Feb 25, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates security warning messages in .NET template documentation to more accurately reflect the scope of security risks. The change emphasizes that templates can execute arbitrary code beyond just MSBuild code, providing a clearer and more comprehensive warning to users about the potential dangers of installing untrusted templates.
Changes:
- Updated security warning text from "Templates can run MSBuild code when triggered" to "Templates can run MSBuild code and other arbitrary code when triggered" in both documentation files
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/core/tools/dotnet-new-install.md | Updated WARNING callout to include "and other arbitrary code" in the security warning about template execution |
| docs/core/tools/custom-templates.md | Updated WARNING callout to include "and other arbitrary code" in the security warning about template execution |
joeloff
approved these changes
Feb 25, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
joeloff
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing warning understated the security risk—templates can execute arbitrary code beyond just MSBuild, so the message needed broadening.
Changes
Updated the
[!WARNING]callout in bothcustom-templates.mdanddotnet-new-install.md:Before:
Templates can run MSBuild code when triggered, don't install or run untrusted .NET templates.After:
Templates can run MSBuild code and other arbitrary code when triggered, don't install or run untrusted .NET templates.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Internal previews