Repository navigation
ci: add CI pipeline; fix 18 dependency advisories, broken fresh installs, OCR cache - #18
Merged
Merged
Conversation
`npm audit --omit=dev` reported 18 advisories (3 critical, 10 high), including tar, protobufjs and better-auth. - `npm audit fix` and `npm update express` (4.22.1 -> 4.22.3) for the 16 non-breaking ones; express 4.22.1 pinned a vulnerable qs. - @huggingface/transformers ^3.8.1 -> ^4.3.0 to pick up a patched sharp (libvips CVE-2026-33327 and others). Embeddings are unchanged: the same inputs give cosine 1.00000000 (max |diff| 1.5e-7) between 3.8.1 and 4.3.0, so existing stored vectors stay compatible. `npm audit --omit=dev` now reports 0 vulnerabilities. node --test 128/128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he cwd tesseract.js writes `eng.traineddata` (5 MB) to `cachePath || '.'`, so every OCR run left the model in whatever directory the server ran from, including users' projects when run via npx. Cache it in ~/.knowledge-base/tesseract instead. Adds a real (unstubbed) OCR test against a fixture image that checks the extracted text and that nothing is written to the cwd. It downloads the model, so it only runs with KB_TEST_OCR=1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
better-auth 1.7.0 moved the `mcp` plugin and the OAuth discovery helpers out of core (into @better-auth/mcp), so `kb start` crashes on import: The requested module 'better-auth/plugins' does not provide an export named 'mcp' The `^1.5.5` range let fresh installs (npx, or installs that ignore our lockfile) resolve 1.7.x, so new users already got a broken HTTP server, and the previous commit's audit fix pulled 1.7.7 into the lockfile too. Unit tests don't boot the server, so nothing caught it. 1.6.33 keeps the current API and is past 1.6.22, the version that fixes every better-auth advisory. Pin to ~1.6.33. Migrating to @better-auth/mcp is a separate change. Verified: npm audit --omit=dev reports 0 vulnerabilities; `kb start` boots; OAuth discovery returns 200. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Tests: `npm test` on Node 20/22/24 (Linux) and Node 22 (macOS). `engines` claims >=20, so the floor is tested too. - OCR: real, unstubbed Tesseract run against a fixture image. - Package smoke: `npm pack`, install the tarball into an empty project (resolving dependency ranges the way users do, not our lockfile), then drive the installed bins: `kb mcp` handshake + tools/list + clean exit, bus-send/bus-inbox round trip, and `kb start` with API key and OAuth rejection, OAuth discovery, and ingest -> search. This is what caught the better-auth 1.7 crash. - Audit: `npm audit --omit=dev --audit-level=moderate` and `npm audit signatures`. - CodeQL security-extended analysis. Least-privilege permissions, no untrusted inputs in run steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Adds a CI pipeline and fixes what it found.
CI (
.github/workflows/ci.yml,codeql.yml)npm teston Node 20, 22 and 24 (Linux) plus Node 22 (macOS).enginessays>=20, so the floor is tested toonpm pack, then installs the tarball into an empty project the way a user would (dependency ranges, not our lockfile) and drives the installed bins:kb mcphandshake, tool list, clean exit on disconnect, the bus CLIs, andkb startwith API-key and OAuth rejection, OAuth discovery, and ingest → searchnpm audit --omit=dev --audit-level=moderateandnpm audit signaturessecurity-extendedJavaScript analysisFixes
better-auth@^1.5.5let new installs resolve 1.7.x, which moved themcpplugin out of core, sokb startcrashed on import. Pinned to~1.6.33, which keeps the API and is past 1.6.22, the version that fixes every better-auth advisory. The package smoke job caught this; unit tests can't see it.@huggingface/transformers3.8 → 4.3 for a patchedsharp. Embeddings are unchanged: the same inputs give cosine 1.00000000 (max diff 1.5e-7) between versions, so stored vectors stay compatible.eng.traineddatain the working directory. Tesseract cached its model in whatever directory the server ran from. It now caches in~/.knowledge-base/tesseract, and a regression test checks that nothing is written to the cwd.Testing
npm test: 128/128 on Node 20.20, 22.22 and 24.21 locallyKB_TEST_OCR=1: the real OCR test fails before the cache fix and passes afterdoes not provide an export named 'mcp'npm audit --omit=dev: 0 vulnerabilities.npm audit signatures: 284/284 verified🤖 Generated with Claude Code