feat: add codebase-memory-mcp (v0.9.0) + bump Claude Code to 2.1.221 - #19
Merged
Conversation
Regenerated tools/package-lock.json inside node:22; the diff is confined to @anthropic-ai/claude-code and its per-platform optionalDependencies. `npm audit` then flagged three high-severity advisories in `ip-address` (<=10.3.0, SSRF / trust-boundary bypass), pre-existing rather than introduced by the bump. `npm audit fix --package-lock-only` lifts the transitive pin to 10.4.0, which is inside express-rate-limit's `^10.2.0` range — no top-level version drift. Remaining: two high-severity advisories in @modelcontextprotocol/sdk pulled in by perplexity-mcp@0.2.3 — upstream "no fix available", already documented in SECURITY.md as an accepted residual. Verified in the built image: `claude --version` prints 2.1.221 and `claude doctor` reports no invalid settings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Tree-sitter code-intelligence engine (persistent knowledge graph of functions, classes, call chains, HTTP routes) from https://github.com/DeusData/codebase-memory-mcp. Installed from the GitHub release, NOT from its npm package. The npm package is a 12 kB shim whose `postinstall` downloads the real binary from GitHub Releases outside npm's sha512 integrity, treats a missing `checksums.txt` as non-fatal (silently skipping verification), and whose `bin.js` re-downloads the binary on first run when it is absent — an unverified fetch at runtime, which this image forbids. Following the RTK pattern instead: pinned tag (`ARG CBM_VERSION`), per-arch `-portable` static asset, sha256 hardcoded in the `case "$TARGETARCH"` block, build gate on `--version`. Verified on the built amd64 image (caps dropped, --pids-limit=100, tmpfs HOME): - `claude mcp list` shows all five servers ✓ Connected under the default MCP_TIMEOUT=10000; the whole health check takes ~4.6s despite the 258 MB binary. - `index_repository` on /workspace yields 255 nodes / 282 edges and a 1.8 MB cache; `search_graph` / `get_architecture` answer from it, both via the CLI and via an MCP `tools/call` over stdio. - Both release archives' sha256 were checked against the release checksums.txt AND against the downloaded bytes. arm64 is built by the CI matrix only. Measured deviation from upstream docs: the MCP surface is 8 tools, not the 14 the README advertises — `list_projects`, `index_status`, `detect_changes`, `manage_adr`, `ingest_traces` and `trace_call_path` exist in the CLI only. Documented in CLAUDE.md. Flagged factors, documented rather than silently absorbed: the binary adds a 258 MB layer (image is now 2.52 GB); `CBM_CACHE_DIR` is deliberately left at its default, so the graph lives in the 512 MB HOME tmpfs and is rebuilt per session (a baked /workspace path would be wrong for the ACP entrypoint); and the binary carries a manual `update` subcommand with no equivalent of CODEGRAPH_NO_DOWNLOAD to forbid it — recorded in SECURITY.md as a residual gap. Co-Authored-By: Claude Opus 5 (1M context) <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
Two changes to the hardened container image:
tools/package.json+ lockfile regenerated insidenode:22).npm auditsurfaced three pre-existing high-severityip-addressadvisories (<=10.3.0, SSRF /trust-boundary bypass);
npm audit fix --package-lock-onlylifts the transitive pin to 10.4.0,inside
express-rate-limit's^10.2.0range, with no top-level version drift.codebase-memory-mcpv0.9.0 — a tree-sitter code-intelligence engine(persistent knowledge graph of functions, classes, call chains, HTTP routes),
https://github.com/DeusData/codebase-memory-mcp.
Why not the npm package
The npm package is a 12 kB shim: its
postinstalldownloads the real binary from GitHub Releasesoutside npm's sha512 integrity, treats a missing
checksums.txtas non-fatal (silently skippingverification), and its
bin.jsre-downloads the binary on first run if it is absent — an unverifiedfetch at runtime, which this image forbids. Installed the RTK way instead: pinned tag
(
ARG CBM_VERSION=v0.9.0), per-arch-portablestatic asset, sha256 hardcoded in thecase "$TARGETARCH"block, build gate on--version.Verification (built amd64 image,
--cap-drop=ALL,--pids-limit=100, tmpfs HOME)claude --version→ 2.1.221;claude doctorreports no invalid settings.claude mcp list: all five servers ✓ Connected under the defaultMCP_TIMEOUT=10000; the wholehealth check takes ~4.6 s despite the 258 MB binary.
index_repositoryon/workspace→ 255 nodes / 282 edges, 1.8 MB cache;search_graphandget_architectureanswer from it, both via the CLI and via an MCPtools/callover stdio.checksums.txtand against thedownloaded bytes. arm64 is exercised by the CI matrix only (same posture as RTK).
Measured deviation from upstream docs
The MCP surface is 8 tools, not the 14 the upstream README advertises:
index_repository,search_graph,query_graph,trace_path,get_code_snippet,get_graph_schema,get_architecture,search_code.list_projects,index_status,detect_changes,manage_adr,ingest_tracesandtrace_call_pathexist in the CLI only. Recorded inCLAUDE.md.Flagged factors (documented, not silently absorbed)
embedding model); the image is now 2.52 GB. No comparable "before" image was measured.
CBM_CACHE_DIRis deliberately left at its default, so the graph lands inthe 512 MB HOME tmpfs and is rebuilt per session. A baked
/workspacepath would be wrong for theACP entrypoint, which mounts the project at its host-absolute path. Escape hatch documented:
-e CBM_CACHE_DIR=/workspace/.cache/codebase-memory-mcp.updatesubcommand (source overridablevia
CBM_DOWNLOAD_URL) with no equivalent ofCODEGRAPH_NO_DOWNLOADto forbid it. Nothing in theimage invokes it. Upstream's "zero network requests" claim is not independently verified here.
Recorded in
SECURITY.md.Also fixed in passing:
CLAUDE.mddocumented a build argRTK_SHA256that does not exist — thesha256 values are hardcoded in the
RUNlayers.🤖 Generated with Claude Code