Skip to content

Commit 0befe83

Browse files
nullvariantclaude
andauthored
refactor!: remove Workspace Trust implementation (#151)
VS Code's default behavior (complete extension disable in untrusted workspaces) is more secure than our custom partial restrictions. BREAKING CHANGE: `gitIdSwitcher.disableWorkspaceTrust` setting removed. Removed: workspaceTrust.ts, operationGuard.ts, operationClassification.ts, related tests, i18n keys (17 languages), README sections (26 files). 🖥️ IDE: [Cursor](https://cursor.sh) 🔌 Extension: [Claude Code](https://claude.ai/download) Model-Raw: claude-opus-4-5-20251101 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 72edfe3 commit 0befe83

73 files changed

Lines changed: 71 additions & 3132 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

extensions/git-id-switcher/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.12.0] - 2026-01-14
11+
12+
### Removed
13+
14+
- **Workspace Trust**: Removed custom Workspace Trust implementation (introduced in v0.11.0)
15+
- VS Code's default behavior (complete extension disable in untrusted workspaces) is more secure than partial functionality restrictions
16+
- Removed `gitIdSwitcher.disableWorkspaceTrust` setting
17+
- Removed confirmation dialogs for untrusted workspaces
18+
- Removed trust-related localized messages from all 17 languages
19+
- Removed Workspace Trust section from all 26 README documentation files
20+
21+
### Security
22+
23+
- **Improved Security Posture**: Relying on VS Code's native Workspace Trust (complete disable) instead of custom partial restrictions provides stronger security guarantees
24+
1025
## [0.11.3] - 2026-01-14
1126

1227
### Added

extensions/git-id-switcher/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -588,32 +588,6 @@ If you previously saved empty settings, they may have synced to the cloud and ar
588588

589589
---
590590

591-
## Workspace Trust
592-
593-
Git ID Switcher supports VS Code's [Workspace Trust](https://code.visualstudio.com/docs/editor/workspace-trust) feature. In untrusted workspaces, dangerous operations are automatically restricted.
594-
595-
### Behavior in Untrusted Workspaces
596-
597-
| Operation | Behavior |
598-
| ----------------------- | ----------------------------- |
599-
| View identities | ✅ Allowed |
600-
| View current Git config | ✅ Allowed |
601-
| Switch identity | ⚠️ User confirmation required |
602-
| Modify Git config | ❌ Blocked |
603-
| SSH key operations | ❌ Blocked |
604-
605-
### Disabling (Not Recommended)
606-
607-
If you absolutely need to disable workspace trust checks:
608-
609-
1. Open Settings (`Cmd+,` / `Ctrl+,`)
610-
2. Search for `gitIdSwitcher.disableWorkspaceTrust`
611-
3. Enable the setting
612-
613-
⚠️ **Warning**: Enabling this setting reduces security. Use only when absolutely necessary.
614-
615-
---
616-
617591
## Design Philosophy
618592

619593
> "Who am I?" — That's the only question this extension answers.

extensions/git-id-switcher/docs/i18n/ain/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -556,32 +556,6 @@ VS Code 設定スキーマ メモリ キャッシュ、"Reload Window" ウン re
556556

557557
---
558558

