Skip to content

build(deps): apply Dependabot updates and fix the remaining security alerts - #516

Merged
RobertLD merged 7 commits into
mainfrom
chore/dependency-updates
Oct 8, 2026
Merged

RobertLD merged 7 commits into
mainfrom
chore/dependency-updates

Conversation

@RobertLD

@RobertLD RobertLD commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

This PR applies the open Dependabot updates on top of the 2.0 code on main, in one branch.

Not included: #506 (undici 8). It requires Node >= 22.19, and libscope supports Node >= 20 and tests Node 20 in CI.

Security fixes

  • @xenova/transformers → @huggingface/transformers 4.3. This removes protobufjs 6, onnxruntime-web 1.14 and sharp 0.32, the packages behind the critical alert.
    • The model stays the same (all-MiniLM-L6-v2, q8, 384 dimensions), so existing indexes stay valid. Top-1 search results matched for 100 of 100 queries.
    • The model cache moves to ~/.libscope/models, which costs one re-download.
  • epub2 is removed. EPUB files are now parsed with pizzip, which the project already used, and the parser has a zip-bomb guard. On real books its output matches epub2's.
  • csv-parse 7.
  • Dependabot ignores undici major versions. undici 8 needs Node >= 22.19, and libscope supports Node 20.

Effect on alerts: npm audit --omit=dev now reports only mammoth → argparse → sprintf-js (3 moderate). Only mammoth's own CLI uses argparse, so libscope does not reach it. The full npm audit also reports vitepress → vite (docs tooling, not shipped).

Checks: format:check passes, lint has 0 errors, typecheck passes, and 2,131 tests pass. build and docs:check pass. The Docker image was built and tested: health check, add + search, and an EPUB add.

Includes the Dependabot updates from #514 (minor and patch group), #504
(@xmldom/xmldom, lodash, path-to-regexp) and #502 (TypeScript 6), plus
in-range updates of transitive dependencies. node-cron 4.6 ships its own
types, so @types/node-cron is removed.
…ase-please-action to v5

From #512. All three only move the action runtime to Node 24.
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
libscope Ignored Ignored Preview Oct 8, 2026 6:51pm UTC

@xenova/transformers 2.x is deprecated and pulls protobufjs 6 (critical
advisory), sharp 0.32 and an old onnxruntime-web. @huggingface/transformers
4.3.1 brings protobufjs 7.6.6, sharp 0.35.5 and onnxruntime-node 1.30.

The local provider loads the same model with dtype q8 (onnx/model_quantized.onnx,
the 2.x default), so vectors stay compatible with existing indexes.

The model is now cached in ~/.libscope/models. The library default is a
folder inside its own package; version 4 fails the model load when it
cannot write there (global installs, the non-root user of the Docker image).

sharp and onnxruntime-node ship prebuilt binaries, so CI and the Docker
image rebuild only better-sqlite3.
epub2 pulls adm-zip 0.5 (high advisories). The EPUB parser now reads
META-INF/container.xml, the OPF package and its spine with pizzip, which
the PPTX parser already uses, and extracts chapter text with a linear tag
scanner. The output format is unchanged: body text of each spine document
in reading order, chapters separated by a blank line. Character references
are now decoded.

Entries are inflated with a bounded output size, and an EPUB whose content
exceeds 100 MiB uncompressed (the indexing.maxDocumentSize default) is
refused with a ValidationError.
csv-parse < 7.0.2 has a moderate advisory (prototype replacement via
columns). Version 7 keeps the csv-parse/sync API that the CSV parser uses.
undici 8 requires Node.js >= 22.19, and libscope supports Node.js 20.
@RobertLD RobertLD changed the title build(deps): apply Dependabot updates (#514, #504, #502, #512) build(deps): apply Dependabot updates and fix the remaining security alerts Oct 8, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant