diff --git a/SECURITY.md b/SECURITY.md index 35e0587d6..203c3fe59 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -221,6 +221,22 @@ remain dependency risk for release review. a documented override. The resolved graph no longer contains 7.x; remove the override when WDIO widens its dependency range. +- **[GHSA-3g3m-2fjr-6pw4](https://github.com/advisories/GHSA-3g3m-2fjr-6pw4): + glob 10.5.0 / 13.0.6 (npm, dev-only)**. AbortSignal cancellation does not + stop the walker. The patched line is 14.0.2+; 10.x and 13.x still export + `sync` / `globSync`, so the workspace overrides `glob@>=9` to 14.0.3. + mocha's glob 8.1.0 is outside the advisory range (introduced in 9.0.0). + +- **[GHSA-g3hv-75wg-m249](https://github.com/advisories/GHSA-g3hv-75wg-m249): + minimatch (npm, dev-only)**. Pattern amplification in + `firstPhasePreProcess` when `optimizationLevel >= 2`. Fixed only in + 11.0.1+. The workspace overrides `minimatch@>=9` to 11.0.3 (Stryker, + typescript-eslint, and the glob 10 leftover). mocha 10 and ts-prune still + `require('minimatch')` as a function, so 3.1.5 and 5.1.9 stay on their + lines and are ignored in `osv-scanner.toml` until 2026-12-30. Those + consumers match repo-controlled paths; the 3.x/5.x code does not have + the described preprocessor. + - **[RUSTSEC-2024-0429](https://rustsec.org/advisories/RUSTSEC-2024-0429.html) (GHSA-wrw7-89jp-8q8g): glib 0.18.x (cargo, desktop runtime)**. Unsoundness in `Iterator`/`DoubleEndedIterator` impls for `glib::VariantStrIter`; fixed in glib 0.20.0. The whole gtk-rs 0.18 stack diff --git a/osv-scanner.toml b/osv-scanner.toml index 0d4f61e56..ee46e0c38 100644 --- a/osv-scanner.toml +++ b/osv-scanner.toml @@ -1,7 +1,10 @@ # OSV-Scanner allowlist for lockfile findings that already exist on master. # This does not hide anything from scripts/security/dependency-advisories.mjs. -# Each entry names the remaining exposure and why this PR does not bump the -# lockfile. ignoreUntil is about 90 days out (2027-01-21); revisit then. +# Each IgnoredVulns entry names the remaining exposure and why this PR does +# not bump the lockfile. ignoreUntil is about 90 days out (2027-01-21); +# revisit then. PackageOverrides for leftover minimatch 3.x/5.x expire +# 2026-12-30 (~60 days) because those majors cannot take the patched 11.x +# CJS namespace without rewriting mocha and ts-prune. [[IgnoredVulns]] id = "RUSTSEC-2024-0436" @@ -67,3 +70,25 @@ reason = "smol-toml 1.7.1 is Knip/WDIO tooling parsing repo-controlled config. P id = "GHSA-qwgh-2vcv-g2f7" ignoreUntil = 2027-01-21 reason = "block-buffer 0.10.4 has no 0.10.x patch. GHSA-qwgh-2vcv-g2f7 is EagerBuffer/ReadBuffer (0.11+), fixed only in 0.12.1. Pulled by sha2 0.10 via tauri-codegen/wry; digest 0.10 cannot take 0.12. cargo-audit does not flag 0.10.4." + +# GHSA-g3hv-75wg-m249 is fixed only in minimatch 11.0.1. The workspace +# overrides 9.x/10.x onto that line. 3.x/5.x cannot take the major: mocha +# and ts-prune still `require('minimatch')` as a function, while 11.x CJS +# is a namespace. Ignore the leftover versions, not the advisory id, so a +# later 9.x/10.x regression still fails the scan. + +[[PackageOverrides]] +name = "minimatch" +version = "3.1.5" +ecosystem = "npm" +ignore = true +effectiveUntil = 2026-12-30 +reason = "Dev-only @ts-morph/common 0.12.3 (ts-prune) and recursive-readdir 2.2.3 (create-wdio). Both require() minimatch as a CJS function or Minimatch constructor; 11.x CJS is not callable. Patterns are repo-controlled. 3.x has no firstPhasePreProcess / optimizationLevel >= 2 path from GHSA-g3hv-75wg-m249." + +[[PackageOverrides]] +name = "minimatch" +version = "5.1.9" +ecosystem = "npm" +ignore = true +effectiveUntil = 2026-12-30 +reason = "Dev-only mocha 10.8.2 (WDIO), filelist 1.0.6, readdir-glob 1.1.3 (archiver), and mocha's glob 8.1.0. mocha calls require('minimatch') as a function; 11.x CJS is not callable. Patterns are repo-controlled WDIO/archive paths. 5.x has no firstPhasePreProcess / optimizationLevel >= 2 path from GHSA-g3hv-75wg-m249." diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0881805d..3c29669e9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,6 +33,8 @@ overrides: postcss@8: 8.5.26 sharp: 0.35.5 zod: 4.6.6 + glob@>=9: 14.0.3 + minimatch@>=9: 11.0.3 patchedDependencies: braces@3.0.3: a6e05b72366c236c173e82dfdb1ef4062020f7ef190f9fdd72955ae33a8ec874 @@ -1846,9 +1848,8 @@ packages: '@types/node': optional: true - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} + '@isaacs/nonrecursive-glob-match@1.0.3': + resolution: {integrity: sha512-SI7kyKHq4XXDRozw+r9GlRZkia1ZkFrpLW98r2IC2Bpr8YkFGE3fvjzmxCG0x78A++69HmDNrDvSMYBZmHGpKA==} '@jest/diff-sequences@30.4.0': resolution: {integrity: sha512-zOpzlfUs45l6u7jm39qr87JCHUDsaeCtvL+kQe/Vn9jSnRB4/5IPXISm0h9I1vZW/o00Kn4UTJ2MOlhnUGwv3g==} @@ -2505,10 +2506,6 @@ packages: react: '>= 16.8' react-dom: '>= 16.8' - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - '@playwright/test@1.62.1': resolution: {integrity: sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ==} engines: {node: '>=20'} @@ -4239,9 +4236,6 @@ packages: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - easy-table@1.2.0: resolution: {integrity: sha512-OFzVOv03YpvtcWGe5AayU5G2hgybsg3iqA6drU8UaoZyB9jLGMTrz9+asnLp/E+6qPh88yEI1gvyZFZ41dmgww==} @@ -4271,9 +4265,6 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - empathic@2.0.1: resolution: {integrity: sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==} engines: {node: '>=14'} @@ -4541,10 +4532,6 @@ packages: resolution: {integrity: sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw==} engines: {node: '>=20'} - foreground-child@3.3.1: - resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} - engines: {node: '>=14'} - formatly@0.3.0: resolution: {integrity: sha512-9XNj/o4wrRFyhSMJOvsuyMwy8aUfBaZ1VrqHVfohyXf0Sw0e+yfKG+xZaY3arGCOMdwFsqObtzVOc1gU9KiT9w==} engines: {node: '>=18.3.0'} @@ -4642,13 +4629,8 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@10.5.0: - resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - hasBin: true - - glob@13.0.6: - resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} + glob@14.0.3: + resolution: {integrity: sha512-A1vjIwC3qpdCso45Iw127gnp7sPhqgY8lUQhDrArIs+GbmfaaVPFuoyy7WyLT9EPZCRZ7j7aLdwUhQmHWesEow==} engines: {node: 18 || 20 || >=22} glob@8.1.0: @@ -4964,9 +4946,6 @@ packages: resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} engines: {node: '>=8'} - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - jake@10.9.4: resolution: {integrity: sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==} engines: {node: '>=10'} @@ -5336,12 +5315,8 @@ packages: minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - minimatch@10.2.5: - resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} - engines: {node: 18 || 20 || >=22} - - minimatch@10.2.6: - resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + minimatch@11.0.3: + resolution: {integrity: sha512-iny/40PEGkNJQ5/Pv6z3nm6FbRAby32GeZRjCUJk2WnNDbgPSTcdI+DDvLqsgBdD4cD5sMtMheqPPnehCCa8Nw==} engines: {node: 18 || 20 || >=22} minimatch@3.1.5: @@ -5351,10 +5326,6 @@ packages: resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} engines: {node: '>=10'} - minimatch@9.0.9: - resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} - engines: {node: '>=16 || 14 >=14.17'} - minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -5590,9 +5561,6 @@ packages: resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} engines: {node: '>= 14'} - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - package-manager-detector@1.7.0: resolution: {integrity: sha512-xg1eHpwYL/D/HEdWw2goFZP6vV0FH7W+PZ5rFkGjdIDLtxq7EkzBUeT3m+lndYCt8wKbmofUu1MUdMCXkCk9ZQ==} @@ -5657,12 +5625,8 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - - path-scurry@2.0.2: - resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} + path-scurry@3.0.0: + resolution: {integrity: sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==} engines: {node: 18 || 20 || >=22} path-type@4.0.0: @@ -6296,10 +6260,6 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - string-width@7.2.0: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} @@ -7075,10 +7035,6 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - wrap-ansi@9.0.2: resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} engines: {node: '>=18'} @@ -8346,14 +8302,7 @@ snapshots: optionalDependencies: '@types/node': 26.2.0 - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.2.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 + '@isaacs/nonrecursive-glob-match@1.0.3': {} '@jest/diff-sequences@30.4.0': {} @@ -8384,7 +8333,7 @@ snapshots: '@joshwooding/vite-plugin-react-docgen-typescript@0.7.0(typescript@6.0.3)(vite@8.2.4(@types/node@26.2.0)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.11)(yaml@2.9.0))': dependencies: - glob: 13.0.6 + glob: 14.0.3 react-docgen-typescript: 2.4.0(typescript@6.0.3) vite: 8.2.4(@types/node@26.2.0)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.11)(yaml@2.9.0) optionalDependencies: @@ -8787,9 +8736,6 @@ snapshots: react: 19.2.8 react-dom: 19.2.8(react@19.2.8) - '@pkgjs/parseargs@0.11.0': - optional: true - '@playwright/test@1.62.1': dependencies: playwright: 1.62.1 @@ -9098,7 +9044,7 @@ snapshots: execa: 9.6.1 json-rpc-2.0: 1.7.1 lodash.groupby: 4.6.0 - minimatch: 10.2.5 + minimatch: 11.0.3 mutation-server-protocol: 0.4.1 mutation-testing-elements: 3.7.3 mutation-testing-metrics: 3.7.3 @@ -9442,7 +9388,7 @@ snapshots: '@typescript-eslint/types': 8.70.1 '@typescript-eslint/visitor-keys': 8.70.1 debug: 4.4.3(supports-color@8.1.1) - minimatch: 10.2.6 + minimatch: 11.0.3 semver: 7.8.5 tinyglobby: 0.2.17 ts-api-utils: 2.5.0(typescript@5.9.3) @@ -9670,7 +9616,7 @@ snapshots: '@wdio/types': 9.30.1 '@wdio/utils': 9.30.1 deepmerge-ts: 8.0.0 - glob: 10.5.0 + glob: 14.0.3 import-meta-resolve: 4.2.0 jiti: 2.7.0 transitivePeerDependencies: @@ -9973,7 +9919,7 @@ snapshots: archiver-utils@5.0.2: dependencies: - glob: 10.5.0 + glob: 14.0.3 graceful-fs: 4.2.11 is-stream: 2.0.1 lazystream: 1.0.1 @@ -10708,8 +10654,6 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 - eastasianwidth@0.2.0: {} - easy-table@1.2.0: dependencies: ansi-regex: 5.0.1 @@ -10749,8 +10693,6 @@ snapshots: emoji-regex@8.0.0: {} - emoji-regex@9.2.2: {} - empathic@2.0.1: {} encoding-sniffer@0.2.1: @@ -11042,11 +10984,6 @@ snapshots: dependencies: tiny-inflate: 1.0.3 - foreground-child@3.3.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - formatly@0.3.0: dependencies: fd-package-json: 2.0.0 @@ -11146,20 +11083,11 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@10.5.0: + glob@14.0.3: dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.9 + minimatch: 11.0.3 minipass: 7.1.3 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - glob@13.0.6: - dependencies: - minimatch: 10.2.6 - minipass: 7.1.3 - path-scurry: 2.0.2 + path-scurry: 3.0.0 glob@8.1.0: dependencies: @@ -11446,12 +11374,6 @@ snapshots: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - jake@10.9.4: dependencies: async: 3.2.6 @@ -11814,12 +11736,9 @@ snapshots: minimalistic-assert@1.0.1: {} - minimatch@10.2.5: - dependencies: - brace-expansion: 5.0.12 - - minimatch@10.2.6: + minimatch@11.0.3: dependencies: + '@isaacs/nonrecursive-glob-match': 1.0.3 brace-expansion: 5.0.12 minimatch@3.1.5: @@ -11830,10 +11749,6 @@ snapshots: dependencies: brace-expansion: 2.1.7 - minimatch@9.0.9: - dependencies: - brace-expansion: 2.1.7 - minimist@1.2.8: {} minipass@7.1.3: {} @@ -12171,8 +12086,6 @@ snapshots: degenerator: 5.0.1 netmask: 2.1.1 - package-json-from-dist@1.0.1: {} - package-manager-detector@1.7.0: {} pako@1.0.11: {} @@ -12231,12 +12144,7 @@ snapshots: path-parse@1.0.7: {} - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.3 - - path-scurry@2.0.2: + path-scurry@3.0.0: dependencies: lru-cache: 11.5.2 minipass: 7.1.3 @@ -12955,12 +12863,6 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.2.0 - string-width@7.2.0: dependencies: emoji-regex: 10.6.0 @@ -13766,12 +13668,6 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.3 - string-width: 5.1.2 - strip-ansi: 7.2.0 - wrap-ansi@9.0.2: dependencies: ansi-styles: 6.2.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index bb9b18340..fe488fe45 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -84,6 +84,16 @@ overrides: # 4.6.5; knip and mutation-server-protocol still resolve 4.4.3. Pin the 4.x # line to the patched 4.6.6 release until those parents move. "zod": 4.6.6 + # GHSA-3g3m-2fjr-6pw4: glob AbortSignal cancellation bypass. Fixed only on + # 14.0.2+. 10.x (@wdio/config, archiver-utils) and 13.x (Storybook + # react-docgen plugin) still expose `sync` / `globSync`. Leave glob 8 + # (mocha) on its own line: it is outside the advisory range. + "glob@>=9": 14.0.3 + # GHSA-g3hv-75wg-m249: minimatch globParts amplification. Fixed only on + # 11.0.1+. 9.x/10.x (glob 10 leftover, Stryker, typescript-eslint) share + # the dual CJS/ESM named-export API. 3.x/5.x stay put: mocha and + # ts-prune call `require('minimatch')` as a function. + "minimatch@>=9": 11.0.3 # pnpm 11 build-script approval (replaces the removed onlyBuiltDependencies). # esbuild (used by vitest + biome) ships/verifies its platform binary via diff --git a/scripts/security/dependency-hardening.test.mjs b/scripts/security/dependency-hardening.test.mjs index 2df0ccc63..8fba1b03d 100644 --- a/scripts/security/dependency-hardening.test.mjs +++ b/scripts/security/dependency-hardening.test.mjs @@ -9,7 +9,8 @@ */ import assert from 'node:assert/strict'; import { spawnSync } from 'node:child_process'; -import { readFileSync } from 'node:fs'; +import { existsSync, readdirSync, readFileSync } from 'node:fs'; +import { createRequire } from 'node:module'; import path from 'node:path'; const repoRoot = path.resolve(import.meta.dirname, '..', '..'); @@ -37,6 +38,8 @@ assert.match(workspace, /"serialize-javascript": 7\.1\.3/); assert.match(workspace, /"sharp": 0\.35\.5/); assert.match(workspace, /"svgo@4": 4\.1\.0/); assert.match(workspace, /"deepmerge-ts": 8\.0\.0/); +assert.match(workspace, /"glob@>=9": 14\.0\.3/); +assert.match(workspace, /"minimatch@>=9": 11\.0\.3/); assert.match(workspace, /"undici@6": 6\.29\.1/); assert.match(workspace, /"undici@7": 7\.30\.1/); assert.match(workspace, /"undici@8": 8\.12\.2/); @@ -61,6 +64,43 @@ assert.match(lockfile, /undici@8\.12\.2:/); assert.doesNotMatch(lockfile, /undici@6\.29\.0/); assert.doesNotMatch(lockfile, /undici@7\.30\.0/); assert.doesNotMatch(lockfile, /undici@8\.11\.2/); +assert.match(lockfile, /glob@>=9: 14\.0\.3/); +assert.match(lockfile, /minimatch@>=9: 11\.0\.3/); +assert.match(lockfile, /glob@14\.0\.3:/); +assert.match(lockfile, /minimatch@11\.0\.3:/); +assert.doesNotMatch(lockfile, /glob@10\.5\.0/); +assert.doesNotMatch(lockfile, /glob@13\.0\.6/); +assert.doesNotMatch(lockfile, /minimatch@10\.2\./); +assert.doesNotMatch(lockfile, /minimatch@9\.0\.9/); + +const osvConfig = readFileSync(path.join(repoRoot, 'osv-scanner.toml'), 'utf8'); +assert.match(osvConfig, /name = "minimatch"\nversion = "3\.1\.5"/); +assert.match(osvConfig, /name = "minimatch"\nversion = "5\.1\.9"/); +assert.match(osvConfig, /effectiveUntil = 2026-12-30/); + +function pnpmRequire(dirPrefix, pkgPath) { + const store = path.join(repoRoot, 'node_modules', '.pnpm'); + const dir = readdirSync(store).find((name) => name.startsWith(dirPrefix)); + assert.ok(dir, `pnpm store is missing ${dirPrefix}`); + const consumer = path.join(store, dir, 'node_modules', pkgPath, 'package.json'); + assert.ok(existsSync(consumer), `missing ${pkgPath} under ${dir}`); + return createRequire(consumer); +} + +const globFromWdio = pnpmRequire('@wdio+config@', '@wdio/config')('glob'); +assert.equal(typeof globFromWdio.sync, 'function'); +assert.ok( + globFromWdio.sync('package.json', { cwd: repoRoot }).includes('package.json'), + '@wdio/config glob.sync must still resolve repo files after the 14.x override', +); + +const mochaMinimatch = pnpmRequire('mocha@', 'mocha')('minimatch'); +assert.equal(typeof mochaMinimatch, 'function'); +assert.equal(mochaMinimatch('collect-files.js', '*.js', { windowsPathsNoEscape: true }), true); + +const tsMorphMinimatch = pnpmRequire('@ts-morph+common@', '@ts-morph/common')('minimatch'); +assert.equal(typeof tsMorphMinimatch, 'function'); +assert.equal(typeof tsMorphMinimatch.Minimatch, 'function'); assert.match(lockfile, /onnxruntime-node@[\s\S]*?adm-zip: 0\.6\.1/); assert.match(lockfile, /extract-zip: 2\.0\.1\(patch_hash=[0-9a-f]{64}\)/);