Skip to content

Commit a6f132b

Browse files
committed
harden: ship integration templates as a verified JSON asset, not embedded bytes
The product binary embedded nine complete shebang'd shell scripts, their PowerShell/.cmd twins, and two node:child_process client-adapter modules as C string literals, and wrote them into agent config dirs at 0755 on install. A block of script-shaped bytes inside a large unsigned executable is exactly the surface Microsoft Defender's ML scored Trojan:Script/Wacatac.B!ml — the detection that has recurred across the last several release attempts, on the Linux ELF and darwin-arm64 standard binaries while every UI and Windows variant stayed clean. This moves every integration template out of the binary into a single shipped data file, assets/cbm-integrations.json (compact: one asset, because each shipped file is itself scanned). The binary now carries only the templates' identity — one embedded SHA-256, generated at build time from the JSON so it can never drift — plus the code to load, verify, and render them. Why a hash and not just a loose file: content compiled into the binary was tamper-evident with the binary. Moving it to disk must not turn it into unauthenticated code the installer blindly executes. install verifies the asset against the embedded SHA-256 and fails closed on mismatch ("integration assets missing or modified - reinstall from the release archive") before writing anything. Verified end to end: a one-byte edit to the asset makes install refuse. Ownership, for safe upgrade/removal: the verified copy is published to ~/.cbm/assets/<version>/ — a sibling of the DB cache, never inside it, so clearing the cache cannot strip a user's hooks. A deployed integration file is ours to remove only if it matches a template rendered from that stored copy; foreign files and user-edited files at the reserved paths are preserved. The historical template bodies travel in the JSON's released[] arrays so files written by older versions are still recognised and cleaned up on uninstall. Removed from src/: cmm_gate/session/subagent script-prefix and suffix constants, cbm_build_released_gate_script, the shell/PowerShell/.cmd bodies in cli.c, and the JS/TS generators in client_adapter.c. Confirmed on the built standard binary: 0 occurrences of '#!/usr/bin/env bash', '#!/bin/sh', 'node:child_process', and 'ExecutionPolicy' (was non-zero for each). test_no_embedded_scripts_contract.sh makes the removal a build property, not a reachability assumption: no production C source may contain a shebang or node:child_process literal, and the built binary is scanned directly. It strips comments first (a contract a comment can satisfy is a false guard), and is revert-checked — reintroducing one shebang literal makes it fail naming the file:line. check-binary-composition.sh (A6) enforces the same needles on every release artifact post-strip. This does not, by itself, prove the detection is cured: the clean UI binary is a strict superset of the flagged standard one, so no single passage is a deterministic trigger. It removes the most coherent malware-shaped composite from every shipped binary, aligns with how gh/starship/zoxide externalise integration material, and makes the templates maintainable as data rather than escaped C literals. Causal confirmation still needs a VirusTotal ablation. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent c7782e0 commit a6f132b

14 files changed

Lines changed: 1288 additions & 418 deletions

‎Makefile.cbm‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ CFLAGS_COMMON = -std=c11 -D_DEFAULT_SOURCE -D_GNU_SOURCE -Wall -Wextra -Werror \
5252
$(GCC_ONLY_FLAGS) \
5353
-Isrc -Ivendored -Ivendored/sqlite3 \
5454
-Ivendored/mimalloc/include \
55-
-I$(CBM_DIR) -I$(TS_INCLUDE)
55+
-I$(CBM_DIR) -I$(TS_INCLUDE) -I$(BUILD_DIR)/generated
5656

5757
CXXFLAGS_COMMON = -std=c++14 -Wall -Wextra -Werror \
5858
-Wno-unused-parameter \
@@ -355,7 +355,7 @@ GIT_SRCS = src/git/git_context.c
355355

356356
# CLI module (new)
357357
CLI_SRCS = src/cli/cli.c src/cli/progress_sink.c src/cli/hook_augment.c src/cli/client_adapter.c \
358-
src/cli/agent_clients.c src/cli/agent_profiles.c \
358+
src/cli/agent_clients.c src/cli/agent_profiles.c src/cli/integration_assets.c \
359359
src/cli/config_json_like.c src/cli/config_toml_edit.c src/cli/config_yaml_edit.c \
360360
src/cli/config_text_edit.c src/cli/activation_transaction.c
361361

