Add use with trusted files remark to FileVersionInfo.GetVersionInfo#12641
Closed
steveisok wants to merge 2 commits into
Closed
Add use with trusted files remark to FileVersionInfo.GetVersionInfo#12641steveisok wants to merge 2 commits into
steveisok wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the API reference documentation for System.Diagnostics.FileVersionInfo.GetVersionInfo(String) to add a security-focused caution about using the API only with trusted files.
Changes:
- Added a new “Remarks” section under
GetVersionInfowith a[!CAUTION]admonition about trusted files and malformed/malicious inputs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
gewarren
previously approved these changes
May 21, 2026
This library's source of truth is in the ///. Can you add the note there instead?
Member
Author
|
@gewarren I'm not sure where you are suggesting. Can you please clarify? |
Contributor
|
@steveisok Can you add a <remarks> tag here. (Not sure what happened to the code example during the backport to the runtime repo...) |
Member
Author
I see - I can push this change in runtime. |
Member
Author
|
Favoring dotnet/runtime#128560 instead |
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.
Summary
Add a small remark about using trusted files when calling FileVersionInfo.GetVersionInfo.