Skip to content

[vs17.14] Merge v17.14.28 into vs17.14#12650

Merged
rainersigwald merged 2 commits intodotnet:vs17.14from
JanProvaznik:merge-v17.14.28-to-vs17.14
Oct 17, 2025
Merged

[vs17.14] Merge v17.14.28 into vs17.14#12650
rainersigwald merged 2 commits intodotnet:vs17.14from
JanProvaznik:merge-v17.14.28-to-vs17.14

Conversation

@JanProvaznik
Copy link
Member

Merging tag v17.14.28 into vs17.14 branch

…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
Copilot AI review requested due to automatic review settings October 15, 2025 12:38
@JanProvaznik JanProvaznik requested a review from a team as a code owner October 15, 2025 12:38
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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants