Skip to content

fix: backport upstream VS Code advisory fixes (copilot config scope, iframe parentOrigin, notebook render) - #286

Merged
sachinh-amazon merged 1 commit into
mainfrom
fix/backport-advisory-fixes
Jul 28, 2026
Merged

fix: backport upstream VS Code advisory fixes (copilot config scope, iframe parentOrigin, notebook render)#286
sachinh-amazon merged 1 commit into
mainfrom
fix/backport-advisory-fixes

Conversation

@sachinh-amazon

Copy link
Copy Markdown
Contributor

Issue

Description of Changes

Addresses the upstream microsoft/vscode security advisories flagged by the "Scan GitHub Security Advisories" step of the nightly Security Scan (all fixed upstream in VS Code 1.128.1), by backporting the upstream fixes where the affected code ships and registering each finding in patches/backported-patches.json.

  • Copilot debug endpoint override hardening — backports upstream f05bcd1a: the advanced debug CAPI/proxy URL override settings are now read only from user (global) configuration, so a malicious workspace .vscode/settings.json cannot redirect requests to an attacker host. New quilt patch under patches/common/, added to all four series.
  • Extension host iframe parentOrigin validation — the existing patches/web-server/webview.diff already forces parentOrigin to window.origin in the non-validated path (equivalent to upstream 236fa7d8); registered as backported, no code change.
  • Notebook mermaid render — upstream bc2d56c6 targets an extension not present in Code Editor; the shipped mermaid extension renders via textContent/escaped HTML and the markdown notebook renderer uses DOMPurify, so there is no equivalent unsafe sink. Registered with a patch_path: "N/A" evidence note.

Testing

  • ./scripts/prepare-src.sh code-editor-sagemaker-server (and code-editor-server) apply the full patch series cleanly, including the new Copilot patch (no rejects).
  • ./scripts/security-scan.sh scan-github-advisories reports 0 concerning advisories (all three findings recognized as backported/handled).

Screenshots/Videos

N/A

Additional Notes

Backport patch carries @backported + @finding-id metadata for the rebase tooling and future removal (remove when Code-OSS ≥ 1.128.1). The same fix is being raised in parallel against the other active branches; the set of applicable changes differs per branch (older branches do not ship the Copilot extension).

Backporting

Raised in parallel against main, 1.0, 1.1, and 1.2.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…r backported iframe parentOrigin and mermaid render hardening

Add a quilt patch that reads the Copilot advanced debug CAPI/proxy URL override
settings only from user (global) scope so a workspace .vscode/settings.json cannot
redirect requests. Register the existing web worker extension host iframe
parentOrigin hardening (web-server/webview.diff) and document the notebook mermaid
render finding, which has no equivalent vulnerable sink in this branch's shipped
source, in backported-patches.json.
@sachinh-amazon
sachinh-amazon requested review from a team as code owners July 27, 2026 19:50
@sachinh-amazon
sachinh-amazon added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit 21cb62e Jul 28, 2026
3 checks passed
@sachinh-amazon
sachinh-amazon deleted the fix/backport-advisory-fixes branch July 28, 2026 08:13
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.

2 participants