From 08a66c434aeba660dc948ef1658d40572d5d63df Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com> Date: Wed, 2 Dec 2026 10:02:08 -0800 Subject: [PATCH 1/4] test: align 0.7 README routing expectations Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com> --- tests/integrations/test_harbor_runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integrations/test_harbor_runner.py b/tests/integrations/test_harbor_runner.py index e2a469e0a..29bd6621f 100644 --- a/tests/integrations/test_harbor_runner.py +++ b/tests/integrations/test_harbor_runner.py @@ -886,7 +886,6 @@ def test_root_readme_routes_to_primary_documentation(): readme = ROOT_README.read_text(encoding="utf-8") primary_documentation = ( - "docs/getting-started/install.mdx", "docs/getting-started/quickstart.mdx", "docs/about-nemo-fabric/overview.mdx", "adapters/README.md", From 68a9e308dacde76d5a40432be50e72d4e74f6023 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com> Date: Wed, 2 Dec 2026 10:02:10 -0800 Subject: [PATCH 2/4] chore: update compatible 0.7 adapter security pins Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com> --- ATTRIBUTIONS-Node.md | 36 +---------- adapters/typescript/package-lock.json | 60 +++---------------- adapters/typescript/package.json | 8 ++- .../scripts/dependency-compatibility.test.mjs | 35 +++++++++++ 4 files changed, 52 insertions(+), 87 deletions(-) create mode 100644 adapters/typescript/scripts/dependency-compatibility.test.mjs diff --git a/ATTRIBUTIONS-Node.md b/ATTRIBUTIONS-Node.md index e9bbf1fe6..1254cc08c 100644 --- a/ATTRIBUTIONS-Node.md +++ b/ATTRIBUTIONS-Node.md @@ -26539,7 +26539,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -## cross-spawn - 7.0.6 +## cross-spawn - 7.1.0 **Repository URL**: https://github.com/moxystudio/node-cross-spawn **License Type(s)**: MIT @@ -36985,7 +36985,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -## tar - 7.5.22 +## tar - 7.5.24 **Repository URL**: https://github.com/isaacs/node-tar **License Type(s)**: BlueOak-1.0.0 @@ -37999,37 +37999,7 @@ Permission to use, copy, modify, and/or distribute this software for any purpose THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ``` -## ws - 8.21.0 - -**Repository URL**: https://github.com/websockets/ws -**License Type(s)**: MIT - -### License: https://spdx.org/licenses/MIT.html - -``` -Copyright (c) 2011 Einar Otto Stangvik -Copyright (c) 2013 Arnout Kazemier and contributors -Copyright (c) 2016 Luigi Pinca and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` - -## ws - 8.21.3 +## ws - 8.23.0 **Repository URL**: https://github.com/websockets/ws **License Type(s)**: MIT diff --git a/adapters/typescript/package-lock.json b/adapters/typescript/package-lock.json index fe9cd31c0..931dc103a 100644 --- a/adapters/typescript/package-lock.json +++ b/adapters/typescript/package-lock.json @@ -232,15 +232,6 @@ "node": ">=14.17" } }, - "kilo/node_modules/undici": { - "version": "8.12.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.3.tgz", - "integrity": "sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==", - "license": "MIT", - "engines": { - "node": ">=22.19.0" - } - }, "kilo/node_modules/undici-types": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", @@ -2332,16 +2323,6 @@ "node": ">=20" } }, - "node_modules/@modelcontextprotocol/client/node_modules/zod": { - "version": "4.6.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.6.tgz", - "integrity": "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/core": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.2.0.tgz", @@ -3124,28 +3105,6 @@ "ws": "8.21.0" } }, - "node_modules/@opencode/simulation/node_modules/ws": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", - "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@opencode/util": { "version": "2.0.23", "resolved": "https://registry.npmjs.org/@opencode/util/-/util-2.0.23.tgz", @@ -5003,9 +4962,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.1.0.tgz", + "integrity": "sha512-/PHUIV1x/hZLpJN8KmyV2aYkT8pll4RjQ59TmhwkL/9B4HdOtlBQ2pos6iB2cfVRzpGHk3HXlRa8sdVYrPjIYw==", "dev": true, "license": "MIT", "dependencies": { @@ -8317,9 +8276,9 @@ } }, "node_modules/tar": { - "version": "7.5.22", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.22.tgz", - "integrity": "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==", + "version": "7.5.24", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.24.tgz", + "integrity": "sha512-to/OxuCk5DeVONcjjODT7aeoRq5NIPPlfPc0tNML+wLlnf6u5BcJz97Uukv3pT3jzorkFhUevylkAiBr+ZmV2w==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -8532,7 +8491,6 @@ "version": "8.12.3", "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.3.tgz", "integrity": "sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==", - "dev": true, "license": "MIT", "engines": { "node": ">=22.19.0" @@ -8697,9 +8655,9 @@ } }, "node_modules/ws": { - "version": "8.21.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", - "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.0.tgz", + "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==", "dev": true, "license": "MIT", "engines": { diff --git a/adapters/typescript/package.json b/adapters/typescript/package.json index 4e745ff6c..a596bbf0a 100644 --- a/adapters/typescript/package.json +++ b/adapters/typescript/package.json @@ -22,7 +22,7 @@ "pack:install-check": "node scripts/check-install.mjs", "test": "npm run test:units && npm run test:dependencies && npm run pack:check", "test:dependencies": "npm ls --all && node scripts/audit-dependencies.mjs", - "test:units": "node --test scripts/audit-dependencies.test.mjs && npm test --workspace nemo-fabric-adapters-common && npm test --workspace nemo-fabric-adapters-cline && npm test --workspace nemo-fabric-adapters-droid && npm test --workspace nemo-fabric-adapters-pi && npm test --workspace nemo-fabric-adapters-opencode && npm test --workspace nemo-fabric-adapters-qwen && npm test --workspace nemo-fabric-adapters-kilo && npm test --workspace nemo-fabric-adapters-kiro && npm run test --workspace nemo-fabric-adapters-strands" + "test:units": "node --test scripts/audit-dependencies.test.mjs scripts/dependency-compatibility.test.mjs && npm test --workspace nemo-fabric-adapters-common && npm test --workspace nemo-fabric-adapters-cline && npm test --workspace nemo-fabric-adapters-droid && npm test --workspace nemo-fabric-adapters-pi && npm test --workspace nemo-fabric-adapters-opencode && npm test --workspace nemo-fabric-adapters-qwen && npm test --workspace nemo-fabric-adapters-kilo && npm test --workspace nemo-fabric-adapters-kiro && npm run test --workspace nemo-fabric-adapters-strands" }, "devDependencies": { "nemo-fabric-adapter-contract": "file:../../adapter-contract/typescript", @@ -56,12 +56,14 @@ "zod": "4.6.7" }, "@parcel/watcher": "2.6.0", - "cross-spawn": "7.0.6", + "cross-spawn": "7.1.0", "debug": "4.4.3", "fast-uri": "3.1.9", "@earendil-works/pi-coding-agent@1.0.3": { "undici": "8.12.3" - } + }, + "ws": "8.23.0", + "tar": "7.5.24" }, "engines": { "node": ">=22.19.0" diff --git a/adapters/typescript/scripts/dependency-compatibility.test.mjs b/adapters/typescript/scripts/dependency-compatibility.test.mjs new file mode 100644 index 000000000..4510d5444 --- /dev/null +++ b/adapters/typescript/scripts/dependency-compatibility.test.mjs @@ -0,0 +1,35 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +// SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. +// SPDX-License-Identifier: Apache-2.0 + +import assert from "node:assert/strict"; +import { mkdtemp, mkdir, readFile, rm, writeFile } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { test } from "node:test"; + +import pacote from "pacote"; +import * as tar from "tar"; + +test("the resolved tar supports pacote package extraction", async () => { + const root = await mkdtemp(join(tmpdir(), "fabric-pacote-")); + try { + const fixture = join(root, "package"); + await mkdir(fixture); + const manifest = { name: "fabric-extraction-fixture", version: "1.0.0" }; + await writeFile(join(fixture, "package.json"), JSON.stringify(manifest)); + const archive = join(root, "fixture.tgz"); + await tar.c({ cwd: root, file: archive, gzip: true }, ["package"]); + + const destination = join(root, "extracted"); + await pacote.extract(archive, destination, { cache: join(root, "cache") }); + assert.deepEqual( + JSON.parse(await readFile(join(destination, "package.json"), "utf8")), + manifest, + ); + } finally { + await rm(root, { recursive: true, force: true }); + } +}); From 10151be293d7802da90dd205b11ad5631baf7b04 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com> Date: Wed, 2 Dec 2026 10:32:11 -0800 Subject: [PATCH 3/4] ci: scope and expire the temporary tar audit exception Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com> --- .../scripts/audit-dependencies.test.mjs | 227 ++++++++++++++++++ scripts/ci/audit_typescript_dependencies.mjs | 81 ++++++- 2 files changed, 297 insertions(+), 11 deletions(-) diff --git a/adapters/typescript/scripts/audit-dependencies.test.mjs b/adapters/typescript/scripts/audit-dependencies.test.mjs index 4d7b114d2..572326ad0 100644 --- a/adapters/typescript/scripts/audit-dependencies.test.mjs +++ b/adapters/typescript/scripts/audit-dependencies.test.mjs @@ -315,3 +315,230 @@ test("rejects a lockfile from the other TypeScript scope", () => { assert.throws(() => checkAudit(contract.audit, adapters.lock, "contract")); assert.throws(() => checkAudit(adapters.audit, contract.lock, "adapters")); }); + +const tarNow = Date.parse("2026-12-02T12:00:00Z"); +const tarDeadline = Date.parse("2026-12-10T00:00:00Z"); +const tarAdvisory = { + name: "tar", + severity: "high", + url: "https://github.com/advisories/GHSA-mhqm-9wj8-w7r4", + range: "<8.0.0", +}; + +function tarFixture() { + const audit = structuredClone(report); + const lock = { packages: {} }; + for (const [name, version, via] of [ + [ + "tar", + "7.5.24", + [ + tarAdvisory, + { + ...tarAdvisory, + url: "https://github.com/advisories/GHSA-7c32-79xj-j3jp", + range: "<8.0.2", + }, + { + ...tarAdvisory, + url: "https://github.com/advisories/GHSA-p96f-8xj2-g85p", + range: ">=7.0.0 <8.0.0", + severity: "moderate", + }, + ], + ], + ["pacote", "21.5.1", ["tar"]], + ["node-gyp", "12.4.0", ["tar"]], + ["@opencode/util", "2.0.23", ["pacote"]], + ]) { + const path = `node_modules/${name}`; + audit.vulnerabilities[name] = structuredClone({ + name, + severity: "high", + nodes: [path], + via, + }); + lock.packages[path] = { version, dev: true }; + audit.metadata.vulnerabilities.high++; + } + return { audit, lock }; +} + +test("tar: allows the enumerated advisories and exact development parent paths before expiry", () => { + const { audit, lock } = tarFixture(); + assert.equal(checkAudit(audit, lock, "adapters", tarNow).high, 4); + assert.equal(checkAudit(audit, lock, "adapters", tarDeadline - 1).high, 4); +}); + +for (const now of [tarDeadline, tarDeadline + 1, NaN]) { + test(`tar: rejects an expired exception or invalid clock (${now})`, () => { + const { audit, lock } = tarFixture(); + assert.throws(() => checkAudit(audit, lock, "adapters", now), /expired/); + }); +} + +test("tar: removing all affected findings needs no exception after expiry", () => { + assert.equal(checkAudit(report, {}, "adapters", tarDeadline).high, 0); +}); + +test("tar: never extends the contract audit policy", () => { + const { audit, lock } = tarFixture(); + assert.throws(() => checkAudit(audit, lock, "contract", tarNow)); +}); + +for (const [description, mutate] of [ + [ + "a new high advisory", + (r) => + r.vulnerabilities.tar.via.push({ + ...tarAdvisory, + url: "https://github.com/advisories/OTHER", + }), + ], + [ + "a new moderate advisory on tar", + (r) => + r.vulnerabilities.tar.via.push({ + ...tarAdvisory, + severity: "moderate", + url: "https://github.com/advisories/OTHER", + }), + ], + [ + "a changed advisory range", + (r) => { + r.vulnerabilities.tar.via[0].range = "*"; + }, + ], + [ + "a changed advisory name", + (r) => { + r.vulnerabilities.tar.via[0].name = "other"; + }, + ], + [ + "a changed moderate advisory severity", + (r) => { + r.vulnerabilities.tar.via[2].severity = "high"; + }, + ], + [ + "a new advisory on an approved parent", + (r) => r.vulnerabilities.pacote.via.push(tarAdvisory), + ], + [ + "an unknown dependency reference", + (r) => r.vulnerabilities.pacote.via.push("missing"), + ], + [ + "a parent cycle without tar", + (r) => { + r.vulnerabilities.pacote.via = ["@opencode/util"]; + }, + ], + [ + "a missing advisory root", + (r) => { + delete r.vulnerabilities.tar; + r.metadata.vulnerabilities.high--; + }, + ], + [ + "a missing root advisory", + (r) => { + r.vulnerabilities.tar.via = []; + }, + ], + [ + "an unrelated high finding", + (r) => { + r.vulnerabilities.other = { + name: "other", + severity: "high", + nodes: ["node_modules/other"], + via: ["tar"], + }; + r.metadata.vulnerabilities.high++; + }, + ], + [ + "a critical root finding", + (r) => { + r.vulnerabilities.tar.severity = "critical"; + r.metadata.vulnerabilities.high--; + r.metadata.vulnerabilities.critical++; + }, + ], + [ + "a critical advisory hidden under a high finding", + (r) => { + r.vulnerabilities.tar.via[0].severity = "critical"; + }, + ], + [ + "an audit error", + (r) => { + r.error = { code: "E503" }; + }, + ], + [ + "an inconsistent high count", + (r) => { + r.metadata.vulnerabilities.high--; + }, + ], +]) { + test(`tar: rejects ${description}`, () => { + const { audit, lock } = tarFixture(); + mutate(audit); + assert.throws(() => checkAudit(audit, lock, "adapters", tarNow)); + }); +} + +test("tar: rejects changed versions, missing entries, non-dev entries and additional paths for every package", () => { + const { audit, lock } = tarFixture(); + for (const [path, entry] of Object.entries(lock.packages)) { + for (const replacement of [ + undefined, + { ...entry, version: "99.0.0" }, + { ...entry, dev: false }, + { version: entry.version }, + ]) { + const changed = structuredClone(lock); + changed.packages[path] = replacement; + assert.throws(() => checkAudit(audit, changed, "adapters", tarNow), path); + } + const changed = structuredClone(audit); + const name = path.slice("node_modules/".length); + changed.vulnerabilities[name].nodes.push(`node_modules/other/${path}`); + assert.throws(() => checkAudit(changed, lock, "adapters", tarNow), path); + } +}); + +test("tar: coexists with existing Zod and picomatch exceptions, including the shared node-gyp parent", () => { + const tar = tarFixture(); + const picomatch = picomatchFixture("adapters"); + const audit = exceptionReport(); + Object.assign( + audit.vulnerabilities, + picomatch.audit.vulnerabilities, + tar.audit.vulnerabilities, + ); + audit.vulnerabilities["node-gyp"].via.push("tinyglobby"); + audit.vulnerabilities["@opencode/core"].via.push("@opencode/util"); + audit.metadata.vulnerabilities.high = Object.values( + audit.vulnerabilities, + ).filter((v) => v.severity === "high").length; + const lock = { + packages: { + ...exceptionLock.packages, + ...picomatch.lock.packages, + ...tar.lock.packages, + }, + }; + assert.equal(checkAudit(audit, lock, "adapters", tarNow).high, 13); + assert.throws( + () => checkAudit(audit, lock, "adapters", tarDeadline), + /expired/, + ); +}); diff --git a/scripts/ci/audit_typescript_dependencies.mjs b/scripts/ci/audit_typescript_dependencies.mjs index 5999312da..53ea8183e 100644 --- a/scripts/ci/audit_typescript_dependencies.mjs +++ b/scripts/ci/audit_typescript_dependencies.mjs @@ -56,7 +56,56 @@ const picomatchPackages = { }, }; -export function checkAudit(report, lockfile = {}, scope = "adapters") { +// Temporary repository-only risk acceptance: NVIDIA/NeMo-Fabric#735. +// Owner: AnuradhaKaruppiah. Review by 2026-12-09; hard expiry below. +// tar 8 breaks pacote/node-gyp's stream API. This does not approve runtime +// consumers or release images. Keep IDs, ranges, severities and dev paths exact. +const tarExpires = "2026-12-10T00:00:00Z"; +const tarAdvisories = { + "GHSA-25mm-r35j-6hgm": [">=7.5.22 <8.0.0", "high"], + "GHSA-mhqm-9wj8-w7r4": ["<8.0.0", "high"], + "GHSA-jmj2-9c5q-vw73": [">=7.5.5 <8.0.0", "high"], + "GHSA-hqgx-p3r3-2cfg": ["<8.0.0", "high"], + "GHSA-gvrf-jx37-rjv5": ["<8.0.0", "high"], + "GHSA-6wwr-g865-f46r": [">=7.5.22 <8.0.0", "high"], + "GHSA-4pf9-5fpx-xmr6": [">=7.5.5 <8.0.0", "high"], + "GHSA-3wwj-8j6r-q339": [">=7.5.5 <8.0.0", "high"], + "GHSA-98v3-7xjr-fg83": [">=7.5.22 <8.0.0", "high"], + "GHSA-wpwg-r92p-fjjh": ["<8.0.0", "high"], + "GHSA-rgjp-p5j7-w36x": [">=7.5.0 <8.0.0", "high"], + "GHSA-qv2w-fc3h-pm27": ["<8.0.0", "high"], + "GHSA-p96f-8xj2-g85p": [">=7.0.0 <8.0.0", "moderate"], + "GHSA-mpg7-vg3p-wc3m": ["<8.0.0", "high"], + "GHSA-ffhw-4r4q-5cwv": ["<8.0.0", "high"], + "GHSA-7c32-79xj-j3jp": ["<8.0.2", "high"], + "GHSA-72fp-85cc-g945": [">=7.5.22 <8.0.0", "high"], +}; +const tarPackages = { + tar: { "node_modules/tar": "7.5.24" }, + pacote: { "node_modules/pacote": "21.5.1" }, + "node-gyp": { "node_modules/node-gyp": "12.4.0" }, + "@opencode/util": { "node_modules/@opencode/util": "2.0.23" }, +}; + +function matchesAdvisory(exception, cause) { + if (cause.name !== exception.root) return false; + if (exception.root !== "tar") { + return cause.url === exception.advisory && cause.range === exception.range; + } + return Object.entries(tarAdvisories).some( + ([id, [range, severity]]) => + cause.url === `https://github.com/advisories/${id}` && + cause.range === range && + cause.severity === severity, + ); +} + +export function checkAudit( + report, + lockfile = {}, + scope = "adapters", + now = Date.now(), +) { if (!Object.hasOwn(picomatchPackages, scope)) { throw new Error(`Unknown audit scope: ${scope}`); } @@ -75,6 +124,7 @@ export function checkAudit(report, lockfile = {}, scope = "adapters") { range: "<4.6.6", packages: zodPackages, }); + exceptions.push({ root: "tar", packages: tarPackages }); } if ( report.error || @@ -111,8 +161,9 @@ export function checkAudit(report, lockfile = {}, scope = "adapters") { ); } for (const [name, finding] of severe) { - const exception = exceptions.find((entry) => - Object.hasOwn(entry.packages, name), + const exception = exceptions.find( + (entry) => + Object.hasOwn(entry.packages, name) && reachesRoot(name, entry.root), ); const allowedNodes = exception?.packages[name]; if ( @@ -125,11 +176,20 @@ export function checkAudit(report, lockfile = {}, scope = "adapters") { finding.nodes.some( (path) => !Object.hasOwn(allowedNodes, path) || - lockfile.packages?.[path]?.version !== allowedNodes[path], + lockfile.packages?.[path]?.version !== allowedNodes[path] || + (exception.root === "tar" && lockfile.packages[path].dev !== true), ) ) { throw new Error(`Unapproved audit package, path or version: ${name}`); } + if ( + exception.root === "tar" && + (!Number.isFinite(now) || now >= Date.parse(tarExpires)) + ) { + throw new Error( + `Temporary tar audit exception expired (${tarExpires}); see #735`, + ); + } for (const cause of finding.via) { if (typeof cause === "string") { if (!report.vulnerabilities[cause] || name === exception.root) { @@ -137,11 +197,8 @@ export function checkAudit(report, lockfile = {}, scope = "adapters") { } } else if ( cause.severity === "critical" || - (cause.severity === "high" && - (name !== exception.root || - cause.name !== exception.root || - cause.url !== exception.advisory || - cause.range !== exception.range)) + ((cause.severity === "high" || exception.root === "tar") && + (name !== exception.root || !matchesAdvisory(exception, cause))) ) { throw new Error( `Advisory outside the temporary audit exception: ${name}`, @@ -153,7 +210,7 @@ export function checkAudit(report, lockfile = {}, scope = "adapters") { (name === exception.root && !finding.via.some( (cause) => - cause.severity === "high" && cause.url === exception.advisory, + cause.severity === "high" && matchesAdvisory(exception, cause), )) ) { throw new Error( @@ -188,7 +245,9 @@ export function auditDependencies(packageRoot, scope) { ); const counts = checkAudit(report, lockfile, scope); const exceptionNames = - scope === "adapters" ? "Zod (#485) and picomatch" : "picomatch"; + scope === "adapters" + ? "Zod (#485), picomatch and tar (#735, expires 2026-12-10 UTC)" + : "picomatch"; console.log( `npm audit: ${counts.high} high covered by temporary ${exceptionNames} CI exceptions (picomatch review 2026-11-24); ` + `${counts.critical} critical; ` + From 4a60254dd2fafde637af4546c37f91bfe1e4aeb3 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com> Date: Wed, 2 Dec 2026 10:56:55 -0800 Subject: [PATCH 4/4] chore: restore the MCP client Zod lock entry Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com> --- adapters/typescript/package-lock.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/adapters/typescript/package-lock.json b/adapters/typescript/package-lock.json index 931dc103a..85ce8cb02 100644 --- a/adapters/typescript/package-lock.json +++ b/adapters/typescript/package-lock.json @@ -2323,6 +2323,16 @@ "node": ">=20" } }, + "node_modules/@modelcontextprotocol/client/node_modules/zod": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.6.tgz", + "integrity": "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "node_modules/@modelcontextprotocol/core": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.2.0.tgz",