Adopt security fixes on main - #330308
Merged
Merged
Adopt security fixes on main#330308
Conversation
Msrc-Case-Id: 117306 Co-authored-by: meganrogge <merogge@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Msrc-Case-Id: 117468
…teral bypass (#87) --- Msrc-Case-Id: 127004
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens extension URLs, network access, process environments, terminals, and web content handling against security risks.
Changes:
- Enforces trust, domain, URI-scheme, and workspace checks.
- Sanitizes privileged payloads and process environments.
- Adds defensive buffer copies and security regression tests.
Show a summary per file
| File | Description |
|---|---|
test/integration/browser/src/index.ts |
Enables the smoke-test driver. |
src/vs/workbench/services/extensions/test/browser/extensionUrlHandler.test.ts |
Tests URL override trust. |
src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts |
Applies trust before overrides. |
src/vs/workbench/services/environment/test/browser/environmentService.test.ts |
Tests privileged payload restrictions. |
src/vs/workbench/services/environment/browser/environmentService.ts |
Restricts development payload options. |
src/vs/workbench/contrib/webview/browser/webviewElement.ts |
Copies transferred resource buffers. |
src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts |
Tests blocked process creation. |
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts |
Stops process creation after rejection. |
src/vs/workbench/contrib/chat/test/electron-browser/tools/builtinTools/fetchPageTool.test.ts |
Tests IPv6 blocking. |
src/vs/workbench/contrib/browserView/test/electron-browser/tools/openBrowserTool.test.ts |
Tests browser URL filtering. |
src/vs/workbench/api/common/extHostCommands.ts |
Copies command buffers safely. |
src/vs/server/node/remoteTerminalChannel.ts |
Sanitizes resolver environments. |
src/vs/server/node/extensionHostConnection.ts |
Protects reserved environment values. |
src/vs/platform/webContentExtractor/test/electron-main/webPageLoader.test.ts |
Tests navigation and frame policies. |
src/vs/platform/webContentExtractor/electron-main/webPageLoader.ts |
Restricts requests, frames, and popups. |
src/vs/platform/networkFilter/test/common/networkFilterService.test.ts |
Tests malformed and IPv6 authorities. |
src/vs/platform/networkFilter/test/common/domainMatcher.test.ts |
Tests IPv6 canonicalization. |
src/vs/platform/networkFilter/common/networkFilterService.ts |
Fails closed for malformed HTTP hosts. |
src/vs/platform/networkFilter/common/domainMatcher.ts |
Canonicalizes URI authorities. |
src/vs/platform/browserView/test/node/playwrightTab.test.ts |
Tests post-normalization filtering. |
src/vs/base/test/common/processes.test.ts |
Tests environment sanitization. |
src/vs/base/common/processes.ts |
Expands dangerous variable removal. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 22/22 changed files
- Comments generated: 2
- Review effort level: Balanced
Contributor
|
This PR will be automatically cherry-picked to |
TylerLeonhardt
approved these changes
Aug 11, 2026
Paul (pwang347)
marked this pull request as ready for review
August 11, 2026 21:05
Paul (pwang347)
enabled auto-merge (squash)
August 11, 2026 21:05
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Kyle Cutler (@kycutler)Matched files:
Joaquín Ruales (@jruales)Matched files:
Anthony Kim (@anthonykim1)Matched files:
|
Vritant Bhardwaj (vritant24)
approved these changes
Aug 11, 2026
Raymond Zhao (rzhao271)
approved these changes
Aug 11, 2026
Abdullah Atrash (abdullahatrash)
added a commit
to abdullahatrash/flowleap-agent-v2
that referenced
this pull request
Aug 21, 2026
…ures (PRD 0013) (#282) Executes docs/prd/0013-upstream-port-1.127-to-1.135.md end to end: 183 commits cherry-picking/adapting the fork-relevant subset of the 3,672-commit upstream delta (microsoft/vscode b0b6062..07c20d9, 1.127.0→1.135.0), in four waves. ## Waves (issues #249–#280) - **Wave 1 — security (#249–#255):** upstream security rollup microsoft#330308 (env-var hardening incl. DYLD_INSERT_LIBRARIES, URL-handler trust ordering, domain-matcher bypass + fail-open fix), loopback OAuth XSS, MSRC web-worker iframe parentOrigin, trusted-domain backslash bypass, stale-secrets purge, chat-import path traversal, fetch-tool approval bypasses, skill-name prompt-injection escaping, Electron 42.3.0→42.8.1 (six Chromium security trains, download checksum-verified), markdown-it 12→14. - **Wave 2 — live product bugs (#256–#261):** cache_control sentinel no longer leaked to non-aware BYOK providers (vendor allow-list incl. flowleap-trial, fail-closed), session cap 50→400, darwin updater late-error guard, disposed-frame crash guards, duplicate file-ops from scoped editor services, sessions quartet (Changes spinner, picker close, grouping leak, archived-terminal disposal), worktree branch/path collision race (our code, regression-proven tests). - **Wave 3 — mechanical batch (#264–#269):** ~95 upstream commits: terminal/workbench/chat/base leak sweeps, disposal crash guards, base correctness primitives with tests, streaming-markdown repair, :has() CSS perf fix, ListView/toolbar batching, MCP robustness + plugin-marketplace TTL refresh, gallery hardening. - **Wave 4 — UX features (#270–#280):** chat Ctrl+F find widget, update-service rewrite (update.mode live, metered deferral; ADR-0008 invariants verified), model-selection robustness (fixes live Trial-provider remembered-model loss), sessions QoL (rename/reopen/middle-click/mouse-nav/OS notifications), turn timestamps, token-stats consumer, PromptsStorage.builtIn seam (45 bundled skills verified at runtime), clipboard architecture (rich HTML + Markdown copy), response disclosure + thinking/streaming UX, save-dirty/confirm-discard/image+vision fixes, go-to-symbol, scroll persistence, cache-break hint, sticky scroll. ## Validation - Full unit suite at tip: **21,811 passing / 0 failing** (389 pending); valid-layers-check, core + extension typechecks clean. - Rebased onto latest main (zero conflicts, zero file overlap with the base move). - Electron 42.8.1 download validates against ported checksums; smoke-tested live (find widget, updater disabled-in-dev invariant, gallery 404 grace). - Known flake: McpStdioStateHandler stdin test can fail under full-suite machine load; passes deterministically in isolation. ## Notes for reviewers - Deliberate skips (Modern UI, single-pane layout, dictation, Automations, asar re-pack, tsgo→tsc) are documented in the PRD with evidence per issue report. - Follow-ups filed in issue reports: token-stats producer wiring, closed-chat state on session eviction, views.css :has() selector, microsoft#330176 tooltip keyboard nav. Closes #249, closes #250, closes #251, closes #252, closes #253, closes #254, closes #255, closes #256, closes #257, closes #258, closes #259, closes #260, closes #261, closes #264, closes #265, closes #266, closes #267, closes #268, closes #269, closes #270, closes #271, closes #272, closes #273, closes #274, closes #275, closes #276, closes #277, closes #278, closes #279, closes #280 https://claude.ai/code/session_01RWkt8yKCBKXjTN7bdqaK9o
SKYIUOS (SKYIOUS)
added a commit
to SKYIOUS/COD
that referenced
this pull request
Aug 26, 2026
…osoft#330308 hardening) Ported from microsoft/vscode: - a07fb29 'MSRC Fixes' - reject attacker-controlled parentOrigin in webWorkerExtensionHostIframe when hostname validation is not enabled; update CSP + webClientServer SHA accordingly - 06a2bc8 'Adopt security fixes on main': * webPageLoader: deny window.open, enforce URI policy on every request, frame navigation and frame-tree collection * domainMatcher/networkFilter: harden matching * terminalInstance: stop after _onProcessExit in untrusted-workspace guards * webviewElement: copy chunk into freshly-owned ArrayBuffer before transfer * processes/extHostCommands/extensionHostConnection/remoteTerminalChannel/ environmentService/extensionUrlHandler: assorted hardening Verification: - tsgo src/tsconfig.json --noEmit: clean - mocha networkFilter tests: 52 passing; processes.test: 2 passing - CSP sha256(daEgfo2VIXpx2Np71KqCCbkeQwv+68vPrx54XRcbdcs=) recomputed over patched script and matches both declarations Not ported: upstream terminalInstance.test.ts rewrite (test base diverged), browserView-only files absent from this fork.
SKYIUOS (SKYIOUS)
added a commit
to SKYIOUS/COD
that referenced
this pull request
Aug 27, 2026
- README: Added session summary with security hardening, upstream fixes adopted, installer verification, branch hygiene, and test results - COMPARISON.md: Updated date, added Recent Verification section with security hardening details, test results, installer pipeline, branch hygiene - site/index.html: Added Security & Hardening section with MSRC-115444, microsoft#330308 hardening, 183 upstream fixes adopted; fixed HTML entity encoding All data from verified session work (2026-08-26): 183 upstream fixes adopted, 11,419 tests passing / 120 failing (all pre-existing), 4 installers verified, 4,855 upstream refs reduced to 2, zero regressions.
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.
No description provided.