@@ -470,6 +470,17 @@ EXISTING_C_SRCS = $(EXTRACTION_SRCS) $(LSP_SRCS) $(TS_RUNTIME_SRC) \
470470
PROJECT_HDRS = $(wildcard src/*.h src/*/*.h $(CBM_DIR)/*.h $(CBM_DIR)/lsp/*.h tests/*.h \
471471
tests/repro/*.h)
472472

473+
# ── Integration-asset integrity constant (generated, never hand-edited) ──
474+
# The binary embeds exactly ONE fact about the shipped integration templates:
475+
# the SHA-256 of assets/cbm-integrations.json, generated at build time (rule
476+
# below the BUILD_DIR definition; target lines expand immediately). Appended
477+
# to PROJECT_HDRS so every single-invocation target (test-runner,
478+
# test-repro-runner, test-runner-tsan, codebase-memory-mcp) rebuilds when the
479+
# asset changes — a stale constant would make every install fail verification.
480+
INTEGRATIONS_ASSET = assets/cbm-integrations.json
481+
INTEGRATIONS_HASH_HDR = $(BUILD_DIR)/generated/cbm_integrations_hash.h
482+
PROJECT_HDRS += $(INTEGRATIONS_HASH_HDR)
483+
473484
# ── Test sources ─────────────────────────────────────────────────
474485

475486
TEST_FOUNDATION_SRCS = \
@@ -685,6 +696,11 @@ ALL_TEST_SRCS =$(TEST_FOUNDATION_SRCS) $(TEST_EXTRACTION_SRCS) $(TEST_STORE_SRCS
685696

686697
BUILD_DIR = build/c
687698

699+
# Integration-asset hash header (variables defined next to PROJECT_HDRS; the
700+
# rule lives here because target lines expand $(BUILD_DIR) immediately).
701+
$(INTEGRATIONS_HASH_HDR): $(INTEGRATIONS_ASSET) scripts/gen-integrations-hash.sh | $(BUILD_DIR)
702+
scripts/gen-integrations-hash.sh $(INTEGRATIONS_ASSET) $@
703+
688704
# ── Object file compilation (grammars need relaxed warnings) ─────
689705

690706
# Grammar + tree-sitter runtime: compiled without -Werror (upstream code has warnings)
@@ -1097,7 +1113,7 @@ lint-cppcheck:
10971113
--suppress=ctunullpointerOutOfMemory \
10981114
--suppress='nullPointer:internal/cbm/sqlite_writer.c' \
10991115
-Isrc -Ivendored -Ivendored/sqlite3 \
1100-
-I$(CBM_DIR) -I$(TS_INCLUDE) \
1116+
-I$(CBM_DIR) -I$(TS_INCLUDE) -I$(BUILD_DIR)/generated \
11011117
$(LINT_SRCS)
11021118

11031119
# clang-format: formatting check (config in .clang-format, dry-run = no changes)

‎assets/cbm-integrations.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"format":1,"product":"codebase-memory-mcp","templates":{"claude_gate":{"posix":{"text":"#!/usr/bin/env bash\n# codebase-memory-mcp search augmenter (Claude Code PreToolUse).\n# NOTE: the legacy filename is kept for zero-migration upgrades.\n# Despite the name this NEVER blocks a tool call - it only adds\n# graph context. Any failure is silent (exit 0, no output).\nBIN={{BIN}}\n[ -x \"$BIN\" ] || exit 0\n\"$BIN\" hook-augment 2>/dev/null\nexit 0\n","bin":"sh"},"windows":{"text":"@echo off\r\nsetlocal DisableDelayedExpansion\r\nREM PreToolUse search and read coverage adapter installed by codebase-memory-mcp.\r\nREM Fail-open: it never blocks or logs hook or prompt content.\r\nset \"BIN={{BIN}}\"\r\nif not exist \"%BIN%\" exit /b 0\r\n\"%BIN%\" hook-augment 2>NUL\r\nexit /b 0\r\n","bin":"cmd"},"released":[{"text":"#!/usr/bin/env bash\n# codebase-memory-mcp search augmenter (Claude Code PreToolUse).\n# NOTE: the legacy filename is kept for zero-migration upgrades.\n# Despite the name this NEVER blocks a tool call - it only adds\n# graph context. Any failure is silent (exit 0, no output).\nBIN=\"{{BIN}}\"\n[ -x \"$BIN\" ] || exit 0\n\"$BIN\" hook-augment 2>/dev/null\nexit 0\n","bin":"raw"}]},"claude_session":{"posix":{"text":"#!/usr/bin/env bash\n# SessionStart context adapter installed by codebase-memory-mcp.\n# Fail-open: it never blocks or logs hook/prompt content.\nBIN={{BIN}}\n[ -x \"$BIN\" ] || exit 0\n\"$BIN\" hook-augment 2>/dev/null\nexit 0\n","bin":"sh"},"windows":{"text":"@echo off\r\nsetlocal DisableDelayedExpansion\r\nREM SessionStart context adapter installed by codebase-memory-mcp.\r\nREM Fail-open: it never blocks or logs hook or prompt content.\r\nset \"BIN={{BIN}}\"\r\nif not exist \"%BIN%\" exit /b 0\r\n\"%BIN%\" hook-augment 2>NUL\r\nexit /b 0\r\n","bin":"cmd"},"released":[{"text":"#!/usr/bin/env bash\n# SessionStart hook: remind agent to use codebase-memory-mcp tools.\n# Installed by codebase-memory-mcp. Fires on startup/resume/clear/compact.\ncat << 'REMINDER'\nCRITICAL - Code Discovery Protocol:\n1. ALWAYS use codebase-memory-mcp tools FIRST for ANY code exploration:\n - search_graph(name_pattern/label/qn_pattern) to find functions/classes/routes\n - trace_path(function_name, mode=calls|data_flow|cross_service) for call chains\n - get_code_snippet(qualified_name) for exact symbol source (precise ranges)\n - query_graph(query) for complex Cypher patterns\n - get_architecture(aspects) for project structure\n - search_code(pattern) for text search (graph-augmented grep)\n2. Use Grep/Glob/Read freely for text, configs, non-code files, and\n always Read a file before editing it.\n3. If a project is not indexed yet, run index_repository FIRST.\nREMINDER\n"}]},"claude_subagent":{"posix":{"text":"#!/usr/bin/env bash\n# SubagentStart context adapter installed by codebase-memory-mcp.\n# Fail-open: it never blocks or logs hook/prompt content.\nBIN={{BIN}}\n[ -x \"$BIN\" ] || exit 0\n\"$BIN\" hook-augment 2>/dev/null\nexit 0\n","bin":"sh"},"windows":{"text":"@echo off\r\nsetlocal DisableDelayedExpansion\r\nREM SubagentStart context adapter installed by codebase-memory-mcp.\r\nREM Fail-open: it never blocks or logs hook or prompt content.\r\nset \"BIN={{BIN}}\"\r\nif not exist \"%BIN%\" exit /b 0\r\n\"%BIN%\" hook-augment 2>NUL\r\nexit /b 0\r\n","bin":"cmd"},"released":[{"text":"#!/usr/bin/env bash\n# SubagentStart hook: tell subagents to use codebase-memory-mcp tools.\n# Installed by codebase-memory-mcp. Fires when any subagent is spawned.\n# SubagentStart injects context via JSON additionalContext, not plain stdout.\ncat << 'REMINDER'\n{\"hookSpecificOutput\":{\"hookEventName\":\"SubagentStart\",\"additionalContext\":\"Code discovery: prefer codebase-memory-mcp tools (search_graph, trace_path, get_code_snippet, query_graph, get_architecture, search_code) over grep/file-read for navigating code. Use Grep/Glob/Read for text, configs, and non-code files.\"}}\nREMINDER\n"}]},"augment_session":{"posix":{"text":"#!/bin/sh\n# SessionStart adapter installed by codebase-memory-mcp.\nBIN={{BIN}}\n[ -x \"$BIN\" ] || exit 0\nexec \"$BIN\" hook-augment --event SessionStart 2>/dev/null\n","bin":"sh"},"windows":{"text":"# SessionStart adapter installed by codebase-memory-mcp.\n$bin = {{BIN}}\nif (-not (Test-Path -LiteralPath $bin -PathType Leaf)) { exit 0 }\n& $bin hook-augment --event SessionStart 2>$null\nexit 0\n","bin":"ps"}},"augment_coverage":{"posix":{"text":"#!/bin/sh\n# PostToolUse view adapter installed by codebase-memory-mcp.\nBIN={{BIN}}\n[ -x \"$BIN\" ] || exit 0\nexec \"$BIN\" hook-augment --dialect augment 2>/dev/null\n","bin":"sh"},"windows":{"text":"# PostToolUse view adapter installed by codebase-memory-mcp.\n$bin = {{BIN}}\nif (-not (Test-Path -LiteralPath $bin -PathType Leaf)) { exit 0 }\n& $bin hook-augment --dialect augment 2>$null\nexit 0\n","bin":"ps"}},"cline_context":{"posix":{"text":"#!/bin/sh\n# Cline {{EVENT}} context adapter installed by codebase-memory-mcp.\nBIN={{BIN}}\n[ -x \"$BIN\" ] || exit 0\nexec \"$BIN\" hook-augment --dialect cline --event {{EVENT}} 2>/dev/null\n","bin":"sh"},"windows":{"text":"# Cline {{EVENT}} context adapter installed by codebase-memory-mcp.\n$bin = {{BIN}}\nif (-not (Test-Path -LiteralPath $bin -PathType Leaf)) { exit 0 }\n& $bin hook-augment --dialect cline --event {{EVENT}} 2>$null\nexit 0\n","bin":"ps"}},"adapter_pi":{"all":{"text":"// Generated by codebase-memory-mcp for pi.\n// Regenerated on install/update from the MCP tool registry, so it cannot\n// drift from the tools the server actually serves. Edits inside this block\n// are overwritten; edit outside it, or remove the markers to take ownership.\nimport { spawn } from 'node:child_process';\n\nconst BIN = '{{BIN}}';\n\nasync function call(tool, args, signal) {\n return new Promise((resolve) => {\n const child = spawn(BIN, ['cli', tool, JSON.stringify(args ?? {})], {\n stdio: ['ignore', 'pipe', 'pipe'],\n env: { ...process.env, CBM_LOG_LEVEL: 'error' },\n });\n let out = '';\n const onAbort = () => { if (!child.killed) child.kill(); };\n signal?.addEventListener('abort', onAbort, { once: true });\n child.stdout.on('data', (d) => (out += d.toString()));\n child.on('error', (e) => {\n signal?.removeEventListener('abort', onAbort);\n resolve({ error: String(e && e.message ? e.message : e) });\n });\n child.on('close', () => {\n signal?.removeEventListener('abort', onAbort);\n const lines = out.split('\\n').map((l) => l.trim()).filter(Boolean);\n for (let i = lines.length - 1; i >= 0; i--) {\n try { return resolve(JSON.parse(lines[i])); } catch { /* keep scanning */ }\n }\n resolve({ error: 'no JSON response from codebase-memory-mcp' });\n });\n });\n}\n\nexport function register(pi) {\n{{TOOLS}}}\n","bin":"js"},"tool_line":" pi.registerTool({ name: '{{TOOL}}', run: (args, ctx) => call('{{TOOL}}', args, ctx?.signal) });\n"},"adapter_opencode":{"all":{"text":"// Generated by codebase-memory-mcp for OpenCode.\n// Regenerated on install/update from the MCP tool registry, so it cannot\n// drift from the tools the server actually serves. Edits inside this block\n// are overwritten; edit outside it, or remove the markers to take ownership.\n// OpenCode already reaches every tool over MCP; this adds only the\n// automatic graph lookup before a grep/glob, which other clients get\n// through their own hook configuration.\nimport { spawn } from 'node:child_process';\n\nconst BIN = '{{BIN}}';\n\nfunction augment(tool, args) {\n return new Promise((resolve) => {\n const child = spawn(BIN, ['hook-augment'], {\n stdio: ['pipe', 'pipe', 'ignore'],\n env: { ...process.env, CBM_LOG_LEVEL: 'error' },\n });\n let out = '';\n child.stdout.on('data', (d) => (out += d.toString()));\n child.on('error', () => resolve(''));\n child.on('close', () => resolve(out));\n child.stdin.end(JSON.stringify({\n hook_event_name: 'PreToolUse',\n tool_name: tool,\n tool_input: args ?? {},\n }));\n });\n}\n\nexport const CodebaseMemory = async () => ({\n 'tool.execute.after': async (input, output) => {\n const tool = input?.tool === 'grep' ? 'Grep' : input?.tool === 'glob' ? 'Glob' : null;\n if (!tool) return;\n const extra = await augment(tool, output?.args);\n if (extra && typeof output?.output === 'string') {\n output.output += '\\n' + extra;\n }\n },\n});\n","bin":"js"}}}}

