Turborepo is a high-performance build system for JavaScript and TypeScript codebases. Prior to 2.9.14000, the Turborepo LSP VS Code extension could execute shell commands derived from workspace-controlled values. The extension used string-based command execution for Turborepo daemon commands and task runs. A malicious workspace could provide crafted values through workspace settings or task names in the repository's source code that were interpolated into shell commands. When the extension activated or when a user ran a task through the extension, those values could be interpreted by the user's shell, allowing arbitrary command execution with the privileges of the local VS Code process. This vulnerability is fixed in 2.9.14000.
Turborepo LSP VS Code extension versions prior to 2.9.14000 are vulnerable to arbitrary command execution through shell command injection via workspace-controlled values. A malicious workspace can exploit this by crafting values in workspace settings or task names that are interpolated into shell commands executed with VS Code process privileges. This vulnerability poses significant risk to Saudi developers and organizations using Turborepo for JavaScript/TypeScript development, particularly in fintech and government digital transformation initiatives.
IMMEDIATE ACTIONS:
1. Audit all Turborepo LSP VS Code extension installations across development teams and identify current versions
2. Restrict cloning/opening of untrusted repositories in VS Code until patching is complete
3. Disable Turborepo LSP extension in VS Code if not actively required for development
4. Review recent workspace configurations and task definitions for suspicious values
PATCHING GUIDANCE:
1. Update Turborepo LSP VS Code extension to version 2.9.14000 or later immediately upon release
2. Verify extension updates through official VS Code Marketplace only
3. Implement automated extension update policies in organizational VS Code configurations
COMPENSATING CONTROLS (until patch available):
1. Implement workspace trust policies in VS Code - enable 'Restricted Mode' for untrusted workspaces
2. Use VS Code's built-in workspace trust feature to require explicit approval before executing tasks
3. Restrict developer access to clone repositories only from approved internal sources
4. Implement code review processes for any workspace configuration files (.vscode/settings.json, turborepo.json)
5. Monitor VS Code process execution logs for suspicious shell command patterns
DETECTION RULES:
1. Monitor for VS Code spawning shell processes (cmd.exe, powershell.exe, bash, sh) with unusual arguments
2. Alert on execution of commands containing interpolated variables from workspace settings
3. Track modifications to .vscode/settings.json and turborepo configuration files
4. Monitor for VS Code processes executing commands outside typical development tool paths
الإجراءات الفورية:
1. تدقيق جميع تثبيتات إضافة Turborepo LSP في VS Code عبر فرق التطوير وتحديد الإصدارات الحالية
2. تقييد استنساخ/فتح المستودعات غير الموثوقة في VS Code حتى اكتمال التصحيح
3. تعطيل إضافة Turborepo LSP في VS Code إذا لم تكن مطلوبة بنشاط للتطوير
4. مراجعة تكوينات مساحة العمل الأخيرة وتعريفات المهام للقيم المريبة
إرشادات التصحيح:
1. تحديث إضافة Turborepo LSP في VS Code إلى الإصدار 2.9.14000 أو أحدث فوراً عند الإصدار
2. التحقق من تحديثات الإضافة من خلال سوق VS Code الرسمي فقط
3. تنفيذ سياسات تحديث الإضافات الآلية في تكوينات VS Code التنظيمية
الضوابط البديلة (حتى توفر التصحيح):
1. تنفيذ سياسات ثقة مساحة العمل في VS Code - تفعيل 'الوضع المقيد' لمساحات العمل غير الموثوقة
2. استخدام ميزة ثقة مساحة العمل المدمجة في VS Code لطلب موافقة صريحة قبل تنفيذ المهام
3. تقييد وصول المطورين لاستنساخ المستودعات من المصادر الداخلية المعتمدة فقط
4. تنفيذ عمليات مراجعة الأكواد لأي ملفات تكوين مساحة العمل
5. مراقبة سجلات تنفيذ عمليات VS Code للأنماط المريبة
قواعد الكشف:
1. مراقبة VS Code الذي ينتج عمليات shell بحجج غير عادية
2. تنبيه عند تنفيذ أوامر تحتوي على متغيرات مدرجة من إعدادات مساحة العمل
3. تتبع التعديلات على ملفات تكوين مساحة العمل
4. مراقبة عمليات VS Code التي تنفذ أوامر خارج مسارات أدوات التطوير النموذجية