Repository navigation
fix(security): drop sprintf-js via global-agent 4; accept unpatched braces - #261
Merged
Merged
Conversation
No patched sprintf-js 1.1.4+ exists (GHSA-hp3w-g68c-fv3c). Pin global-agent to 4.1.3+ so onnxruntime-node no longer pulls roarr/sprintf-js. braces remains unpatched (GHSA-vfj7-8cjw-p6xm); keep the existing audit ignore. Co-authored-by: Rafal Korszun <rkorszun@users.noreply.github.com>
rkorszun
marked this pull request as ready for review
October 12, 2026 17:54
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses Dependabot braces (GHSA-vfj7-8cjw-p6xm, stack exhaustion on deeply nested patterns) and sprintf-js alert #273 (GHSA-hp3w-g68c-fv3c, unbounded precision).
Neither package has a patched npm release (
braceslatest 3.0.3,sprintf-jslatest 1.1.3). This PR:sprintf-js@1.1.3chain by overridingglobal-agent→>=4.1.3(4.x removedroarr/sprintf-js; API still exports CJSbootstrap(), which is allonnxruntime-node@1.24.3script/install.jsuses).pnpm auditignore forGHSA-vfj7-8cjw-p6xm(no compatible replacement; build/test only).Overrides live in
pnpm-workspace.yaml(this repo’s pnpm 10 location, same as #245). A partialpackage.jsonpnpm.overridesreplaces the workspace override set in the lockfile rather than merging — verified; doing that would drop the existing transitive security pins.Dependency chains (
pnpm why -r)braces@3.0.3 — dev / build only
tailwindcss→chokidar/fast-glob/micromatch→braces@3.0.3jest/ts-loader(and Nest CLI tooling) →micromatch→braces@3.0.3sprintf-js (before) — server production tree, not inference runtime
Also reached via
@langchain/community’s peer on@huggingface/transformers.onnxruntime-nodeonlyrequiresglobal-agentinscript/install.js(postinstall) to honorGLOBAL_AGENT_*proxy env vars when downloading native binaries. The inference entry (dist/index.js) does not import it. Local embeddings (server/src/ai/embedding.service.ts) load@huggingface/transformersat runtime, but that path does not loadsprintf-js.After this PR:
global-agent@4.1.3(noroarr/sprintf-js).pnpm why -r sprintf-jsis empty;sprintf-js@1.1.3androarrare gone frompnpm-lock.yaml.Production risk
auditConfig.ignoreGhsas: GHSA-vfj7-8cjw-p6xm.%.Nfprecision)global-agent >=4.1.3(what currentonnxruntime-nodealready uses upstream).Versions
global-agent>=4.1.3)sprintf-jsroarrbracesLockfile refreshed with pnpm 10.23.0.
Test plan
pnpm audit --audit-level=highpnpm --filter @opendexcom/plugin-interface build+pnpm buildpnpm --filter client testpnpm --filter server test