Skip to content

[vs17.11] Merge v17.11.48 into vs17.11#12648

Merged
JanProvaznik merged 2 commits intodotnet:vs17.11from
JanProvaznik:merge-v17.11.48-to-vs17.11
Oct 20, 2025
Merged

[vs17.11] Merge v17.11.48 into vs17.11#12648
JanProvaznik merged 2 commits intodotnet:vs17.11from
JanProvaznik:merge-v17.11.48-to-vs17.11

Conversation

@JanProvaznik
Copy link
Member

Merging tag v17.11.48 into vs17.11 branch

…bdirectory on every build

Recreate temp on linux using CreateTempSubdirectory on every build

----
#### AI description  (iteration 1)
#### PR Classification
Security bug fix addressing the temporary folder creation issue on Linux.

#### PR Summary
This pull request secures the temporary directory creation in `src/Shared/TempFileUtilities.cs` by replacing the manual folder creation and permission checks with a call to `Directory.CreateTempSubdirectory` on Linux, thereby mitigating the risk of unauthorized temp folder creation. It directly addresses the linked [Security] work item by eliminating the potential for malicious actor intervention.
- `src/Shared/TempFileUtilities.cs`: Uses `Directory.CreateTempSubdirectory` to create a unique, secure temp folder on Linux.
- `src/Shared/TempFileUtilities.cs`: Removes outdated manual permission and folder collision handling logic.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->

----
#### AI description  (iteration 2)
#### PR Classification
Security bug fix that addresses a vulnerability in temporary folder creation on Linux.

#### PR Summary
This pull request enhances security by reworking the Linux temporary folder creation in MSBuild to generate a fresh subdirectory on every build using `Directory.CreateTempSubdirectory`.
- `src/Shared/TempFileUtilities.cs`: Replaced the custom folder creation and permission logic with a secure, native subdirectory creation method and removed the obsolete `userRWX` constant.
- `eng/Versions.props`: Bumped the version prefix from 17.11.47 to 17.11.48.

Related work items: #2541147
@JanProvaznik JanProvaznik requested a review from a team as a code owner October 15, 2025 12:37
Copilot AI review requested due to automatic review settings October 15, 2025 12:37
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 merges tag v17.11.48 into the vs17.11 branch, primarily updating the version number and simplifying the temporary folder creation logic for Linux by leveraging the Directory.CreateTempSubdirectory API.

Key Changes:

  • Version bumped from 17.11.47 to 17.11.48
  • Simplified Linux temp folder creation using Directory.CreateTempSubdirectory instead of custom native calls
  • Removed complex permission handling and fallback logic for directory creation conflicts

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
eng/Versions.props Version incremented to 17.11.48
src/Shared/TempFileUtilities.cs Refactored temp directory creation to use .NET API instead of native calls on Linux

@JanProvaznik JanProvaznik merged commit cdfe9a7 into dotnet:vs17.11 Oct 20, 2025
10 checks passed
@JanProvaznik JanProvaznik deleted the merge-v17.11.48-to-vs17.11 branch October 20, 2025 08:01
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