fix(vscode): prevent SMB credentials from reaching telemetry - #9547
Open
Riley Evans (rllyy97) wants to merge 5 commits into
Open
fix(vscode): prevent SMB credentials from reaching telemetry#9547Riley Evans (rllyy97) wants to merge 5 commits into
Riley Evans (rllyy97) wants to merge 5 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
✅ Contributors
✅ Screenshots/Videos
Summary Table
✅ All checks passed — this PR meets the template requirements and the declared High risk correctly reflects the security-sensitive credential-handling change. Cleared to merge.Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Tue, 18 Aug 2026 21:36:38 GMT |
Contributor
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
Contributor
There was a problem hiding this comment.
Pull request overview
Secures VS Code SMB connections by preventing credential exposure and shell injection.
Changes:
- Replaces
exec(net use)with a fixed PowerShell/native API flow. - Passes credentials through stdin and returns sanitized errors.
- Adds focused security and failure-path unit tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
fileSystemConnection.ts |
Implements secured SMB connection handling. |
fileSystemConnection.test.ts |
Tests credential isolation and sanitized failures. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Elaina Lee (Elaina-Lee)
approved these changes
Aug 18, 2026
Carlos Castro Trejo (ccastrotrejo)
approved these changes
Aug 18, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…etry' into rllyy97-fix-smb-credential-telemetry
This was referenced Aug 19, 2026
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.
Commit Type
Risk Level
What & Why
Fixes a CWE-532 vulnerability where SMB passwords interpolated into
exec(net use ...)could propagate through child-process errors, the webview, andLoggerServiceinto Application Insights. The interpolation also enabled shell injection.The fix invokes
WNetAddConnection2Wusing a fixed, encoded PowerShell payload, the absolute System32 PowerShell path, andshell: false. Credentials are supplied only through stdin, child output is ignored, and callers receive stable, credential-free errors.Impact of Change
Test Plan
Validation evidence:
validateNodeJsIsLatest.ts,registerCommands.ts,workspaceWebviewCommandHandler.ts,switchToDotnetProject.ts,azureClients.ts,requestUtils.ts, and existingsrc/test/uifiles.Contributors
Riley Evans (@rllyy97)
Screenshots/Videos
Not applicable because there are no visual changes.