‎scripts/ci/check-binary-composition.sh‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,21 @@ UI_HTTP_NEEDLES=(
9393
'[c]odebase-memory-mcp'
9494
)
9595

96+
# The binary used to embed nine complete shebang'd shell scripts, their
97+
# PowerShell/.cmd twins and two node:child_process client modules — script
98+
# bodies written to disk at 0755, which is precisely the text surface
99+
# Defender's ML scored Trojan:Script/Wacatac.B!ml. They now ship in
100+
# cbm-integrations.json (the binary embeds only its SHA-256); these needles
101+
# prove the removal stayed removed. Source-level enforcement lives in
102+
# tests/test_no_embedded_scripts_contract.sh; this is the shipped-artifact
103+
# half of the same property.
104+
SCRIPT_NEEDLES=(
105+
'#!/usr/bin/env bash'
106+
'#!/bin/bash'
107+
'#!/bin/sh'
108+
'node:child_process'
109+
)
110+
96111
# Canary: proves the needle scan can actually see this file's strings. Without
97112
# it, handing the gate a gzip, a stub or a 0-byte file would pass every
98113
# absence assertion. 168+ occurrences in a real artifact, 0 in anything else.
@@ -367,6 +382,29 @@ check_file() {
367382
printf 'INFO %-22s %s: %d/%d UI/HTTP needles present (no-UI split pending; set CBM_CHECK_UI_ABSENT=1 to enforce)\n' \
368383
A5-no-ui-http "$token" "$ui_hits" "${#UI_HTTP_NEEDLES[@]}"
369384
fi
385+
386+
# A6 — embedded integration-script text. Enforced on standard artifacts:
387+
# every C-source template moved into cbm-integrations.json, so a hit means
388+
# one crept back in. The ui artifact additionally embeds the RAW frontend
389+
# bundle (scripts/embed-frontend.sh stores plain bytes), whose minified JS
390+
# may legitimately contain e.g. "#!" sequences we do not control — so ui
391+
# reports rather than fails until that is measured on a real ui build,
392+
# mirroring A5's honest-INFO pattern. Flip CBM_CHECK_UI_SCRIPTS_ABSENT=1
393+
# to enforce there too.
394+
if [ "$is_ui" -eq 1 ] && [ "${CBM_CHECK_UI_SCRIPTS_ABSENT:-0}" != "1" ]; then
395+
script_hits=0
396+
for needle in "${SCRIPT_NEEDLES[@]}"; do
397+
if LC_ALL=C grep -a -q -F -e "$needle" "$file"; then
398+
script_hits=$((script_hits + 1))
399+
fi
400+
done
401+
printf 'INFO %-22s %s: %d/%d script needles present (raw frontend bundle; set CBM_CHECK_UI_SCRIPTS_ABSENT=1 to enforce)\n' \
402+
A6-no-embedded-scripts "$token" "$script_hits" "${#SCRIPT_NEEDLES[@]}"
403+
else
404+
for needle in "${SCRIPT_NEEDLES[@]}"; do
405+
assert_absent "$file" "$token" A6-no-embedded-scripts "$needle"
406+
done
407+
fi
370408
}
371409

