Skip to content

Embedded SDK 2.2.6: qualify fixed glob/minimatch dependencies used by discovery #62920

Open

Description

@itlackey

@opencode/sdk@2.2.6 brings @opencode/util@2.2.6, which pins glob to 13.0.5. Its installed minimatch dependency is also affected by a recently published advisory.

Reproduction (Node 26.13.0, npm 11, clean temporary directory):

npm init -y
npm install --save-exact @opencode/sdk@2.2.6
npm ls @opencode/util glob minimatch
npm audit --omit=dev

Public advisories:

Installed source confirms @opencode/util/dist/glob.js imports glob/minimatch and its scan is called by configuration/instruction/skill discovery. A V8 coverage run of a constrained embedded host executes scan during startup. Our host supplies a trusted config directory, disables project/Claude discovery and removes generic filesystem tools, so this is not a claim of an exploitable user-controlled path in that configuration. It remains a production dependency/audit issue; package overrides would cross the pinned major-version contract.

Please qualify and release compatible fixed glob/minimatch dependencies (or the simplest equivalent supported implementation), including configuration/skill discovery and cancellation tests. Avoid relying on permission settings alone to establish that a vulnerable dependency is never invoked.

Activity

  1. opencodejr commented on Nov 9, 2026

    @opencodejr

    Thanks for the detailed report. I can confirm this. With a clean npm install --save-exact @opencode/sdk@2.2.6, npm ls shows @opencode/util@2.2.6 installing glob@13.0.5 and minimatch@10.2.5. npm audit --omit=dev flags glob for GHSA-3g3m-2fjr-6pw4 and minimatch for GHSA-g3hv-75wg-m249, and says "No fix available" for both under the current pins.

    The latest dev (617a770) still pins the same versions in packages/util/package.json, so this hasn't been changed yet.

    Two more things I noticed:

    • Glob.scan in packages/util/src/glob.ts calls glob() without passing an AbortSignal, so the glob advisory's cancellation path probably isn't reached through it. The audit finding stays either way.
    • Other dependencies in the SDK tree (e.g. @npmcli/arborist, pacote, rimraf, @tufjs/models) also bring in flagged glob/minimatch versions. Bumping @opencode/util's direct pins alone may not fully clear the audit.

    The script below reproduces the audit result. Related earlier reports: #34181 and #34139 (older minimatch ReDoS advisories, which led to the 10.2.5 pin) and #47843 (a bulk CVE bump that was not merged).

    Reproduction script (audit.sh)
    #!/usr/bin/env bash
    # Reproduces #62920: @opencode/sdk@2.2.6 installs glob@13.0.5 / minimatch@10.2.5 flagged by npm audit.
    set -euo pipefail
    dir=$(mktemp -d); cd "$dir"
    npm init -y >/dev/null
    npm install --save-exact --ignore-scripts @opencode/sdk@2.2.6 >/dev/null 2>&1
    npm ls @opencode/util glob minimatch | grep -E '@opencode/util@|glob@|minimatch@' | sort -u | head -20
    npm audit --omit=dev 2>&1 | grep -E -A3 '^(glob|minimatch) ' || true

    Run it: bash audit.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions