From a2f1112e563b20e3a4fe33683affc645b40536ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2026 19:16:10 +0000 Subject: [PATCH 1/2] Bump minimatch from 6.2.3 to 11.0.9 Bumps [minimatch](https://github.com/isaacs/minimatch) from 6.2.3 to 11.0.9. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](https://github.com/isaacs/minimatch/compare/v6.2.3...v11.0.9) --- updated-dependencies: - dependency-name: minimatch dependency-version: 11.0.9 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 180 ++++++++-------------------------------------- package.json | 2 +- 2 files changed, 29 insertions(+), 153 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f48e4ec..b664aa8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "destroy": "^1.0.4", "is-url": "^1.2.2", "mime-types": "^2.1.35", - "minimatch": "^6.1.6", + "minimatch": "^11.0.9", "morgan": "^1.8.2", "on-finished": "^2.2.0", "on-headers": "^1.0.0", @@ -479,29 +479,6 @@ "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@eslint/config-array/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@eslint/config-array/node_modules/minimatch": { "version": "10.2.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", @@ -667,6 +644,12 @@ "node": ">=18.0.0" } }, + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", + "license": "BlueOak-1.0.0" + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1482,29 +1465,6 @@ "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { "version": "10.2.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", @@ -1743,9 +1703,13 @@ "license": "MIT" }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/baseline-browser-mapping": { "version": "2.11.20", @@ -1813,12 +1777,15 @@ } }, "node_modules/brace-expansion": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", - "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.1.0.tgz", + "integrity": "sha512-aa11Dv491GKnYqxaul3aRJ0szew7yMJMfZPnqD44NjGrZXoj62l41OEDDpdpC4eE2P88vBFfLuSyRhpG91NUvg==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/browser-stdout": { @@ -2767,29 +2734,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/eslint/node_modules/minimatch": { "version": "10.2.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", @@ -3215,29 +3159,6 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/glob/node_modules/lru-cache": { "version": "11.5.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz", @@ -4005,15 +3926,16 @@ } }, "node_modules/minimatch": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.3.tgz", - "integrity": "sha512-5rvZbDy5y2k40rre/0OBbYnl03en25XPU3gOVO7532beGMjAipq88VdS9OeLOZNrD+Tb0lDhBJHZ7Gcd8qKlPg==", - "license": "ISC", + "version": "11.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz", + "integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^2.0.1" + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" }, "engines": { - "node": ">=10" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -4081,29 +4003,6 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/mocha/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/mocha/node_modules/is-path-inside": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", @@ -5551,29 +5450,6 @@ "node": "20 || >=22" } }, - "node_modules/test-exclude/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/test-exclude/node_modules/minimatch": { "version": "10.2.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", diff --git a/package.json b/package.json index 6a540a41..dee7e157 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "destroy": "^1.0.4", "is-url": "^1.2.2", "mime-types": "^2.1.35", - "minimatch": "^6.1.6", + "minimatch": "^11.0.9", "morgan": "^1.8.2", "on-finished": "^2.2.0", "on-headers": "^1.0.0", From 39778745df4cc2b01ed2fb2af72c77a32c578220 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Fri, 4 Dec 2026 11:52:58 -0800 Subject: [PATCH 2/2] fix!: bump minimatch to 11.0.10 and enforce POSIX URL matching - Bump minimatch from ^11.0.9 to ^11.0.10 (fixes GHSA-3924-r96c-gp9w) - Pass { platform: "linux" } to minimatch() so HTTP URL paths use consistent POSIX matching across OSes - Add win32-simulated unit test in test/unit/utils/patterns.spec.ts --- package-lock.json | 8 +++--- package.json | 2 +- src/utils/patterns.ts | 3 ++- test/unit/utils/patterns.spec.ts | 43 ++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b664aa8c..69780e28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "destroy": "^1.0.4", "is-url": "^1.2.2", "mime-types": "^2.1.35", - "minimatch": "^11.0.9", + "minimatch": "^11.0.10", "morgan": "^1.8.2", "on-finished": "^2.2.0", "on-headers": "^1.0.0", @@ -3926,9 +3926,9 @@ } }, "node_modules/minimatch": { - "version": "11.0.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz", - "integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==", + "version": "11.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.10.tgz", + "integrity": "sha512-L3/cjhQ5E6lft0VCp/2mO3Ic74RnutKy3rz7iGwp/6w1hKcO262g2rbfacFyw6eBig5OdI0nu5PpuA0/WQs9Tw==", "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/nonrecursive-glob-match": "^1.1.0", diff --git a/package.json b/package.json index dee7e157..8977312b 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "destroy": "^1.0.4", "is-url": "^1.2.2", "mime-types": "^2.1.35", - "minimatch": "^11.0.9", + "minimatch": "^11.0.10", "morgan": "^1.8.2", "on-finished": "^2.2.0", "on-headers": "^1.0.0", diff --git a/src/utils/patterns.ts b/src/utils/patterns.ts index ec82e7c3..ec6b4ee9 100644 --- a/src/utils/patterns.ts +++ b/src/utils/patterns.ts @@ -62,7 +62,8 @@ export function configMatcher( const glob = config.glob ?? config.source; const regex = config.regex; if (glob) { - return minimatch(path, glob); + // Match HTTP URL paths with POSIX semantics regardless of host OS. + return minimatch(path, glob, { platform: "linux" }); } if (regex) { const pattern = RE2 ? new RE2(regex, "u") : new RegExp(regex, "u"); diff --git a/test/unit/utils/patterns.spec.ts b/test/unit/utils/patterns.spec.ts index 4101bd8d..08b74634 100644 --- a/test/unit/utils/patterns.spec.ts +++ b/test/unit/utils/patterns.spec.ts @@ -135,6 +135,49 @@ describe("patterns", () => { patterns.configMatcher("/foo", { glob: "", source: "", regex: "" }), ).to.equal(false); }); + + it("uses POSIX URL matching even when minimatch defaults to win32", () => { + const baseRequire = originalCreateRequire(__filename); + const patternsPath = baseRequire.resolve("../../../src/utils/patterns"); + const minimatchPath = baseRequire.resolve("minimatch"); + const prevPlatform = process.env.__MINIMATCH_TESTING_PLATFORM__; + + process.env.__MINIMATCH_TESTING_PLATFORM__ = "win32"; + delete require.cache[minimatchPath]; + delete require.cache[patternsPath]; + + try { + const winPatterns = baseRequire(patternsPath) as PatternsModule; + + // Leading "//" is collapsed like a URL path, not treated as a Windows UNC root. + expect( + winPatterns.configMatcher("//foo/bar", { glob: "/foo/bar" }), + ).to.equal(true); + // Backslashes in a URL path are not treated as path separators. + expect( + winPatterns.configMatcher("/foo\\bar", { glob: "/foo/bar" }), + ).to.equal(false); + // UNC host/share case-insensitivity and long UNC aliases do not apply to URLs. + expect( + winPatterns.configMatcher("//host/share/file", { + glob: "//HOST/SHARE/file", + }), + ).to.equal(false); + expect( + winPatterns.configMatcher("//?/UNC/host/share/a", { + glob: "//host/share/a", + }), + ).to.equal(false); + } finally { + if (prevPlatform === undefined) { + delete process.env.__MINIMATCH_TESTING_PLATFORM__; + } else { + process.env.__MINIMATCH_TESTING_PLATFORM__ = prevPlatform; + } + delete require.cache[minimatchPath]; + delete require.cache[patternsPath]; + } + }); }); describe("createRaw", () => {