fix(web): harden Open VSX theme imports #8063
main fromrefs/pull/8063/head·opened View on GitHubProblem#
Open VSX theme imports already treated VSIX packages as data and enforced archive limits, but search accepted unverified publishers and import reused metadata captured during search. Resource redirects were not checked against the official delivery origins, and imports had no end-to-end timeout.
Solution#
- only surface theme extensions from verified Open VSX publishers
- refetch the exact selected version before import and reject publisher or repository identity drift
- validate final response origins while allowing Open VSX's official Eclipse content CDN
- cap the full import at 30 seconds
- cover trust changes, redirect handling, cancellation, path traversal, include cycles, oversized files, compression bombs, and archive entry limits with focused tests
Validation#
vp test run apps/web/src/openVsxThemes.test.ts apps/web/src/vscodeThemeImport.test.ts(35 tests)vp run --filter @t3tools/web typecheckvp fmt --check apps/web/src/openVsxThemes.ts apps/web/src/openVsxThemes.test.tsvp lint apps/web/src/openVsxThemes.ts apps/web/src/openVsxThemes.test.ts
Built with GPT-5.6-Sol through the Codex harness in T3 Code.
Note
Medium Risk Touches supply-chain trust for third-party theme downloads (URL allowlisting, publisher identity, verification). Unverified themes will now be omitted from search rather than importable.
Overview Tightens Open VSX theme search and import so only verified publishers are shown, and the selected version is refetched before download to reject publisher, repository, or verification drift.
All fetches now go through trusted open-vsx.org URLs, reject credentialed URLs, and check the final redirect origin (allowing the official Eclipse asset CDN). Imports are capped at 30s. Tests cover identity drift, untrusted redirects, timeouts, path traversal, include cycles, oversized files, compression bombs, and zip entry limits.
Note
Harden Open VSX theme imports with origin validation, verification checks, and 30s timeout#
- Tightens URL trust rules in openVsxThemes.ts to require exact
https://open-vsx.orgorigin and reject credentials; redirects only allowed to official Open VSX CDN origins via newisTrustedOpenVsxResourceUrlandfetchOpenVsxResourcehelpers - Rejects unverified extensions and those lacking
publishedBy;extensionFromDetailnow extracts publisher identity, repository URL, and setsverified: true - Adds
refreshSelectedExtensionto re-fetch extension details before import, rejecting if publisher identity, version, or repository URL changed since selection - Introduces
withRequestTimeoutwithIMPORT_REQUEST_TIMEOUT_MS = 30_000; imports abort and throw a contextual timeout error after 30 seconds - Risk:
trustedOpenVsxUrlnow rejects URLs with username/password and non-exact origin matches, which may break any caller relying on loose origin matching or authenticated Open VSX URLs
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — The production changes materially alter the Open VSX download trust boundary by filtering verified publishers, revalidating identity, enforcing redirect origins, and adding timeout behavior. Because this is security-sensitive runtime logic with substantial new control flow, human review is warranted.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).StiensWout(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
fab239c1-5333-464e-a341-5f152412f0ecYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share