372410
# ── Walk the targets ────────────────────────────────────────────────

‎scripts/gen-integrations-hash.sh‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/sh
2+
# gen-integrations-hash.sh — emit the build-time integrity constant for
3+
# assets/cbm-integrations.json.
4+
#
5+
# The binary embeds exactly ONE fact about the integration templates: the
6+
# SHA-256 of the shipped asset file. Verifying the file against this constant
7+
# before use preserves the tamper-evidence the templates had while they were
8+
# compiled in — moving them out of the binary (AV-surface reduction) must not
9+
# turn them into unauthenticated code the installer happily writes to disk.
10+
#
11+
# Generated, never hand-maintained: a stale constant is exactly the silent
12+
# drift this step exists to prevent, so the header is a build product with a
13+
# real dependency on the JSON file.
14+
set -eu
15+
16+
if [ "$#" -ne 2 ]; then
17+
echo "usage: gen-integrations-hash.sh <asset.json> <out-header.h>" >&2
18+
exit 2
19+
fi
20+
asset="$1"
21+
out="$2"
22+
23+
[ -f "$asset" ] || { echo "gen-integrations-hash: missing $asset" >&2; exit 1; }
24+
25+
if command -v sha256sum >/dev/null 2>&1; then
26+
hash=$(sha256sum "$asset" | cut -d' ' -f1)
27+
elif command -v shasum >/dev/null 2>&1; then
28+
hash=$(shasum -a 256 "$asset" | cut -d' ' -f1)
29+
else
30+
echo "gen-integrations-hash: neither sha256sum nor shasum available" >&2
31+
exit 1
32+
fi
33+
34+
case "$hash" in
35+
*[!0-9a-f]* | "")
36+
echo "gen-integrations-hash: bad digest '$hash'" >&2
37+
exit 1
38+
;;
39+
esac
40+
if [ "${#hash}" -ne 64 ]; then
41+
echo "gen-integrations-hash: bad digest length for '$hash'" >&2
42+
exit 1
43+
fi
44+
45+
mkdir -p "$(dirname "$out")"
46+
tmp="$out.tmp.$$"
47+
{
48+
echo "/* Generated by scripts/gen-integrations-hash.sh — do not edit. */"
49+
echo "#ifndef CBM_INTEGRATIONS_HASH_H"
50+
echo "#define CBM_INTEGRATIONS_HASH_H"
51+
echo "#define CBM_INTEGRATIONS_SHA256 \"$hash\""
52+
echo "#endif"
53+
} >"$tmp"
54+
mv "$tmp" "$out"

