[vs17.14] Merge v17.14.28 into vs17.14#12650
Merged
rainersigwald merged 2 commits intodotnet:vs17.14from Oct 17, 2025
Merged
Conversation
…bdirectory on every build Recreate temp on linux using CreateTempSubdirectory on every build ---- #### AI description (iteration 1) #### PR Classification Security bug fix that improves the creation of the temporary folder on Linux to prevent potential malicious folder hijacking. #### PR Summary This PR replaces the custom logic for creating and validating the MSBuild temporary folder on Linux with the built-in Directory.CreateTempSubdirectory method, ensuring a fresh and securely generated temp directory on every build. - `src/Shared/TempFileUtilities.cs`: Updated the Linux branch in the CreateFolderUnderTemp method to use Directory.CreateTempSubdirectory instead of manually handling mkdir/chmod and username concatenation. - `src/Shared/TempFileUtilities.cs`: Removed the custom permission logic and the unused `userRWX` constant, simplifying the directory creation for non-Linux platforms. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> ---- #### AI description (iteration 2) #### PR Classification This pull request is a security bug fix addressing a vulnerability in how MSBuild creates its temporary folder on Linux. #### PR Summary The PR improves the security of temp folder creation by replacing custom mkdir/chmod logic with the built-in `Directory.CreateTempSubdirectory` on Linux, ensuring a uniquely created directory for each build. Additionally, it removes redundant permission code in `TempFileUtilities.cs` and bumps the version in `eng/Versions.props` from 17.14.27 to 17.14.28. - `src/Shared/TempFileUtilities.cs`: Replaces manual Linux temp folder creation with `Directory.CreateTempSubdirectory` and eliminates outdated permission checks. - `eng/Versions.props`: Updates the version prefix to signal the new release. Related work items: #2541147
Contributor
There was a problem hiding this comment.
Pull Request Overview
Merge tag v17.14.28 into vs17.14, updating versioning and modifying temporary directory creation logic for Linux builds.
- Bumps VersionPrefix to 17.14.28.
- Replaces custom Linux temp directory creation/permission logic with Directory.CreateTempSubdirectory-based approach and removes the userRWX constant.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Shared/TempFileUtilities.cs | Simplifies Linux temp folder creation logic; removes explicit permission/ownership handling and adds use of Directory.CreateTempSubdirectory. |
| eng/Versions.props | Updates VersionPrefix to 17.14.28. |
YuliiaKovalova
approved these changes
Oct 16, 2025
rainersigwald
approved these changes
Oct 17, 2025
This was referenced Oct 21, 2025
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.
Merging tag v17.14.28 into vs17.14 branch