From 42eac4a16ae5e1294328e7ea754fe53b99c96203 Mon Sep 17 00:00:00 2001 From: ConnorQi01 Date: Fri, 12 Jun 2026 18:23:47 +0800 Subject: [PATCH 1/2] Fix path traversal detection on Windows in validateDestinationPath --- src/extension/networkInspector/certificateProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension/networkInspector/certificateProvider.ts b/src/extension/networkInspector/certificateProvider.ts index 7bcfc4737..5377cb916 100644 --- a/src/extension/networkInspector/certificateProvider.ts +++ b/src/extension/networkInspector/certificateProvider.ts @@ -332,7 +332,7 @@ export class CertificateProvider { } private validateDestinationPath(destination: string, os: ClientOS): void { - if (destination.split(/[\\/]+/).includes("..")) { + if (destination.split(path.sep).includes("..")) { throw new Error(`Path traversal not allowed in destination: ${destination}`); } From a4725d2d137c690739882d738a4bd8035dc0f0cb Mon Sep 17 00:00:00 2001 From: ConnorQi01 Date: Fri, 12 Jun 2026 18:27:59 +0800 Subject: [PATCH 2/2] Skip installPods enhanced environment test on non-macOS platforms --- test/extension/commands/installPods.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/extension/commands/installPods.test.ts b/test/extension/commands/installPods.test.ts index 5687aa165..e3913046f 100644 --- a/test/extension/commands/installPods.test.ts +++ b/test/extension/commands/installPods.test.ts @@ -328,6 +328,9 @@ suite("installPodsCommand", function () { suite("Enhanced environment", function () { test("should inject Ruby and CocoaPods paths and default shell and locale values", function () { + if (process.platform !== "darwin") { + this.skip(); + } const homeDir = "/Users/test-user"; const originalEnv = { PATH: process.env.PATH,