‎scripts/package-release.sh‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,16 @@ Environment:
3737
BUILD_DIR build tree to archive from (default build/c).
3838
3939
Archive contents (defined here, canonical) — ONE binary per platform:
40-
unix: codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md (.tar.gz)
41-
windows: codebase-memory-mcp.exe LICENSE install.ps1
40+
unix: codebase-memory-mcp cbm-integrations.json LICENSE install.sh
41+
THIRD_PARTY_NOTICES.md (.tar.gz)
42+
windows: codebase-memory-mcp.exe cbm-integrations.json LICENSE install.ps1
4243
THIRD_PARTY_NOTICES.md (.zip)
44+
45+
cbm-integrations.json is the integration-template data file: the binary
46+
embeds only its SHA-256 and refuses to install integrations without a
47+
verified copy, so an archive without it produces a binary that cannot
48+
install. It ships NEXT TO the binary — the resolution path install.sh /
49+
install.ps1 rely on when they run `install` from the extracted archive.
4350
EOF
4451
}
4552

@@ -174,13 +181,13 @@ if [ "$GOOS" = "windows" ]; then
174181
# a workflow step so the local artifact-flow smoke enforces the same thing.
175182
bash scripts/ci/check-binary-composition.sh --variant="$VARIANT" \
176183
"$PACK_DIR/codebase-memory-mcp.exe" || exit 2
177-
cp LICENSE install.ps1 "$PACK_DIR/"
184+
cp LICENSE install.ps1 assets/cbm-integrations.json "$PACK_DIR/"
178185
scripts/gen-third-party-notices.sh "$PACK_DIR/THIRD_PARTY_NOTICES.md"
179186
(
180187
cd "$PACK_DIR"
181188
rm -f "$OUT_DIR/$NAME.zip"
182189
zip -q "$OUT_DIR/$NAME.zip" \
183-
codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
190+
codebase-memory-mcp.exe cbm-integrations.json LICENSE install.ps1 THIRD_PARTY_NOTICES.md
184191
)
185192
echo "=== package-release: $OUT_DIR/$NAME.zip ==="
186193
else
@@ -189,9 +196,9 @@ else
189196
strip_release_binary "$BUILD_DIR/codebase-memory-mcp" || exit 2
190197
bash scripts/ci/check-binary-composition.sh --variant="$VARIANT" \
191198
"$BUILD_DIR/codebase-memory-mcp" || exit 2
192-
cp LICENSE install.sh "$BUILD_DIR/"
199+
cp LICENSE install.sh assets/cbm-integrations.json "$BUILD_DIR/"
193200
scripts/gen-third-party-notices.sh "$BUILD_DIR/THIRD_PARTY_NOTICES.md"
194201
tar -czf "$OUT_DIR/$NAME.tar.gz" -C "$BUILD_DIR" \
195-
codebase-memory-mcp LICENSE install.sh THIRD_PARTY_NOTICES.md
202+
codebase-memory-mcp cbm-integrations.json LICENSE install.sh THIRD_PARTY_NOTICES.md
196203
echo "=== package-release: $OUT_DIR/$NAME.tar.gz ==="
197204
fi

‎scripts/test.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ bash "$ROOT/tests/test_venue_parity_contract.sh"
233233
echo "=== Step 0k: spawn console-window contract (#1427) ==="
234234
bash "$ROOT/tests/test_spawn_no_window_contract.sh"
235235

236+
echo "=== Step 0l: no embedded integration-script text (AV surface) ==="
237+
bash "$ROOT/tests/test_no_embedded_scripts_contract.sh"
238+
236239
# Verify compiler supports target arch
237240
verify_compiler "$CC"
238241

0 commit comments

Comments
 (0)