Skip to content

Backport various fixes to the 2.7 release branch - #41351

Merged
Blue (OneBlue) merged 4 commits into
release/2.7from
user/oneblue/27-bp
Aug 14, 2026
Merged

Blue (OneBlue) merged 4 commits into
release/2.7from
user/oneblue/27-bp

Conversation

@OneBlue

Copy link
Copy Markdown
Collaborator

Summary of the Pull Request

This PR backports various issues to fix the build, release, and #41331 to the 2.7 release branch

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@OneBlue
Blue (OneBlue) requested a review from a team as a code owner August 13, 2026 18:34
Copilot AI lite review requested due to automatic review settings August 13, 2026 18:34
@OneBlue Blue (OneBlue) changed the title User/oneblue/27 bp Backport various fixes to the 2.7 release branch Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 backports a set of fixes onto the 2.7 release branch, including a security/behavior fix to mount plugin-backed folders using the WSL session user token (instead of the service identity), plus CI pipeline adjustments for fetching GitHub tokens from Azure Key Vault.

Changes:

  • Mount root-namespace Plan9 shares using the session user token to ensure correct host filesystem access semantics.
  • Extend the plugin test suite with a new “MountFolderAccess” scenario that validates denied host permissions are enforced through the mount.
  • Update Azure DevOps pipeline YAMLs to fetch GitHub tokens from Azure Key Vault (and adjust env usage accordingly), plus a PCH warning disable tweak.

Reviewed changes

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

Show a summary per file
File Description
test/windows/testplugin/Plugin.cpp Adds a new plugin test mode that mounts a host folder and attempts a write to validate access enforcement.
test/windows/PluginTests.h Extends PluginTestType and adds a registry value name for the mount folder path.
test/windows/PluginTests.cpp Adds a new test that sets a deny-write ACL and verifies the plugin mount can’t write as the user.
src/windows/service/exe/WslCoreVm.cpp Passes the session user token into AddPlan9Share when mounting root-namespace folders.
src/windows/common/precomp.h Disables warning 4875 globally for this PCH.
.pipelines/wsl-build-notice.yml Fetches GitHub PR token from Key Vault for NOTICE PR automation.
.pipelines/wsl-build-nightly-localization.yml Fetches GitHub PR token from Key Vault for localization PR automation (conditioned).
.pipelines/flight-stage.yml Fetches GitHub release token from Key Vault and updates the release token variable used by the release script.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +172 to +174
const auto testFolder = std::filesystem::current_path() / "deny-write";
VERIFY_IS_TRUE(std::filesystem::create_directory(testFolder));

Comment on lines +49 to +56
- task: AzureKeyVault@2
displayName: Fetch GitHub PR token from Key Vault
condition: and(succeeded(), in(variables['Build.Reason'], 'Schedule', 'Manual'))
inputs:
azureSubscription: 'Azure-Connection'
KeyVaultName: 'wsl-ci-key-vault'
SecretsFilter: 'GithubPRToken'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't matter for this backport. I'll rather cherry-pick changes as-is to avoid diverging too much from master

Comment thread test/windows/PluginTests.h Resolved
Copilot AI review requested due to automatic review settings August 13, 2026 23:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (2)

test/windows/PluginTests.cpp:173

  • std::filesystem::create_directory(testFolder) will fail if a previous run left the directory behind (or if multiple runs share the same working directory), because the path is hard-coded to deny-write and there’s no pre-clean. Consider using a per-run unique directory name and removing any pre-existing path first to avoid test flakiness.
        const auto testFolder = std::filesystem::current_path() / "deny-write";
        VERIFY_IS_TRUE(std::filesystem::create_directory(testFolder));

test/windows/PluginTests.cpp:198

  • VERIFY_ARE_EQUAL is typically used as VERIFY_ARE_EQUAL(expected, actual) in this test suite (e.g. above for ERROR_FILE_NOT_FOUND). Swapping the argument order here makes failure diagnostics misleading.
        VERIFY_ARE_EQUAL(GetLastError(), ERROR_ACCESS_DENIED);

@OneBlue
Blue (OneBlue) merged commit f6bd5d2 into release/2.7 Aug 14, 2026
8 checks passed
@OneBlue
Blue (OneBlue) deleted the user/oneblue/27-bp branch August 14, 2026 01:04
Ben Hillis (benhillis) added a commit that referenced this pull request Sep 3, 2026
…sion" (#41331) (#41516)

Temporarily reverting the identity-based plugin folder mount change
(both the WslCoreVm.cpp behavior change and the accompanying
MountFolderAccess test coverage) that was backported to release/2.7
via #41351.

This reverts the plugin-mount-identity portion of commit
f6bd5d2.

Co-authored-by: Ben Hillis <[email protected]>
Co-authored-by: Copilot <[email protected]>
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