559-
## Workspace Trust
560-
561-
Git ID Switcher VS Code ウン [Workspace Trust](https://code.visualstudio.com/docs/editor/workspace-trust) サポート。Trust ソモ ウン workspace オッタ、ウェン オペレーション 自動 ブロック。
562-
563-
### Trust ソモ ウン Workspace オッタ
564-
565-
| オペレーション | 動作 |
566-
| --------------------- | ---------------------- |
567-
| ID エヌカㇻ | ✅ ピㇼカ |
568-
| エネアン Git config | ✅ ピㇼカ |
569-
| ID チェンジ | ⚠️ ユーザー確認 イル |
570-
| Git config 変更 | ❌ ブロック |
571-
| SSH 鍵 オペレーション | ❌ ブロック |
572-
573-
### 無効化(レコンメンド ソモ)
574-
575-
Workspace trust チェック 無効 イル:
576-
577-
1. Settings (`Cmd+,` / `Ctrl+,`)
578-
2. `gitIdSwitcher.disableWorkspaceTrust` サーチ
579-
3. 設定 有効
580-
581-
⚠️ **ウェン:** クコロ 設定 セキュリティ ウェン。イル ネㇷ゚キ コロ ユース。
582-
583-
---
584-
585559
## Design Philosophy
586560

587561
> 「クアニ ネノ ネ?」— クコロ extension ネイタ ハウェアン。

extensions/git-id-switcher/docs/i18n/bg/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -536,32 +536,6 @@ VS Code и други редактори пазят схемата на наст
536536

537537
---
538538

539-
## Доверие на работното пространство
540-
541-
Git ID Switcher поддържа функцията [Workspace Trust](https://code.visualstudio.com/docs/editor/workspace-trust) на VS Code. В недоверени работни пространства опасните операции автоматично се ограничават.
542-
543-
### Поведение в недоверени работни пространства
544-
545-
| Операция | Поведение |
546-
| ------------------------- | ----------------------------- |
547-
| Преглед на самоличности | ✅ Разрешено |
548-
| Преглед на текущ Git config | ✅ Разрешено |
549-
| Смяна на самоличност | ⚠️ Изисква потвърждение от потребителя |
550-
| Промяна на Git config | ❌ Блокирано |
551-
| Операции със SSH ключове | ❌ Блокирано |
552-
553-
### Деактивиране (не се препоръчва)
554-
555-
Ако се наложи да деактивирате проверката за доверие на работното пространство:
556-
557-
1. Отворете Настройки (`Cmd+,` / `Ctrl+,`)
558-
2. Потърсете `gitIdSwitcher.disableWorkspaceTrust`
559-
3. Активирайте настройката
560-
561-
⚠️ **Предупреждение**: Активирането на тази настройка намалява сигурността. Използвайте само при крайна необходимост.
562-
563-
---
564-
565539
## Философия на дизайна
566540

567541
> "Кой съм аз?" — Единственият въпрос, на който това разширение отговаря.

extensions/git-id-switcher/docs/i18n/cs/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -535,32 +535,6 @@ Pokud jste dříve uložili prázdná nastavení, mohla být synchronizována do
535535

536536
---
537537

538-
## Důvěra pracovního prostoru
539-
540-
Git ID Switcher podporuje funkci [Workspace Trust](https://code.visualstudio.com/docs/editor/workspace-trust) ve VS Code. V nedůvěryhodných pracovních prostorech jsou nebezpečné operace automaticky omezeny.
541-
542-
### Chování v nedůvěryhodných pracovních prostorech
543-
544-
| Operace | Chování |
545-
| --------------------------- | ------------------------------ |
546-
| Zobrazení identit | ✅ Povoleno |
547-
| Zobrazení aktuální Git konfigurace | ✅ Povoleno |
548-
| Přepnutí identity | ⚠️ Vyžaduje potvrzení uživatele |
549-
| Změna Git konfigurace | ❌ Blokováno |
550-
| Operace s SSH klíči | ❌ Blokováno |
551-
552-
### Zakázání (nedoporučeno)
553-
554-
Pokud opravdu potřebujete zakázat kontrolu důvěry pracovního prostoru:
555-
556-
1. Otevřete Nastavení (`Cmd+,` / `Ctrl+,`)
557-
2. Vyhledejte `gitIdSwitcher.disableWorkspaceTrust`
558-
3. Zapněte nastavení
559-
560-
⚠️ **Varování**: Zapnutí tohoto nastavení snižuje bezpečnost. Používejte pouze v nezbytných případech.
561-
562-
---
563-
564538
## Filozofie návrhu
565539

566540
> "Kdo jsem?" — Jediná otázka, na kterou toto rozšíření odpovídá.

extensions/git-id-switcher/docs/i18n/de/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -536,32 +536,6 @@ Wenn Sie zuvor leere Einstellungen gespeichert haben, wurden sie möglicherweise
536536

537537
---
538538

539-
## Arbeitsbereich-Vertrauen
540-
541-
Git ID Switcher unterstützt die [Arbeitsbereich-Vertrauen](https://code.visualstudio.com/docs/editor/workspace-trust)-Funktion von VS Code. In nicht vertrauenswürdigen Arbeitsbereichen werden gefährliche Operationen automatisch eingeschränkt.
542-
543-
### Verhalten in nicht vertrauenswürdigen Arbeitsbereichen
544-
545-
| Operation | Verhalten |
546-
| --------------------------- | ---------------------------- |
547-
| Identitäten anzeigen | ✅ Erlaubt |
548-
| Aktuelle Git-Konfig anzeigen | ✅ Erlaubt |
549-
| Identität wechseln | ⚠️ Benutzerbestätigung nötig |
550-
| Git-Konfig ändern | ❌ Blockiert |
551-
| SSH-Schlüssel-Operationen | ❌ Blockiert |
552-
553-
### Deaktivierung (nicht empfohlen)
554-
555-
Falls Sie die Arbeitsbereich-Vertrauensprüfung unbedingt deaktivieren müssen:
556-
557-
1. Öffnen Sie die Einstellungen (`Cmd+,` / `Strg+,`)
558-
2. Suchen Sie nach `gitIdSwitcher.disableWorkspaceTrust`
559-
3. Aktivieren Sie die Einstellung
560-
561-
⚠️ **Warnung**: Die Aktivierung dieser Einstellung verringert die Sicherheit. Verwenden Sie sie nur, wenn es unbedingt erforderlich ist.
562-
563-
---
564-
565539
## Designphilosophie
566540

567541
> „Wer bin ich?" — Die einzige Frage, die diese Erweiterung beantwortet.

extensions/git-id-switcher/docs/i18n/en/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -584,32 +584,6 @@ If you previously saved empty settings, they may have synced to the cloud and ar
584584

585585
---
586586

587-
## Workspace Trust
588-
589-
Git ID Switcher supports VS Code's [Workspace Trust](https://code.visualstudio.com/docs/editor/workspace-trust) feature. In untrusted workspaces, dangerous operations are automatically restricted.
590-
591-
### Behavior in Untrusted Workspaces
592-
593-
| Operation | Behavior |
594-
| ----------------------- | ----------------------------- |
595-
| View identities | ✅ Allowed |
596-
| View current Git config | ✅ Allowed |
597-
| Switch identity | ⚠️ User confirmation required |
598-
| Modify Git config | ❌ Blocked |
599-
| SSH key operations | ❌ Blocked |
600-
601-
### Disabling (Not Recommended)
602-
603-
If you absolutely need to disable workspace trust checks:
604-
605-
1. Open Settings (`Cmd+,` / `Ctrl+,`)
606-
2. Search for `gitIdSwitcher.disableWorkspaceTrust`
607-
3. Enable the setting
608-
609-
⚠️ **Warning**: Enabling this setting reduces security. Use only when absolutely necessary.
610-
611-
---
612-
613587
## Design Philosophy
614588

615589
> "Who am I?" — That's the only question this extension answers.

extensions/git-id-switcher/docs/i18n/eo/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -556,32 +556,6 @@ Se vi antaŭe konservis malplenajn agordojn, ili estis sinkronigitaj al la nubo
556556

557557
---
558558

559-
## Laborspaca Fido
560-
561-
Ĉi tiu etendaĵo respektas la [Laborspaca Fido](https://code.visualstudio.com/docs/editor/workspace-trust) funkcion de VS Code.
562-
563-
En **nefidataj laborspacoj**, iuj operacioj estas limigitaj por protekti vian sistemon:
564-
565-
| Operacio | Fidata Laborspaco | Nefidata Laborspaco |
566-
|----------|-------------------|---------------------|
567-
| 🔀 Ŝanĝo de Git-identeco | ✅ Permesita | ⚠️ Postulas konfirmon |
568-
| 🔑 SSH-ŝlosila ŝanĝo | ✅ Permesita | ⚠️ Postulas konfirmon |
569-
| ⌨️ Ekzekuto de SSH-komando | ✅ Permesita | ⚠️ Postulas konfirmon |
570-
| 📁 Ŝanĝo de Git-agordoj | ✅ Permesita | ⚠️ Postulas konfirmon |
571-
| 👁️ Nur-lega vido de identeco | ✅ Permesita | ✅ Permesita |
572-
573-
### Malŝalti laborspacan fido-kontrolon
574-
575-
Se vi volas malŝalti la kontrolon, sekvu ĉi tiujn paŝojn:
576-
577-
1. Malfermu VS Code-agordojn
578-
2. Serĉu `gitIdSwitcher.security.requireWorkspaceTrust`
579-
3. Malŝaltu la agordon
580-
581-
> ⚠️ **Averto**: Malŝalti ĉi tiun funkcion permesas eksterajn komandojn sen fidkontrolo. Uzu nur en fidataj medioj.
582-
583-
---
584-
585559
## Dezajna Filozofio
586560

587561
> "Kiu mi estas?" — La sola demando, kiun ĉi tiu etendaĵo respondas.

extensions/git-id-switcher/docs/i18n/es/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -536,32 +536,6 @@ Si guardaste ajustes vacíos anteriormente, pueden haberse sincronizado a la nub
536536

537537
---
538538

539-
## Confianza del espacio de trabajo
540-
541-
Git ID Switcher soporta la función [Workspace Trust](https://code.visualstudio.com/docs/editor/workspace-trust) de VS Code. En espacios de trabajo no confiables, las operaciones peligrosas se restringen automáticamente.
542-
543-
### Comportamiento en espacios de trabajo no confiables
544-
545-
| Operación | Comportamiento |
546-
| ---------------------------- | ------------------------------ |
547-
| Ver identidades | ✅ Permitido |
548-
| Ver configuración Git actual | ✅ Permitido |
549-
| Cambiar identidad | ⚠️ Requiere confirmación del usuario |
550-
| Modificar configuración Git | ❌ Bloqueado |
551-
| Operaciones con claves SSH | ❌ Bloqueado |
552-
553-
### Desactivación (no recomendado)
554-
555-
Si realmente necesitas desactivar las comprobaciones de confianza del espacio de trabajo:
556-
557-
1. Abre Ajustes (`Cmd+,` / `Ctrl+,`)
558-
2. Busca `gitIdSwitcher.disableWorkspaceTrust`
559-
3. Activa el ajuste
560-
561-
⚠️ **Advertencia**: Activar este ajuste reduce la seguridad. Úsalo solo cuando sea absolutamente necesario.
562-
563-
---
564-
565539
## Filosofía de diseño
566540

567541
> "¿Quién soy yo?" — La única pregunta que responde esta extensión.

extensions/git-id-switcher/docs/i18n/fr/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -536,32 +536,6 @@ Si vous avez précédemment sauvegardé des paramètres vides, ils peuvent avoir
536536

537537
---
538538

539-
## Confiance de l'espace de travail
540-
541-
Git ID Switcher prend en charge la fonctionnalité [Confiance de l'espace de travail](https://code.visualstudio.com/docs/editor/workspace-trust) de VS Code. Dans les espaces de travail non approuvés, les opérations dangereuses sont automatiquement restreintes.
542-
543-
### Comportement dans les espaces de travail non approuvés
544-
545-
| Opération | Comportement |
546-
| -------------------------- | ----------------------------- |
547-
| Afficher les identités | ✅ Autorisé |
548-
| Afficher le Git config | ✅ Autorisé |
549-
| Changer d'identité | ⚠️ Confirmation requise |
550-
| Modifier le Git config | ❌ Bloqué |
551-
| Opérations sur les clés SSH | ❌ Bloqué |
552-
553-
### Désactivation (non recommandé)
554-
555-
Si vous devez absolument désactiver les vérifications de confiance de l'espace de travail :
556-
557-
1. Ouvrez les Paramètres (`Cmd+,` / `Ctrl+,`)
558-
2. Recherchez `gitIdSwitcher.disableWorkspaceTrust`
559-
3. Activez le paramètre
560-
561-
⚠️ **Avertissement** : L'activation de ce paramètre réduit la sécurité. N'utilisez-le qu'en cas de nécessité absolue.
562-
563-
---
564-
565539
## Philosophie de conception
566540

567541
> « Qui suis-je ? » — La seule question à laquelle cette extension répond.

0 commit comments

Comments
 (0)