Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): harden Open VSX theme imports #8063

ClosedStiensWout(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/8063/headopened View on GitHub

Problem

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 typecheck
  • vp fmt --check apps/web/src/openVsxThemes.ts apps/web/src/openVsxThemes.test.ts
  • vp 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.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e3280205adc1bb7a59456dc52147ca579232ab22. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

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.org origin and reject credentials; redirects only allowed to official Open VSX CDN origins via new isTrustedOpenVsxResourceUrl and fetchOpenVsxResource helpers
  • Rejects unverified extensions and those lacking publishedBy; extensionFromDetail now extracts publisher identity, repository URL, and sets verified: true
  • Adds refreshSelectedExtension to re-fetch extension details before import, rejecting if publisher identity, version, or repository URL changed since selection
  • Introduces withRequestTimeout with IMPORT_REQUEST_TIMEOUT_MS = 30_000; imports abort and throw a contextual timeout error after 30 seconds
  • Risk: trustedOpenVsxUrl now 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
Macroscope summarized e328020.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: fab239c1-5333-464e-a341-5f152412f0ec

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. 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).

Sign in to join this conversation.